]> git.pld-linux.org Git - packages/faad2.git/blobdiff - faad2-mpeg4ip.patch
- BR: mpeg4ip >= 1.6, patch contains fix incompatible with older versions
[packages/faad2.git] / faad2-mpeg4ip.patch
index fafa93b9bf822ed102faf31eb5fd0f0f95a6fd46..97d6e3e527fd29b2257255fec9eb83a233771a0c 100644 (file)
@@ -1,57 +1,24 @@
---- faad2/plugins/mpeg4ip/aa_file.cpp.orig     2006-01-25 21:44:44.000000000 +0100
-+++ faad2/plugins/mpeg4ip/aa_file.cpp  2006-01-25 22:29:06.103470750 +0100
-@@ -77,7 +77,7 @@
- int aac_file_next_frame (codec_data_t *your,
-              uint8_t **buffer,
--             uint64_t *ts)
-+             frame_timestamp_t *ts)
- {
-   aac_codec_t *aac = (aac_codec_t *)your;
-@@ -98,7 +98,7 @@
-   uint64_t calc;
-   calc = aac->m_framecount * 1024 * M_LLU;
-   calc /= aac->m_freq;
--  *ts = calc;
-+  ts->msec_timestamp = calc;
-   *buffer = aac->m_buffer;
-   aac->m_framecount++;
-   return (aac->m_buffer_size);
---- faad2/plugins/mpeg4ip/faad2.h.orig 2004-01-05 15:05:12.000000000 +0100
-+++ faad2/plugins/mpeg4ip/faad2.h      2006-01-25 22:17:53.373427750 +0100
-@@ -81,7 +81,7 @@
- int aac_file_next_frame(codec_data_t *ifptr,
-             uint8_t **buffer,
--            uint64_t *ts);
-+            frame_timestamp_t *ts);
- int aac_file_eof(codec_data_t *ifptr);
- void aac_file_used_for_frame(codec_data_t *ifptr,
---- faad2/plugins/mpeg4ip/faad2.cpp.orig       2006-01-25 22:43:27.605311250 +0100
-+++ faad2/plugins/mpeg4ip/faad2.cpp    2006-01-25 22:27:24.273106750 +0100
-@@ -35,7 +35,9 @@
+--- faad2/plugins/mpeg4ip/faad2.cpp.orig       2004-08-20 10:30:53.000000000 +0200
++++ faad2/plugins/mpeg4ip/faad2.cpp    2006-08-24 08:27:51.399489000 +0200
+@@ -35,7 +35,7 @@
  /*
   * Create CAACodec class
   */
 -static codec_data_t *aac_codec_create (const char *compressor,
-+static codec_data_t *aac_codec_create (
-+                       const char* /*stream_type*/,
-+                       const char* /*compressor*/,
++static codec_data_t *aac_codec_create (const char *stream_type, const char *compressor,
                         int type,
                         int profile,
                         format_list_t *media_fmt,
-@@ -148,7 +150,7 @@
+@@ -148,7 +148,7 @@
   * Decode task call for FAAC
   */
  static int aac_decode (codec_data_t *ptr,
 -               uint64_t ts,
-+               frame_timestamp_tts,
++               frame_timestamp_t *ts,
                 int from_rtp,
                 int *sync_frame,
                 uint8_t *buffer,
-@@ -163,15 +165,15 @@
+@@ -163,15 +163,15 @@
    if (aac->m_record_sync_time) {
      aac->m_current_frame = 0;
      aac->m_record_sync_time = 0;
        aac->m_current_frame = 0;
      }
  
-@@ -237,9 +239,9 @@
-       aac->m_vft->audio_configure(aac->m_ifptr,
-                   aac->m_freq,
+@@ -239,7 +239,7 @@
                    aac->m_chans,
--                  AUDIO_S16SYS,
-+                  AUDIO_FMT_S16,
+                   (audio_format_t)AUDIO_S16SYS,
                    aac->m_output_frame_size);
 -      uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr);
-+      uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr, aac->m_freq, aac->m_current_time);
++      uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr, (ts->msec_timestamp * aac->m_freq) / 1000, ts->msec_timestamp);
        aac->m_audio_inited = 1;
      }
      /*
-@@ -281,6 +283,7 @@
+@@ -281,6 +281,7 @@
  };
  
  static int aac_codec_check (lib_message_func_t message,
-+                const char *stream_type,
++              const char *stream_type,
                  const char *compressor,
                  int type,
                  int profile,
-@@ -322,7 +325,7 @@
+@@ -322,7 +323,7 @@
    }
    if (userdata != NULL) {
      mpeg4_audio_config_t audio_config;
 -    decode_mpeg4_audio_config(userdata, userdata_size, &audio_config);
-+    decode_mpeg4_audio_config(userdata, userdata_size, &audio_config, false);
++    decode_mpeg4_audio_config(userdata, userdata_size, &audio_config, 1 /* ??? */);
      message(LOG_DEBUG, "aac", "audio type is %d", audio_config.audio_object_type);
      if (fmtp != NULL) free_fmtp_parse(fmtp);
  
