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