diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@collabora.co.uk> | 2011-04-09 14:20:20 -0400 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-04-11 00:17:21 +0200 |
commit | ed5397edd9d230084733d8eb921fd7b98e5da935 (patch) | |
tree | 3941be25077643140995d43afcd95d02a0f28367 | |
parent | fe8e95230cda423bd7d7d541004455af8b6f43c8 (diff) |
WIP: use gst_caps_can_intersect()
-rw-r--r-- | gstplayer/GstMetadataRetrieverDriver.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/gstplayer/GstMetadataRetrieverDriver.cpp b/gstplayer/GstMetadataRetrieverDriver.cpp index ff9921d..11759d6 100644 --- a/gstplayer/GstMetadataRetrieverDriver.cpp +++ b/gstplayer/GstMetadataRetrieverDriver.cpp @@ -216,17 +216,14 @@ GstMetadataRetrieverDriver::setDataSource (const char *url) GstMetadataRetrieverDriver::have_video_caps (GstElement * uridecodebin, GstCaps * caps) { - GstCaps *intersection, *video_caps; + GstCaps *video_caps; gboolean res; video_caps = gst_static_caps_get (&static_have_video_caps); GST_OBJECT_LOCK (uridecodebin); - intersection = gst_caps_intersect (caps, video_caps); + res = gst_caps_can_intersect (caps, video_caps); GST_OBJECT_UNLOCK (uridecodebin); - res = !(gst_caps_is_empty (intersection)); - - gst_caps_unref (intersection); gst_caps_unref (video_caps); return res; } @@ -235,18 +232,14 @@ GstMetadataRetrieverDriver::have_video_caps (GstElement * uridecodebin, GstMetadataRetrieverDriver::are_audio_caps (GstElement * uridecodebin, GstCaps * caps) { - GstCaps *intersection, *end_caps; - + GstCaps *end_caps; gboolean res; end_caps = gst_static_caps_get (&static_audio_caps); GST_OBJECT_LOCK (uridecodebin); - intersection = gst_caps_intersect (caps, end_caps); + res = gst_caps_can_intersect (caps, end_caps); GST_OBJECT_UNLOCK (uridecodebin); - res = (gst_caps_is_empty (intersection)); - - gst_caps_unref (intersection); gst_caps_unref (end_caps); return res; } @@ -256,17 +249,14 @@ gboolean GstMetadataRetrieverDriver::are_video_caps (GstElement * uridecodebin, GstCaps * caps) { - GstCaps *intersection, *end_caps; + GstCaps *end_caps; gboolean res; end_caps = gst_static_caps_get (&static_video_caps); GST_OBJECT_LOCK (uridecodebin); - intersection = gst_caps_intersect (caps, end_caps); + res = gst_caps_can_intersect (caps, end_caps); GST_OBJECT_UNLOCK (uridecodebin); - res = (gst_caps_is_empty (intersection)); - - gst_caps_unref (intersection); gst_caps_unref (end_caps); return res; } |