+--- faad2/plugins/mpeg4ip/aa_file.cpp.orig     2004-01-05 15:05:12.000000000 +0100
++++ faad2/plugins/mpeg4ip/aa_file.cpp  2006-08-24 08:33:42.189412000 +0200
+@@ -77,7 +77,7 @@
+ int aac_file_next_frame (codec_data_t *your,
+              uint8_t **buffer,
+-             uint64_t *ts)
++             frame_timestamp_t *ts)
+ {
+   aac_codec_t *aac = (aac_codec_t *)your;
+@@ -98,7 +98,10 @@
+   uint64_t calc;
+   calc = aac->m_framecount * 1024 * M_LLU;
+   calc /= aac->m_freq;
+-  *ts = calc;
++  ts->msec_timestamp = calc;
++  ts->audio_freq_timestamp = calc; /* XXX */
++  ts->audio_freq = 1; /* XXX */
++  ts->timestamp_is_pts = false;
+   *buffer = aac->m_buffer;
+   aac->m_framecount++;
+   return (aac->m_buffer_size);
+--- faad2/plugins/mpeg4ip/faad2.h.orig 2004-01-05 15:05:12.000000000 +0100
++++ faad2/plugins/mpeg4ip/faad2.h      2006-08-24 08:29:23.233228250 +0200
+@@ -81,7 +81,7 @@
+ int aac_file_next_frame(codec_data_t *ifptr,
+             uint8_t **buffer,
+-            uint64_t *ts);
++            frame_timestamp_t *ts);
+ int aac_file_eof(codec_data_t *ifptr);
+ void aac_file_used_for_frame(codec_data_t *ifptr,
+--- faad2/configure.in.orig    2006-09-25 21:52:53.000000000 +0200
++++ faad2/configure.in 2007-11-04 11:51:50.486008814 +0100
+@@ -123,6 +123,8 @@
+    if test x$external_mp4v2 = xyes; then
+       AM_CONDITIONAL(HAVE_MPEG4IP_PLUG, true)
+       AC_MSG_NOTICE("Building MPEG4IP plugin")
++      MPEG4IP_PLAYER_PLUGIN_DIR="`mpeg4ip-config --player-plugin-dir`"
++      AC_SUBST(MPEG4IP_PLAYER_PLUGIN_DIR)
+    else
+       AC_MSG_NOTICE("MPEG4IP libmp4v2 is required for MPEG4IP plugin")
+    fi
+--- faad2/plugins/mpeg4ip/faad2.cpp.orig       2007-11-13 21:24:36.000000000 +0100
++++ faad2/plugins/mpeg4ip/faad2.cpp    2007-11-13 21:38:55.000000000 +0100
+@@ -67,7 +67,7 @@
+     // This is not necessarilly right - it is, for the most part, but
+     // we should be reading the fmtp statement, and looking at the config.
+     // (like we do below in the userdata section...
+-    aac->m_freq = media_fmt->rtpmap->clock_rate;
++    aac->m_freq = media_fmt->rtpmap_clock_rate;
+     fmtp = parse_fmtp_for_mpeg4(media_fmt->fmt_param, vft->log_msg);
+     if (fmtp != NULL) {
+       userdata = fmtp->config_binary;
+@@ -308,9 +308,8 @@
+     }
+   }
+   if (fptr != NULL &&
+-      fptr->rtpmap != NULL &&
+-      fptr->rtpmap->encode_name != NULL) {
+-    if (strcasecmp(fptr->rtpmap->encode_name, "mpeg4-generic") != 0) {
++      fptr->rtpmap_name != NULL) {
++    if (strcasecmp(fptr->rtpmap_name, "mpeg4-generic") != 0) {
+       return -1;
+     }
+     if (userdata == NULL) {
This page took 0.225188 seconds and 4 git commands to generate.