summaryrefslogtreecommitdiffstats
path: root/gst/matroska/ebml-read.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-06-18 10:28:20 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-06-18 10:28:20 +0000
commit6cf110c1e38db7612df9e86bad61e23471107477 (patch)
tree544776100b245150fc65273212af6ae78974a298 /gst/matroska/ebml-read.c
parente3141bbb49bd281fb1511ba958000c3f1471a6a3 (diff)
gst/matroska/matroska-demux.c: Improve debug output everywhere and fix the EOS logic.
Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_stream_from_num), (gst_matroska_demux_encoding_cmp), (gst_matroska_demux_encoding_order_unique), (gst_matroska_demux_read_track_encoding), (gst_matroska_demux_read_track_encodings), (gst_matroska_demux_tracknumber_unique), (gst_matroska_demux_add_stream), (gst_matroska_demux_init_stream), (gst_matroska_demux_parse_tracks), (gst_matroska_demux_parse_index_cuetrack), (gst_matroska_demux_parse_index_pointentry), (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_info), (gst_matroska_demux_parse_metadata_id_simple_tag), (gst_matroska_demux_parse_metadata_id_tag), (gst_matroska_demux_parse_metadata), (gst_matroska_demux_parse_attached_file), (gst_matroska_demux_parse_attachments), (gst_matroska_demux_parse_chapters), (gst_matroska_demux_sync_streams), (gst_matroska_decode_buffer), (gst_matroska_demux_parse_blockgroup_or_simpleblock), (gst_matroska_demux_parse_cluster), (gst_matroska_demux_parse_contents_seekentry), (gst_matroska_demux_parse_contents), (gst_matroska_demux_loop_stream_parse_id), (gst_matroska_demux_loop): Improve debug output everywhere and fix the EOS logic. Check the values of the ContentEncoding elements more strictly and don't use tracks for which it's invalid. Check that the track number is unique for this stream. Check that seek positions are below G_MAXINT64 as our seeks are int64-based and overflows will fail badly. After seeks also don't push SimpleBlocks until the first one containing a keyframe is found. Before this was done only for normal Blocks. Update some FIXME/TODOs. * gst/matroska/ebml-read.c: (gst_ebml_read_peek_bytes), (gst_ebml_read_utf8), (gst_ebml_read_header): Improve debug output. * gst/matroska/matroska-ids.c: (gst_matroska_track_init_video_context): * gst/matroska/matroska-ids.h: * gst/matroska/matroska-mux.c: (gst_matroska_mux_video_pad_setcaps): Remove eye mode and don't parse it anymore. We can't use that information in GStreamer yet so it's useless.
Diffstat (limited to 'gst/matroska/ebml-read.c')
-rw-r--r--gst/matroska/ebml-read.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gst/matroska/ebml-read.c b/gst/matroska/ebml-read.c
index 82d8217a..6ce679da 100644
--- a/gst/matroska/ebml-read.c
+++ b/gst/matroska/ebml-read.c
@@ -247,7 +247,7 @@ gst_ebml_read_peek_bytes (GstEbmlRead * ebml, guint size, GstBuffer ** p_buf,
gst_pad_pull_range (ebml->sinkpad, ebml->offset, size,
&ebml->cached_buffer);
if (ret != GST_FLOW_OK) {
- GST_DEBUG ("pull_range returned %d", ret);
+ GST_DEBUG_OBJECT (ebml, "pull_range returned %d", ret);
if (p_buf)
*p_buf = NULL;
if (bytes)
@@ -804,7 +804,8 @@ gst_ebml_read_utf8 (GstEbmlRead * ebml, guint32 * id, gchar ** str)
if (str != NULL && *str != NULL && **str != '\0' &&
!g_utf8_validate (*str, -1, NULL)) {
- GST_WARNING ("Invalid UTF-8 string at offset %" G_GUINT64_FORMAT, oldoff);
+ GST_WARNING_OBJECT (ebml,
+ "Invalid UTF-8 string at offset %" G_GUINT64_FORMAT, oldoff);
}
return ret;
@@ -942,6 +943,8 @@ gst_ebml_read_header (GstEbmlRead * ebml, gchar ** doctype, guint * version)
GST_ELEMENT_ERROR (ebml, STREAM, WRONG_TYPE, (NULL), (NULL));
return GST_FLOW_ERROR;
}
+
+ GST_DEBUG_OBJECT (ebml, "EbmlReadVersion: %" G_GUINT64_FORMAT, num);
break;
}
@@ -957,6 +960,7 @@ gst_ebml_read_header (GstEbmlRead * ebml, gchar ** doctype, guint * version)
GST_ELEMENT_ERROR (ebml, STREAM, WRONG_TYPE, (NULL), (NULL));
return GST_FLOW_ERROR;
}
+ GST_DEBUG_OBJECT (ebml, "EbmlMaxSizeLength: %" G_GUINT64_FORMAT, num);
break;
}
@@ -972,6 +976,7 @@ gst_ebml_read_header (GstEbmlRead * ebml, gchar ** doctype, guint * version)
GST_ELEMENT_ERROR (ebml, STREAM, WRONG_TYPE, (NULL), (NULL));
return GST_FLOW_ERROR;
}
+ GST_DEBUG_OBJECT (ebml, "EbmlMaxIdLength: %" G_GUINT64_FORMAT, num);
break;
}
@@ -982,6 +987,9 @@ gst_ebml_read_header (GstEbmlRead * ebml, gchar ** doctype, guint * version)
if (ret != GST_FLOW_OK)
return ret;
g_assert (id == GST_EBML_ID_DOCTYPE);
+
+ GST_DEBUG_OBJECT (ebml, "EbmlDocType: %s", GST_STR_NULL (text));
+
if (doctype) {
g_free (*doctype);
*doctype = text;
@@ -999,11 +1007,13 @@ gst_ebml_read_header (GstEbmlRead * ebml, gchar ** doctype, guint * version)
g_assert (id == GST_EBML_ID_DOCTYPEREADVERSION);
if (version)
*version = num;
+ GST_DEBUG_OBJECT (ebml, "EbmlReadVersion: %" G_GUINT64_FORMAT, num);
break;
}
default:
- GST_WARNING ("Unknown data type 0x%x in EBML header (ignored)", id);
+ GST_WARNING_OBJECT (ebml,
+ "Unknown data type 0x%x in EBML header (ignored)", id);
/* pass-through */
/* we ignore these two, as they don't tell us anything we care about */