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
\r
7 -static codec_data_t *aac_codec_create (const char *compressor,
\r
8 +static codec_data_t *aac_codec_create (const char *stream_type, const char *compressor,
\r
11 format_list_t *media_fmt,
\r
13 * Decode task call for FAAC
\r
15 static int aac_decode (codec_data_t *ptr,
\r
17 + frame_timestamp_t *ts,
\r
22 if (aac->m_record_sync_time) {
\r
23 aac->m_current_frame = 0;
\r
24 aac->m_record_sync_time = 0;
\r
25 - aac->m_current_time = ts;
\r
26 - aac->m_last_rtp_ts = ts;
\r
27 + aac->m_current_time = ts->msec_timestamp;
\r
28 + aac->m_last_rtp_ts = ts->msec_timestamp;
\r
30 - if (aac->m_last_rtp_ts == ts) {
\r
31 + if (aac->m_last_rtp_ts == ts->msec_timestamp) {
\r
32 aac->m_current_time += aac->m_msec_per_frame;
\r
33 aac->m_current_frame++;
\r
35 - aac->m_last_rtp_ts = ts;
\r
36 - aac->m_current_time = ts;
\r
37 + aac->m_last_rtp_ts = ts->msec_timestamp;
\r
38 + aac->m_current_time = ts->msec_timestamp;
\r
39 aac->m_current_frame = 0;
\r
44 (audio_format_t)AUDIO_S16SYS,
\r
45 aac->m_output_frame_size);
\r
46 - uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr);
\r
47 + uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr, (ts->msec_timestamp * aac->m_freq) / 1000, ts->msec_timestamp);
\r
48 aac->m_audio_inited = 1;
\r
54 static int aac_codec_check (lib_message_func_t message,
\r
55 + const char *stream_type,
\r
56 const char *compressor,
\r
61 if (userdata != NULL) {
\r
62 mpeg4_audio_config_t audio_config;
\r
63 - decode_mpeg4_audio_config(userdata, userdata_size, &audio_config);
\r
64 + decode_mpeg4_audio_config(userdata, userdata_size, &audio_config, 1 /* ??? */);
\r
65 message(LOG_DEBUG, "aac", "audio type is %d", audio_config.audio_object_type);
\r
66 if (fmtp != NULL) free_fmtp_parse(fmtp);
\r
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,
\r
75 + frame_timestamp_t *ts)
\r
77 aac_codec_t *aac = (aac_codec_t *)your;
\r
81 calc = aac->m_framecount * 1024 * M_LLU;
\r
82 calc /= aac->m_freq;
\r
84 + ts->msec_timestamp = calc;
\r
85 + ts->audio_freq_timestamp = calc; /* XXX */
\r
86 + ts->audio_freq = 1; /* XXX */
\r
87 + ts->timestamp_is_pts = false;
\r
88 *buffer = aac->m_buffer;
\r
89 aac->m_framecount++;
\r
90 return (aac->m_buffer_size);
\r
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,
\r
98 + frame_timestamp_t *ts);
\r
99 int aac_file_eof(codec_data_t *ifptr);
\r
101 void aac_file_used_for_frame(codec_data_t *ifptr,
\r
102 --- faad2/configure.in.orig 2006-08-24 00:22:15.814628000 +0200
103 +++ faad2/configure.in 2006-08-24 18:02:34.414542750 +0200
105 if test x$external_mp4v2 = xyes; then
\r
106 AM_CONDITIONAL(HAVE_MPEG4IP_PLUG, true)
\r
107 AC_MSG_NOTICE("Building MPEG4IP plugin")
\r
108 + MPEG4IP_PLAYER_PLUGIN_DIR="`mpeg4ip-config --player-plugin-dir`"
\r
109 + AC_SUBST(MPEG4IP_PLAYER_PLUGIN_DIR)
\r
111 AC_MSG_NOTICE("MPEG4IP libmp4v2 is required for MPEG4IP plugin")
\r