mnauw gst-plugins-good: gst-plugins-good/ gst-plugins-good/gst/matroska/
[email protected] Tue, 6 Jan 2009 09:48:24 -0800 (PST)
| Newsgroups | gmane.comp.video.gstreamer.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVS Root: /cvs/gstreamer
Module: gst-plugins-good
Changes by: mnauw
Date: Tue Jan 06 2009 17:48:24 UTC
Log message:
* gst/matroska/matroska-mux.c: (gst_matroska_mux_reset),
(gst_matroska_mux_handle_sink_event), (gst_matroska_mux_finish):
* gst/matroska/matroska-mux.h:
Remove internal taglist and fully use tagsetter interface.
Modified files:
. : ChangeLog
gst/matroska : matroska-mux.c matroska-mux.h
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3884&r2=1.3885
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/matroska/matroska-mux.c.diff?r1=1.77&r2=1.78
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/matroska/matroska-mux.h.diff?r1=1.16&r2=1.17
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v
retrieving revision 1.3884
retrieving revision 1.3885
diff -u -d -r1.3884 -r1.3885
--- ChangeLog 6 Jan 2009 14:50:26 -0000 1.3884
+++ ChangeLog 6 Jan 2009 17:48:05 -0000 1.3885
@@ -1,5 +1,12 @@
2009-01-06 Mark Nauwelaerts <[email protected]>
+ * gst/matroska/matroska-mux.c: (gst_matroska_mux_reset),
+ (gst_matroska_mux_handle_sink_event), (gst_matroska_mux_finish):
+ * gst/matroska/matroska-mux.h:
+ Remove internal taglist and fully use tagsetter interface.
+
+2009-01-06 Mark Nauwelaerts <[email protected]>
* gst/avi/gstavimux.c: (gst_avi_mux_reset),
(gst_avi_mux_riff_get_avi_header):
* gst/avi/gstavimux.h:
Index: matroska-mux.c
RCS file: /cvs/gstreamer/gst-plugins-good/gst/matroska/matroska-mux.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- matroska-mux.c 5 Dec 2008 09:24:18 -0000 1.77
+++ matroska-mux.c 6 Jan 2009 17:48:09 -0000 1.78
@@ -463,10 +463,7 @@
mux->cluster_pos = 0;
/* reset tags */
- if (mux->tags) {
- gst_tag_list_free (mux->tags);
- mux->tags = NULL;
- }
+ gst_tag_setter_reset_tags (GST_TAG_SETTER (mux));
}
/**
@@ -518,7 +515,9 @@
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_TAG:
+ GST_DEBUG_OBJECT (mux, "received tag event");
gst_event_parse_tag (event, &list);
collect_pad = (GstMatroskaPad *) gst_pad_get_element_private (pad);
g_assert (collect_pad);
context = collect_pad->track;
@@ -528,12 +527,8 @@
* 639-2 according to matroska specs, but it will have to do for now */
gst_tag_list_get_string (list, GST_TAG_LANGUAGE_CODE, &context->language);
- if (mux->tags) {
- gst_tag_list_insert (mux->tags, list, GST_TAG_MERGE_PREPEND);
- } else {
- mux->tags = gst_tag_list_copy (list);
- }
-
+ gst_tag_setter_merge_tags (GST_TAG_SETTER (mux), list,
+ gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (mux)));
break;
case GST_EVENT_NEWSEGMENT:
/* We don't support NEWSEGMENT events */
@@ -1801,7 +1796,7 @@
guint64 pos;
guint64 duration = 0;
GSList *collected;
- GstTagList *tags;
+ const GstTagList *tags;
/* finish last cluster */
if (mux->cluster) {
@@ -1838,10 +1833,9 @@
}
/* tags */
- tags = gst_tag_list_merge (gst_tag_setter_get_tag_list (GST_TAG_SETTER (mux)),
- mux->tags, GST_TAG_MERGE_APPEND);
+ tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (mux));
- if (tags != NULL) {
+ if (tags != NULL && !gst_tag_list_is_empty (tags)) {
guint64 master_tags, master_tag;
GST_DEBUG ("Writing tags");
@@ -1853,7 +1847,6 @@
gst_tag_list_foreach (tags, gst_matroska_mux_write_simple_tag, ebml);
gst_ebml_write_master_finish (ebml, master_tag);
gst_ebml_write_master_finish (ebml, master_tags);
- gst_tag_list_free (tags);
/* update seekhead. We know that:
Index: matroska-mux.h
RCS file: /cvs/gstreamer/gst-plugins-good/gst/matroska/matroska-mux.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- matroska-mux.h 5 Dec 2008 09:24:18 -0000 1.16
+++ matroska-mux.h 6 Jan 2009 17:48:10 -0000 1.17
@@ -131,8 +131,6 @@
cluster_time,
cluster_pos;
- /* tags */
- GstTagList *tags;
} GstMatroskaMux;
typedef struct _GstMatroskaMuxClass {
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB