matroskamux: Write interlaced flag if the input video content is interlaced
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 1 May 2010 12:12:28 +0000 (14:12 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 1 May 2010 12:13:24 +0000 (14:13 +0200)
Unfortunately Matroska has no way to specify TFF and friends...

gst/matroska/matroska-mux.c

index ce189d7..beda471 100644 (file)
@@ -661,6 +661,7 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
   const GstBuffer *codec_buf = NULL;
   gint width, height, pixel_width, pixel_height;
   gint fps_d, fps_n;
+  gboolean interlaced = FALSE;
 
   mux = GST_MATROSKA_MUX (GST_PAD_PARENT (pad));
 
@@ -677,6 +678,10 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
 
   mimetype = gst_structure_get_name (structure);
 
+  if (gst_structure_get_boolean (structure, "interlaced", &interlaced)
+      && interlaced)
+    context->flags |= GST_MATROSKA_VIDEOTRACK_INTERLACED;
+
   if (!strcmp (mimetype, "video/x-theora")) {
     /* we'll extract the details later from the theora identification header */
     goto skip_details;