slomo gst-plugins-bad: gst-plugins-bad/ gst-plugins-bad/gst/mxf/

[email protected]
Newsgroups gmane.comp.video.gstreamer.cvs
Message-ID <[email protected]>
CVS Root:       /cvs/gstreamer
Module:         gst-plugins-bad
Changes by:     slomo
Date:           Thu Nov 27 2008  08:49:22 UTC

Log message:
* gst/mxf/mxfdemux.c: (gst_mxf_demux_reset),
(gst_mxf_demux_handle_klv_packet):
* gst/mxf/mxfdemux.h:
Only try to pull the footer metadata once and not on every KLV packet
if it failed before.

Modified files:
    .               : ChangeLog
    gst/mxf         : mxfdemux.c mxfdemux.h

Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3750&r2=1.3751
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/mxf/mxfdemux.c.diff?r1=1.9&r2=1.10
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/mxf/mxfdemux.h.diff?r1=1.2&r2=1.3

====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v
retrieving revision 1.3750
retrieving revision 1.3751
diff -u -d -r1.3750 -r1.3751
--- ChangeLog	26 Nov 2008 12:40:17 -0000	1.3750
+++ ChangeLog	27 Nov 2008 08:49:06 -0000	1.3751
@@ -1,3 +1,11 @@
+2008-11-27  Sebastian Dröge  <[email protected]>
+
+	* gst/mxf/mxfdemux.c: (gst_mxf_demux_reset),
+	(gst_mxf_demux_handle_klv_packet):
+	* gst/mxf/mxfdemux.h:
+	Only try to pull the footer metadata once and not on every KLV packet
+	if it failed before.
 2008-11-26  Wim Taymans  <[email protected]>
 
 	* gst/rtpmanager/rtpsession.c: (obtain_source),
Index: mxfdemux.c
RCS file: /cvs/gstreamer/gst-plugins-bad/gst/mxf/mxfdemux.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- mxfdemux.c	26 Nov 2008 11:30:28 -0000	1.9
+++ mxfdemux.c	27 Nov 2008 08:49:07 -0000	1.10
@@ -363,6 +363,8 @@
   demux->footer_partition_pack_offset = 0;
   demux->offset = 0;
+  demux->pull_footer_metadata = TRUE;
   demux->run_in = -1;
   memset (&demux->current_package_uid, 0, sizeof (MXFUMID));
@@ -1272,8 +1274,9 @@
           MXFMetadataEssenceContainerData, i);
       for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
-        if (mxf_ul_is_equal (&demux->content_storage.
-                essence_container_data_uids[j], &data->instance_uid)) {
+        if (mxf_ul_is_equal (&demux->
+                content_storage.essence_container_data_uids[j],
+                &data->instance_uid)) {
           demux->content_storage.essence_container_data[j] = data;
           break;
         }
@@ -2369,13 +2372,15 @@
   GstFlowReturn ret = GST_FLOW_OK;
   /* In pull mode try to get the last metadata */
-  if (!demux->final_metadata && demux->random_access && demux->partition.valid
+  if (demux->pull_footer_metadata && !demux->final_metadata
+      && demux->random_access && demux->partition.valid
       && demux->partition.type == MXF_PARTITION_PACK_HEADER
       && (!demux->partition.closed || !demux->partition.complete)
       && demux->footer_partition_pack_offset != 0) {
     GST_DEBUG_OBJECT (demux,
         "Open or incomplete header partition, trying to get final metadata from the last partitions");
     gst_mxf_demux_parse_footer_metadata (demux);
+    demux->pull_footer_metadata = FALSE;
   }
   /* TODO: - Pull random index pack from footer partition?
Index: mxfdemux.h
RCS file: /cvs/gstreamer/gst-plugins-bad/gst/mxf/mxfdemux.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mxfdemux.h	25 Nov 2008 10:26:11 -0000	1.2
+++ mxfdemux.h	27 Nov 2008 08:49:08 -0000	1.3
@@ -70,6 +70,7 @@
   /* Structural metadata */
   gboolean update_metadata;
   gboolean final_metadata;
+  gboolean pull_footer_metadata;
   MXFMetadataPreface preface;
   GArray *identification;
   MXFMetadataContentStorage content_storage;

-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.