[clutter-gst: 11/11] VAAPI DEBUG



commit 95c7751a7c4ef44fc1c2345e75e8cec10385fb4d
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Sat May 31 12:39:26 2014 +0100

    VAAPI DEBUG

 clutter-gst/clutter-gst-video-sink.c |   24 +++++++++++++++++++++---
 examples/simple-player.js            |   10 ++++++++++
 2 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index db69028..6c81287 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -1727,6 +1727,8 @@ clutter_gst_build_caps (GSList *renderers)
 
   g_slist_foreach (renderers, append_cap, caps);
 
+  /* g_message ("Caps list : %s", gst_caps_to_string (caps)); */
+
   return caps;
 }
 
@@ -1758,12 +1760,19 @@ clutter_gst_video_sink_get_caps (GstBaseSink *bsink,
                                  GstCaps *filter)
 {
   ClutterGstVideoSink *sink;
+  GstCaps *ret;
   sink = CLUTTER_GST_VIDEO_SINK (bsink);
 
   if (sink->priv->caps == NULL)
-    return NULL;
+    ret = NULL;
+  else if (filter == NULL)
+    ret = gst_caps_ref (sink->priv->caps);
   else
-    return gst_caps_ref (sink->priv->caps);
+    ret = gst_caps_intersect (filter, sink->priv->caps);
+  g_message ("Filter %s |||||||||| Intersect result : %s",
+             gst_caps_to_string (filter), gst_caps_to_string (ret));
+
+  return ret;
 }
 
 static gboolean
@@ -1878,8 +1887,15 @@ clutter_gst_video_sink_set_caps (GstBaseSink *bsink,
   sink = CLUTTER_GST_VIDEO_SINK (bsink);
   priv = sink->priv;
 
+
   if (!clutter_gst_video_sink_parse_caps (caps, sink, FALSE))
-    return FALSE;
+    {
+      g_message ("Caps fail : %s", gst_caps_to_string (caps));
+      return FALSE;
+    }
+
+  g_message ("Caps success : %s", gst_caps_to_string (caps));
+
 
   g_mutex_lock (&priv->source->buffer_lock);
   priv->source->has_new_caps = TRUE;
@@ -2196,6 +2212,8 @@ clutter_gst_video_sink_propose_allocation (GstBaseSink *base_sink, GstQuery *que
 
   gst_query_parse_allocation (query, &caps, &need_pool);
 
+  g_message ("clutter video sink propose allocation!");
+
   gst_query_add_allocation_meta (query,
                                  GST_VIDEO_META_API_TYPE, NULL);
   gst_query_add_allocation_meta (query,
diff --git a/examples/simple-player.js b/examples/simple-player.js
index 9bd38d7..2d2eedf 100644
--- a/examples/simple-player.js
+++ b/examples/simple-player.js
@@ -18,8 +18,10 @@
  */
 
 const Lang = imports.lang;
+const Mainloop = imports.mainloop;
 const Clutter = imports.gi.Clutter;
 const ClutterGst = imports.gi.ClutterGst;
+const Gst = imports.gi.Gst;
 
 if (ARGV.length < 1)
     throw "Need 1 argument : simple-player.js videofile ";
@@ -52,4 +54,12 @@ stage.add_child(actor);
 
 stage.show();
 
+Mainloop.timeout_add(1000, function() {
+    log(player.get_pipeline());
+    Gst.debug_bin_to_dot_file_with_ts(player.get_pipeline(),
+                                      Gst.DebugGraphDetails.ALL,
+                                      "plop");
+    log('dumped.');
+});
+
 Clutter.main();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]