Title: [152710] trunk/Source/WebCore
Revision
152710
Author
[email protected]
Date
2013-07-16 02:50:24 -0700 (Tue, 16 Jul 2013)

Log Message

[GStreamer] verify and log the received caps in the video sink
https://bugs.webkit.org/show_bug.cgi?id=118559

Patch by Víctor Manuel Jáquez Leal <[email protected]> on 2013-07-16
Reviewed by Philippe Normand.

Verify the correctness of the received caps in the video sink, and
also log them for debugging purposes.

No new tests, no behavior change.

* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkSetCaps):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (152709 => 152710)


--- trunk/Source/WebCore/ChangeLog	2013-07-16 09:20:04 UTC (rev 152709)
+++ trunk/Source/WebCore/ChangeLog	2013-07-16 09:50:24 UTC (rev 152710)
@@ -1,3 +1,18 @@
+2013-07-16  Víctor Manuel Jáquez Leal  <[email protected]>
+
+        [GStreamer] verify and log the received caps in the video sink
+        https://bugs.webkit.org/show_bug.cgi?id=118559
+
+        Reviewed by Philippe Normand.
+
+        Verify the correctness of the received caps in the video sink, and
+        also log them for debugging purposes.
+
+        No new tests, no behavior change.
+
+        * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
+        (webkitVideoSinkSetCaps):
+
 2013-07-16  Kangil Han  <[email protected]>
 
         Use toHTMLSelectElement and dismiss isHTMLSelectElement

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp (152709 => 152710)


--- trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp	2013-07-16 09:20:04 UTC (rev 152709)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp	2013-07-16 09:50:24 UTC (rev 152710)
@@ -378,8 +378,19 @@
 
 static gboolean webkitVideoSinkSetCaps(GstBaseSink* baseSink, GstCaps* caps)
 {
-    WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv;
+    WebKitVideoSink* sink = WEBKIT_VIDEO_SINK(baseSink);
+    WebKitVideoSinkPrivate* priv = sink->priv;
 
+    GST_DEBUG_OBJECT(sink, "Current caps %" GST_PTR_FORMAT ", setting caps %" GST_PTR_FORMAT, priv->currentCaps, caps);
+
+#ifdef GST_API_VERSION_1
+    GstVideoInfo info;
+    if (!gst_video_info_from_caps(&info, caps)) {
+        GST_ERROR_OBJECT(sink, "Invalid caps %" GST_PTR_FORMAT, caps);
+        return FALSE;
+    }
+#endif
+
     gst_caps_replace(&priv->currentCaps, caps);
     return TRUE;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to