]> git.pld-linux.org Git - packages/faad2.git/blob - faad2-mpeg4ip.patch
507588c80ad25a06128e4ba37afe71824bfd92c6
[packages/faad2.git] / faad2-mpeg4ip.patch
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
3 @@ -35,7 +35,7 @@
4  /*
5   * Create CAACodec class
6   */
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,
9                         int type,
10                         int profile,
11                         format_list_t *media_fmt,
12 @@ -148,7 +148,7 @@
13   * Decode task call for FAAC
14   */
15  static int aac_decode (codec_data_t *ptr,
16 -               uint64_t ts,
17 +               frame_timestamp_t *ts,
18                 int from_rtp,
19                 int *sync_frame,
20                 uint8_t *buffer,
21 @@ -163,15 +163,15 @@
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;
29    } else {
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++;
34      } else {
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;
40      }
41  
42 @@ -239,7 +239,7 @@
43                    aac->m_chans,
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;
49      }
50      /*
51 @@ -281,6 +281,7 @@
52  };
53  
54  static int aac_codec_check (lib_message_func_t message,
55 +               const char *stream_type,
56                  const char *compressor,
57                  int type,
58                  int profile,
59 @@ -322,7 +323,7 @@
60    }
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);
67  
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
70 @@ -77,7 +77,7 @@
71  
72  int aac_file_next_frame (codec_data_t *your,
73               uint8_t **buffer,
74 -             uint64_t *ts)
75 +             frame_timestamp_t *ts)
76  {
77    aac_codec_t *aac = (aac_codec_t *)your;
78  
79 @@ -98,7 +98,10 @@
80    uint64_t calc;
81    calc = aac->m_framecount * 1024 * M_LLU;
82    calc /= aac->m_freq;
83 -  *ts = calc;
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;
89    aac->m_framecount++;
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
93 @@ -81,7 +81,7 @@
94  
95  int aac_file_next_frame(codec_data_t *ifptr,
96              uint8_t **buffer,
97 -            uint64_t *ts);
98 +            frame_timestamp_t *ts);
99  int aac_file_eof(codec_data_t *ifptr);
100  
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
104 @@ -123,6 +123,8 @@
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)
110     else
111         AC_MSG_NOTICE("MPEG4IP libmp4v2 is required for MPEG4IP plugin")
112     fi
This page took 0.049571 seconds and 2 git commands to generate.