slomo gst-plugins-bad: gst-plugins-bad/ gst-plugins-bad/gst/mxf/
[email protected] Sun, 7 Dec 2008 12:12:48 -0800 (PST)
| Newsgroups | gmane.comp.video.gstreamer.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVS Root: /cvs/gstreamer
Module: gst-plugins-bad
Changes by: slomo
Date: Sun Dec 07 2008 20:12:48 UTC
Log message:
* gst/mxf/mxfdemux.c: (gst_mxf_demux_pad_finalize),
(gst_mxf_demux_pad_class_init), (gst_mxf_demux_pad_init),
(gst_mxf_demux_remove_pad), (gst_mxf_demux_reset_metadata),
(gst_mxf_demux_combine_flows),
(gst_mxf_demux_handle_header_metadata_resolve_references),
(gst_mxf_demux_handle_header_metadata_update_streams),
(gst_mxf_demux_handle_generic_container_essence_element),
(gst_mxf_demux_pull_random_index_pack), (gst_mxf_demux_loop),
(gst_mxf_demux_src_query):
Rename GstMXFPad to GstMXFDemuxPad to prevent name clashes
with the GstMXFMuxPad in the muxer (later).
Pull the random index pack only directly after skipping the run
in and don't allocate an array for it if parsing it failed.
Modified files:
. : ChangeLog
gst/mxf : mxfdemux.c
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3798&r2=1.3799
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/mxf/mxfdemux.c.diff?r1=1.31&r2=1.32
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v
retrieving revision 1.3798
retrieving revision 1.3799
diff -u -d -r1.3798 -r1.3799
--- ChangeLog 7 Dec 2008 18:52:53 -0000 1.3798
+++ ChangeLog 7 Dec 2008 20:12:31 -0000 1.3799
@@ -1,5 +1,22 @@
2008-12-07 Sebastian Dröge <[email protected]>
+ * gst/mxf/mxfdemux.c: (gst_mxf_demux_pad_finalize),
+ (gst_mxf_demux_pad_class_init), (gst_mxf_demux_pad_init),
+ (gst_mxf_demux_remove_pad), (gst_mxf_demux_reset_metadata),
+ (gst_mxf_demux_combine_flows),
+ (gst_mxf_demux_handle_header_metadata_resolve_references),
+ (gst_mxf_demux_handle_header_metadata_update_streams),
+ (gst_mxf_demux_handle_generic_container_essence_element),
+ (gst_mxf_demux_pull_random_index_pack), (gst_mxf_demux_loop),
+ (gst_mxf_demux_src_query):
+ Rename GstMXFPad to GstMXFDemuxPad to prevent name clashes
+ with the GstMXFMuxPad in the muxer (later).
+
+ Pull the random index pack only directly after skipping the run
+ in and don't allocate an array for it if parsing it failed.
+2008-12-07 Sebastian Dröge <[email protected]>
* gst/mxf/mxfd10.c: (mxf_d10_sound_handle_essence_element),
(mxf_d10_create_caps):
Use the mapping data for storing the channel count and the
Index: mxfdemux.c
RCS file: /cvs/gstreamer/gst-plugins-bad/gst/mxf/mxfdemux.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- mxfdemux.c 7 Dec 2008 17:16:28 -0000 1.31
+++ mxfdemux.c 7 Dec 2008 20:12:33 -0000 1.32
@@ -56,10 +56,10 @@
GST_DEBUG_CATEGORY_STATIC (mxfdemux_debug);
#define GST_CAT_DEFAULT mxfdemux_debug
-#define GST_TYPE_MXF_PAD (gst_mxf_pad_get_type())
-#define GST_MXF_PAD(pad) (G_TYPE_CHECK_INSTANCE_CAST((pad),GST_TYPE_MXF_PAD,GstMXFPad))
-#define GST_MXF_PAD_CAST(pad) ((GstMXFPad *) pad)
-#define GST_IS_MXF_PAD(pad) (G_TYPE_CHECK_INSTANCE_TYPE((pad),GST_TYPE_MXF_PAD))
+#define GST_TYPE_MXF_DEMUX_PAD (gst_mxf_demux_pad_get_type())
+#define GST_MXF_DEMUX_PAD(pad) (G_TYPE_CHECK_INSTANCE_CAST((pad),GST_TYPE_MXF_DEMUX_PAD,GstMXFDemuxPad))
+#define GST_MXF_DEMUX_PAD_CAST(pad) ((GstMXFDemuxPad *) pad)
+#define GST_IS_MXF_DEMUX_PAD(pad) (G_TYPE_CHECK_INSTANCE_TYPE((pad),GST_TYPE_MXF_DEMUX_PAD))
typedef struct
{
@@ -86,20 +86,20 @@
MXFMetadataTrack *source_track;
GstCaps *caps;
-} GstMXFPad;
+} GstMXFDemuxPad;
GstPadClass parent;
-} GstMXFPadClass;
+} GstMXFDemuxPadClass;
-G_DEFINE_TYPE (GstMXFPad, gst_mxf_pad, GST_TYPE_PAD);
+G_DEFINE_TYPE (GstMXFDemuxPad, gst_mxf_demux_pad, GST_TYPE_PAD);
static void
-gst_mxf_pad_finalize (GObject * object)
+gst_mxf_demux_pad_finalize (GObject * object)
- GstMXFPad *pad = GST_MXF_PAD (object);
+ GstMXFDemuxPad *pad = GST_MXF_DEMUX_PAD (object);
gst_caps_replace (&pad->caps, NULL);
@@ -111,19 +111,19 @@
pad->tags = NULL;
}
- G_OBJECT_CLASS (gst_mxf_pad_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gst_mxf_demux_pad_parent_class)->finalize (object);
}
-gst_mxf_pad_class_init (GstMXFPadClass * klass)
+gst_mxf_demux_pad_class_init (GstMXFDemuxPadClass * klass)
GObjectClass *gobject_class = (GObjectClass *) klass;
- gobject_class->finalize = gst_mxf_pad_finalize;
+ gobject_class->finalize = gst_mxf_demux_pad_finalize;
-gst_mxf_pad_init (GstMXFPad * pad)
+gst_mxf_demux_pad_init (GstMXFDemuxPad * pad)
pad->last_flow = GST_FLOW_OK;
@@ -158,7 +158,7 @@
-gst_mxf_demux_remove_pad (GstMXFPad * pad, GstMXFDemux * demux)
+gst_mxf_demux_remove_pad (GstMXFDemuxPad * pad, GstMXFDemux * demux)
gst_element_remove_pad (GST_ELEMENT (demux), GST_PAD (pad));
@@ -196,7 +196,7 @@
if (demux->src) {
for (i = 0; i < demux->src->len; i++) {
- GstMXFPad *pad = g_ptr_array_index (demux->src, i);
+ GstMXFDemuxPad *pad = g_ptr_array_index (demux->src, i);
pad->material_track = NULL;
pad->material_package = NULL;
@@ -433,7 +433,7 @@
static GstFlowReturn
gst_mxf_demux_combine_flows (GstMXFDemux * demux,
- GstMXFPad * pad, GstFlowReturn ret)
+ GstMXFDemuxPad * pad, GstFlowReturn ret)
guint i;
@@ -447,7 +447,7 @@
/* only return NOT_LINKED if all other pads returned NOT_LINKED */
g_assert (demux->src->len != 0);
for (i = 0; i < demux->src->len; i++) {
- GstMXFPad *opad = g_ptr_array_index (demux->src, i);
+ GstMXFDemuxPad *opad = g_ptr_array_index (demux->src, i);
if (opad == NULL)
continue;
@@ -1748,7 +1748,7 @@
MXFMetadataStructuralComponent *component = NULL;
MXFMetadataGenericPackage *source_package = NULL;
MXFMetadataTrack *source_track = NULL;
- GstMXFPad *pad = NULL;
+ GstMXFDemuxPad *pad = NULL;
GstCaps *caps = NULL;
GST_DEBUG_OBJECT (demux, "Handling track %u", i);
@@ -1822,7 +1822,7 @@
if (demux->src && demux->src->len > 0) {
/* Find pad from track_id */
for (j = 0; j < demux->src->len; j++) {
- GstMXFPad *tmp = g_ptr_array_index (demux->src, j);
+ GstMXFDemuxPad *tmp = g_ptr_array_index (demux->src, j);
if (tmp->track_id == track->track_id) {
pad = tmp;
@@ -1843,7 +1843,7 @@
g_assert (templ != NULL);
/* Create pad */
- pad = (GstMXFPad *) g_object_new (GST_TYPE_MXF_PAD,
+ pad = (GstMXFDemuxPad *) g_object_new (GST_TYPE_MXF_DEMUX_PAD,
"name", pad_name, "direction", GST_PAD_SRC, "template", templ, NULL);
pad->need_segment = TRUE;
g_free (pad_name);
@@ -2120,7 +2120,7 @@
GstFlowReturn ret = GST_FLOW_OK;
guint32 track_number;
guint i, j;
- GstMXFPad *pad = NULL;
+ GstMXFDemuxPad *pad = NULL;
GstBuffer *inbuf;
GstBuffer *outbuf = NULL;
@@ -2151,7 +2151,7 @@
track_number = GST_READ_UINT32_BE (&key->u[12]);
- GstMXFPad *p = g_ptr_array_index (demux->src, i);
+ GstMXFDemuxPad *p = g_ptr_array_index (demux->src, i);
if (p->source_track->track_number == track_number ||
(p->source_track->track_number == 0 &&
@@ -2402,7 +2402,7 @@
if (!gst_pad_query_peer_duration (demux->sinkpad, &fmt, &filesize) ||
fmt != GST_FORMAT_BYTES || filesize == -1) {
GST_DEBUG_OBJECT (demux, "Can't query upstream size");
- goto out;
+ return;
g_assert (filesize > 4);
@@ -2411,7 +2411,7 @@
gst_mxf_demux_pull_range (demux, filesize - 4, 4,
&buffer)) != GST_FLOW_OK) {
GST_DEBUG_OBJECT (demux, "Failed pulling last 4 bytes");
pack_size = GST_READ_UINT32_BE (GST_BUFFER_DATA (buffer));
@@ -2420,17 +2420,17 @@
if (pack_size < 20) {
GST_DEBUG_OBJECT (demux, "Too small pack size (%u bytes)", pack_size);
} else if (pack_size > filesize - 20) {
GST_DEBUG_OBJECT (demux, "Too large pack size (%u bytes)", pack_size);
if ((ret =
gst_mxf_demux_pull_range (demux, filesize - pack_size, 16,
GST_DEBUG_OBJECT (demux, "Failed pulling random index pack key");
memcpy (&key, GST_BUFFER_DATA (buffer), 16);
@@ -2438,7 +2438,7 @@
if (!mxf_is_random_index_pack (&key)) {
GST_DEBUG_OBJECT (demux, "No random index pack");
demux->offset = filesize - pack_size;
@@ -2446,17 +2446,12 @@
gst_mxf_demux_pull_klv_packet (demux, filesize - pack_size, &key,
&buffer, NULL)) != GST_FLOW_OK) {
GST_DEBUG_OBJECT (demux, "Failed pulling random index pack");
gst_mxf_demux_handle_random_index_pack (demux, &key, buffer);
gst_buffer_unref (buffer);
demux->offset = old_offset;
-
-out:
- if (!demux->partition_index)
- demux->partition_index =
- g_array_new (FALSE, FALSE, sizeof (MXFRandomIndexPackEntry));
@@ -2744,19 +2739,17 @@
demux->offset++;
gst_buffer_unref (buffer);
}
- }
- if (G_UNLIKELY (ret != GST_FLOW_OK))
- goto pause;
+ if (G_UNLIKELY (ret != GST_FLOW_OK))
+ goto pause;
- if (G_UNLIKELY (demux->run_in == -1)) {
- GST_ERROR_OBJECT (demux, "No valid header partition pack found");
- ret = GST_FLOW_ERROR;
+ if (G_UNLIKELY (demux->run_in == -1)) {
+ GST_ERROR_OBJECT (demux, "No valid header partition pack found");
+ ret = GST_FLOW_ERROR;
+ }
- /* First of all pull&parse the random index pack at EOF */
- if (!demux->partition_index) {
+ /* First of all pull&parse the random index pack at EOF */
gst_mxf_demux_pull_random_index_pack (demux);
@@ -3001,7 +2994,7 @@
GstMXFDemux *demux = GST_MXF_DEMUX (gst_pad_get_parent (pad));
gboolean ret = FALSE;
- GstMXFPad *mxfpad = GST_MXF_PAD (pad);
+ GstMXFDemuxPad *mxfpad = GST_MXF_DEMUX_PAD (pad);
GST_DEBUG_OBJECT (pad, "handling query %s",
gst_query_type_get_name (GST_QUERY_TYPE (query)));
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
gstreamer-cvs-verbose mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs-verbose