1 --- faad2/plugins/mpeg4ip/faad2.cpp.orig 2004-08-20 10:30:53.000000000 +0200
2 +++ faad2/plugins/mpeg4ip/faad2.cpp 2006-08-24 08:27:51.399489000 +0200
5 * Create CAACodec class
7 -static codec_data_t *aac_codec_create (const char *compressor,
8 +static codec_data_t *aac_codec_create (const char *stream_type, const char *compressor,
11 format_list_t *media_fmt,
13 * Decode task call for FAAC
15 static int aac_decode (codec_data_t *ptr,
17 + frame_timestamp_t *ts,
22 if (aac->m_record_sync_time) {
23 aac->m_current_frame = 0;
24 aac->m_record_sync_time = 0;
25 - aac->m_current_time = ts;
26 - aac->m_last_rtp_ts = ts;
27 + aac->m_current_time = ts->msec_timestamp;
28 + aac->m_last_rtp_ts = ts->msec_timestamp;
30 - if (aac->m_last_rtp_ts == ts) {
31 + if (aac->m_last_rtp_ts == ts->msec_timestamp) {
32 aac->m_current_time += aac->m_msec_per_frame;
33 aac->m_current_frame++;
35 - aac->m_last_rtp_ts = ts;
36 - aac->m_current_time = ts;
37 + aac->m_last_rtp_ts = ts->msec_timestamp;
38 + aac->m_current_time = ts->msec_timestamp;
39 aac->m_current_frame = 0;
44 (audio_format_t)AUDIO_S16SYS,
45 aac->m_output_frame_size);
46 - uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr);
47 + uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr, (ts->msec_timestamp * aac->m_freq) / 1000, ts->msec_timestamp);
48 aac->m_audio_inited = 1;
54 static int aac_codec_check (lib_message_func_t message,
55 + const char *stream_type,
56 const char *compressor,
61 if (userdata != NULL) {
62 mpeg4_audio_config_t audio_config;
63 - decode_mpeg4_audio_config(userdata, userdata_size, &audio_config);
64 + decode_mpeg4_audio_config(userdata, userdata_size, &audio_config, 1 /* ??? */);
65 message(LOG_DEBUG, "aac", "audio type is %d", audio_config.audio_object_type);
66 if (fmtp != NULL) free_fmtp_parse(fmtp);
68 --- faad2/plugins/mpeg4ip/aa_file.cpp.orig 2004-01-05 15:05:12.000000000 +0100
69 +++ faad2/plugins/mpeg4ip/aa_file.cpp 2006-08-24 08:33:42.189412000 +0200
72 int aac_file_next_frame (codec_data_t *your,
75 + frame_timestamp_t *ts)
77 aac_codec_t *aac = (aac_codec_t *)your;
81 calc = aac->m_framecount * 1024 * M_LLU;
84 + ts->msec_timestamp = calc;
85 + ts->audio_freq_timestamp = calc; /* XXX */
86 + ts->audio_freq = 1; /* XXX */
87 + ts->timestamp_is_pts = false;
88 *buffer = aac->m_buffer;
90 return (aac->m_buffer_size);
91 --- faad2/plugins/mpeg4ip/faad2.h.orig 2004-01-05 15:05:12.000000000 +0100
92 +++ faad2/plugins/mpeg4ip/faad2.h 2006-08-24 08:29:23.233228250 +0200
95 int aac_file_next_frame(codec_data_t *ifptr,
98 + frame_timestamp_t *ts);
99 int aac_file_eof(codec_data_t *ifptr);
101 void aac_file_used_for_frame(codec_data_t *ifptr,
102 --- faad2/configure.in.orig 2006-09-25 21:52:53.000000000 +0200
103 +++ faad2/configure.in 2007-11-04 11:51:50.486008814 +0100
105 if test x$external_mp4v2 = xyes; then
106 AM_CONDITIONAL(HAVE_MPEG4IP_PLUG, true)
107 AC_MSG_NOTICE("Building MPEG4IP plugin")
108 + MPEG4IP_PLAYER_PLUGIN_DIR="`mpeg4ip-config --player-plugin-dir`"
109 + AC_SUBST(MPEG4IP_PLAYER_PLUGIN_DIR)
111 AC_MSG_NOTICE("MPEG4IP libmp4v2 is required for MPEG4IP plugin")