slomo gst-plugins-bad: gst-plugins-bad/ gst-plugins-bad/gst/mxf/
[email protected] Thu, 4 Dec 2008 00:51:02 -0800 (PST)
| Newsgroups | gmane.comp.video.gstreamer.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVS Root: /cvs/gstreamer
Module: gst-plugins-bad
Changes by: slomo
Date: Thu Dec 04 2008 08:51:02 UTC
Log message:
* gst/mxf/mxfparse.c:
(mxf_metadata_generic_picture_essence_descriptor_set_caps):
Fix setting of the height/width and PAR of video streams.
Modified files:
. : ChangeLog
gst/mxf : mxfparse.c
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3784&r2=1.3785
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/mxf/mxfparse.c.diff?r1=1.16&r2=1.17
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v
retrieving revision 1.3784
retrieving revision 1.3785
diff -u -d -r1.3784 -r1.3785
--- ChangeLog 4 Dec 2008 08:37:16 -0000 1.3784
+++ ChangeLog 4 Dec 2008 08:50:47 -0000 1.3785
@@ -1,5 +1,11 @@
2008-12-04 Sebastian Dröge <[email protected]>
+ * gst/mxf/mxfparse.c:
+ (mxf_metadata_generic_picture_essence_descriptor_set_caps):
+ Fix setting of the height/width and PAR of video streams.
+
+2008-12-04 Sebastian Dröge <[email protected]>
* gst/mxf/Makefile.am:
* gst/mxf/mxfd10.c: (mxf_is_d10_essence_track),
(mxf_d10_picture_handle_essence_element),
Index: mxfparse.c
RCS file: /cvs/gstreamer/gst-plugins-bad/gst/mxf/mxfparse.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- mxfparse.c 4 Dec 2008 08:37:18 -0000 1.16
+++ mxfparse.c 4 Dec 2008 08:50:48 -0000 1.17
@@ -2610,8 +2610,8 @@
void mxf_metadata_generic_picture_essence_descriptor_set_caps
(MXFMetadataGenericPictureEssenceDescriptor * descriptor, GstCaps * caps)
{
- /*guint par_n, par_d;
- guint width, height; */
+ guint par_n, par_d;
+ guint width, height;
MXFMetadataFileDescriptor *f = (MXFMetadataFileDescriptor *) descriptor;
g_return_if_fail (descriptor != NULL);
@@ -2620,13 +2620,18 @@
gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION, f->sample_rate.n,
f->sample_rate.d, NULL);
- return;
-
-/* FIXME: This sets wrong values for most (all?) files */
-#if 0
width = descriptor->stored_width;
height = descriptor->stored_height;
+ /* If the video is stored as separate fields the
+ * height is only the height of one field, i.e.
+ * half the height of the frame.
+ *
+ * See SMPTE 377M E2.2 and E1.2
+ */
+ if (descriptor->frame_layout == 1 || descriptor->frame_layout == 2)
+ height *= 2;
if (width == 0 || height == 0)
return;
@@ -2636,12 +2641,11 @@
if (descriptor->aspect_ratio.n == 0 || descriptor->aspect_ratio.d == 0)
- par_n = height * descriptor->aspect_ratio.d;
- par_d = width * descriptor->aspect_ratio.n;
+ par_n = height * descriptor->aspect_ratio.n;
+ par_d = width * descriptor->aspect_ratio.d;
gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION,
par_n, par_d, NULL);
-#endif
}
gboolean
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-cvs-verbose mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs-verbose