Merge branch 'master' into 0.11
[platform/upstream/gstreamer.git] / ext / ffmpeg / gstffmpegmux.c
index cb5e356..aea29bc 100644 (file)
@@ -412,7 +412,7 @@ gst_ffmpegmux_request_new_pad (GstElement * element,
   gchar *padname;
   GstPad *pad;
   AVStream *st;
-  enum CodecType type;
+  enum AVMediaType type;
   gint bitrate = 0, framesize = 0;
 
   g_return_val_if_fail (templ != NULL, NULL);
@@ -422,12 +422,12 @@ gst_ffmpegmux_request_new_pad (GstElement * element,
   /* figure out a name that *we* like */
   if (templ == gst_element_class_get_pad_template (klass, "video_%d")) {
     padname = g_strdup_printf ("video_%d", ffmpegmux->videopads++);
-    type = CODEC_TYPE_VIDEO;
+    type = AVMEDIA_TYPE_VIDEO;
     bitrate = 64 * 1024;
     framesize = 1152;
   } else if (templ == gst_element_class_get_pad_template (klass, "audio_%d")) {
     padname = g_strdup_printf ("audio_%d", ffmpegmux->audiopads++);
-    type = CODEC_TYPE_AUDIO;
+    type = AVMEDIA_TYPE_AUDIO;
     bitrate = 285 * 1024;
   } else {
     g_warning ("ffmux: unknown pad template!");
@@ -543,7 +543,12 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
   GSList *collected;
   GstFFMpegMuxPad *best_pad;
   GstClockTime best_time;
+#if 0
+  /* Re-enable once converted to new AVMetaData API
+   * See #566605
+   */
   const GstTagList *tags;
+#endif
 
   /* open "file" (gstreamer protocol to next element) */
   if (!ffmpegmux->opened) {
@@ -560,12 +565,12 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
       if (st->codec->codec_id == CODEC_ID_NONE) {
         GST_ELEMENT_ERROR (ffmpegmux, CORE, NEGOTIATION, (NULL),
             ("no caps set on stream %d (%s)", collect_pad->padnum,
-                (st->codec->codec_type == CODEC_TYPE_VIDEO) ?
+                (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) ?
                 "video" : "audio"));
         return GST_FLOW_ERROR;
       }
       /* set framerate for audio */
-      if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+      if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
         switch (st->codec->codec_id) {
           case CODEC_ID_PCM_S16LE:
           case CODEC_ID_PCM_S16BE:
@@ -594,6 +599,11 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
       }
     }
 
+#if 0
+    /* Re-enable once converted to new AVMetaData API
+     * See #566605
+     */
+
     /* tags */
     tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (ffmpegmux));
     if (tags) {
@@ -629,6 +639,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
         ffmpegmux->context->track = i;
       }
     }
+#endif
 
     /* set the streamheader flag for gstffmpegprotocol if codec supports it */
     if (!strcmp (ffmpegmux->context->oformat->name, "flv")) {
@@ -747,7 +758,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
     pkt.flags = 0;
 
     if (!GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT))
-      pkt.flags |= PKT_FLAG_KEY;
+      pkt.flags |= AV_PKT_FLAG_KEY;
 
     if (GST_BUFFER_DURATION_IS_VALID (buf))
       pkt.duration =