diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-07-10 11:40:40 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-07-10 11:40:40 +0200 |
commit | 1c4ec02be987edc92406e3741e33357a44960829 (patch) | |
tree | b5a82296561c7cc1cc6a4f3dc93ee8fa4756c775 /gst/debugutils/progressreport.c | |
parent | 3b4afcb8df250228513f9b8fc4ee1f2596f20c78 (diff) |
debug: port to 0.11, disable others
Diasable the efence and capsdebug elements, port them later.
Diffstat (limited to 'gst/debugutils/progressreport.c')
-rw-r--r-- | gst/debugutils/progressreport.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/gst/debugutils/progressreport.c b/gst/debugutils/progressreport.c index 88ff45b66..37fb8b0c8 100644 --- a/gst/debugutils/progressreport.c +++ b/gst/debugutils/progressreport.c @@ -247,8 +247,7 @@ gst_progress_report_do_query (GstProgressReport * filter, GstFormat format, GstBaseTransform *base = GST_BASE_TRANSFORM (filter); GST_LOG_OBJECT (filter, "using buffer metadata"); - if (format == GST_FORMAT_TIME && base->have_newsegment && - base->segment.format == GST_FORMAT_TIME) { + if (format == GST_FORMAT_TIME && base->segment.format == GST_FORMAT_TIME) { cur = gst_segment_to_stream_time (&base->segment, format, GST_BUFFER_TIMESTAMP (buf)); total = base->segment.duration; @@ -276,17 +275,20 @@ gst_progress_report_do_query (GstProgressReport * filter, GstFormat format, GstCaps *caps; format_name = "bogounits"; - caps = GST_PAD_CAPS (GST_BASE_TRANSFORM (filter)->sinkpad); - if (caps && gst_caps_is_fixed (caps) && !gst_caps_is_any (caps)) { - GstStructure *s = gst_caps_get_structure (caps, 0); - const gchar *mime_type = gst_structure_get_name (s); - - if (g_str_has_prefix (mime_type, "video/") || - g_str_has_prefix (mime_type, "image/")) { - format_name = "frames"; - } else if (g_str_has_prefix (mime_type, "audio/")) { - format_name = "samples"; + caps = gst_pad_get_current_caps (GST_BASE_TRANSFORM (filter)->sinkpad); + if (caps) { + if (gst_caps_is_fixed (caps) && !gst_caps_is_any (caps)) { + GstStructure *s = gst_caps_get_structure (caps, 0); + const gchar *mime_type = gst_structure_get_name (s); + + if (g_str_has_prefix (mime_type, "video/") || + g_str_has_prefix (mime_type, "image/")) { + format_name = "frames"; + } else if (g_str_has_prefix (mime_type, "audio/")) { + format_name = "samples"; + } } + gst_caps_unref (caps); } break; } |