fix interlace-mode

This commit is contained in:
Wim Taymans 2012-06-26 17:09:25 +02:00
parent 1718697ae2
commit f28e2e7bea
2 changed files with 8 additions and 7 deletions

View file

@ -536,11 +536,11 @@ setup_dirac_mapper (GstOggStream * pad, ogg_packet * packet)
pad->caps = gst_caps_new_simple ("video/x-dirac",
"width", G_TYPE_INT, header.width,
"height", G_TYPE_INT, header.height,
"interlaced", G_TYPE_BOOLEAN, header.interlaced,
"pixel-aspect-ratio", GST_TYPE_FRACTION,
header.aspect_ratio_numerator, header.aspect_ratio_denominator,
"framerate", GST_TYPE_FRACTION, header.frame_rate_numerator,
header.frame_rate_denominator, NULL);
"interlace-mode", G_TYPE_STRING,
(header.interlaced ? "mixed" : "progressive"), "pixel-aspect-ratio",
GST_TYPE_FRACTION, header.aspect_ratio_numerator,
header.aspect_ratio_denominator, "framerate", GST_TYPE_FRACTION,
header.frame_rate_numerator, header.frame_rate_denominator, NULL);
return TRUE;
}

View file

@ -330,8 +330,9 @@ gst_video_test_src_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
if (gst_structure_has_field (structure, "chroma-site"))
gst_structure_fixate_field_string (structure, "chroma-site", "mpeg2");
if (gst_structure_has_field (structure, "interlaced"))
gst_structure_fixate_field_boolean (structure, "interlaced", FALSE);
if (gst_structure_has_field (structure, "interlace-mode"))
gst_structure_fixate_field_string (structure, "interlace-mode",
"progressive");
caps = GST_BASE_SRC_CLASS (parent_class)->fixate (bsrc, caps);