}])
########################################################################### faad
STASH_FLAGS
-LIB_ARG_WITH([faad], [-lfaad -lmp4ff])
+LIB_ARG_WITH([faad], [-lfaad])
HAVE_FAAD=yes
AC_CHECK_HEADER(neaacdec.h, [], HAVE_FAAD=no)
-AC_CHECK_HEADER(mp4ff.h, [], HAVE_FAAD=no)
AC_CHECK_LIB([faad], [NeAACDecOpen], [], HAVE_FAAD=no)
-AC_CHECK_LIB([mp4ff], [mp4ff_meta_get_artist], [], HAVE_FAAD=no)
LIB_SUBST_FLAGS(faad)
UNSTASH_FLAGS
########################################################################### mad
NEED_OPUS_OBJECTS() && server_errlist_objs="$server_errlist_objs opus_afh opus_common"
NEED_FLAC_OBJECTS && server_errlist_objs="$server_errlist_objs flac_afh"
if test $HAVE_FAAD = yes; then
- server_errlist_objs="$server_errlist_objs aac_afh"
+ server_errlist_objs="$server_errlist_objs aac_afh mp4"
fi
server_objs="$server_errlist_objs"
AC_SUBST(server_objs, add_dot_o($server_objs))
NEED_FLAC_OBJECTS && recv_errlist_objs="$recv_errlist_objs flac_afh"
if test $HAVE_FAAD = yes; then
- recv_errlist_objs="$recv_errlist_objs aac_afh"
+ recv_errlist_objs="$recv_errlist_objs aac_afh mp4"
fi
recv_objs="$recv_errlist_objs"
AC_SUBST(recv_objs, add_dot_o($recv_objs))
audio_format_handlers="$audio_format_handlers flac"
}
if test $HAVE_FAAD = yes; then
- afh_errlist_objs="$afh_errlist_objs aac_afh"
+ afh_errlist_objs="$afh_errlist_objs aac_afh mp4"
audio_format_handlers="$audio_format_handlers aac"
fi
play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
}
if test $HAVE_FAAD = yes; then
- play_errlist_objs="$play_errlist_objs aac_afh aacdec_filter"
+ play_errlist_objs="$play_errlist_objs aac_afh aacdec_filter mp4"
fi
if test $HAVE_MAD = yes; then
play_errlist_objs="$play_errlist_objs mp3dec_filter"
return f->total_tracks;
}
-int32_t mp4ff_read_data(mp4ff_t * f, int8_t * data, uint32_t size)
+int32_t mp4ff_read_data(mp4ff_t * f, void *data, uint32_t size)
{
int32_t result = 1;
}
static int32_t mp4ff_read_mp4a(mp4ff_t * f)
{
- uint64_t size;
int32_t i;
uint8_t atom_type = 0;
uint8_t header_size = 0;
mp4ff_read_int16(f);
- size = mp4ff_atom_read_header(f, &atom_type, &header_size);
+ mp4ff_atom_read_header(f, &atom_type, &header_size);
if (atom_type == ATOM_ESDS) {
mp4ff_read_esds(f);
}
}
static int32_t mp4ff_tag_add_field(mp4ff_metadata_t * tags, const char *item,
- char *value, int32_t len)
+ const char *value, int32_t len)
{
void *backup = (void *) tags->tags;
return str;
}
-static int32_t mp4ff_set_metadata_name(mp4ff_t * f, const uint8_t atom_type,
- char **name)
+static int32_t mp4ff_set_metadata_name(const uint8_t atom_type, char **name)
{
static char *tag_names[] = {
"unknown", "title", "artist", "writer", "album",
if (data) {
if (!done) {
if (name == NULL)
- mp4ff_set_metadata_name(f, parent_atom_type,
- &name);
+ mp4ff_set_metadata_name(parent_atom_type, &name);
if (name)
mp4ff_tag_add_field(&(f->tags), name, data, len);
}
return 0;
}
-int32_t mp4ff_get_decoder_config(const mp4ff_t * f, const int track,
+void mp4ff_get_decoder_config(const mp4ff_t * f, const int track,
unsigned char **ppBuf, unsigned int *pBufSize)
{
if (track >= f->total_tracks) {
*ppBuf = NULL;
*pBufSize = 0;
- return 1;
+ return;
}
if (f->track[track]->decoderConfig == NULL
*ppBuf = malloc(f->track[track]->decoderConfigLen);
if (*ppBuf == NULL) {
*pBufSize = 0;
- return 1;
+ return;
}
memcpy(*ppBuf, f->track[track]->decoderConfig,
f->track[track]->decoderConfigLen);
int32_t chunk2entry;
int32_t chunk1, chunk2, chunk1samples, range_samples, total = 0;
+ *chunk_sample = 0;
+ *chunk = 1;
if (f->track[track] == NULL) {
return -1;
}
#define stricmp strcasecmp
-membuffer *membuffer_create()
+membuffer *membuffer_create(void)
{
const unsigned initial_size = 256;
return 1;
}
-int32_t mp4ff_write_data(mp4ff_t * f, int8_t * data, uint32_t size)
+int32_t mp4ff_write_data(mp4ff_t * f, void *data, uint32_t size)
{
int32_t result = 1;