playbin2: move marshaller to screenshot
authorWim Taymans <wim.taymans@collabora.co.uk>
Sat, 5 Jun 2010 09:02:24 +0000 (11:02 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Sat, 5 Jun 2010 09:09:41 +0000 (11:09 +0200)
Move the marshaller for the convert_frame signal to the screenshot file in
preparation for moving it to playsink.

See #620279

gst/playback/gstplaybin2.c
gst/playback/gstscreenshot.c
gst/playback/gstscreenshot.h

index c46b45f..00c2a79 100644 (file)
 #include "gstplayback.h"
 #include "gstplaysink.h"
 #include "gstfactorylists.h"
+#include "gstscreenshot.h"
 #include "gstinputselector.h"
 #include "gstsubtitleoverlay.h"
 
@@ -568,38 +569,6 @@ if (id) {                                \
   id = 0;                                \
 }
 
-static void
-gst_play_marshal_BUFFER__BOXED (GClosure * closure,
-    GValue * return_value G_GNUC_UNUSED,
-    guint n_param_values,
-    const GValue * param_values,
-    gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
-{
-  typedef GstBuffer *(*GMarshalFunc_OBJECT__BOXED) (gpointer data1,
-      gpointer arg_1, gpointer data2);
-  register GMarshalFunc_OBJECT__BOXED callback;
-  register GCClosure *cc = (GCClosure *) closure;
-  register gpointer data1, data2;
-  GstBuffer *v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure)) {
-    data1 = closure->data;
-    data2 = g_value_peek_pointer (param_values + 0);
-  } else {
-    data1 = g_value_peek_pointer (param_values + 0);
-    data2 = closure->data;
-  }
-  callback =
-      (GMarshalFunc_OBJECT__BOXED) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1, g_value_get_boxed (param_values + 1), data2);
-
-  gst_value_take_buffer (return_value, v_return);
-}
-
 static GType
 gst_play_bin_get_type (void)
 {
@@ -2441,8 +2410,8 @@ _playsink_sink_event_probe_cb (GstPad * pad, GstEvent * event,
 
     if (format != GST_FORMAT_TIME)
       data->group->selector[data->type].group_start_accum = GST_CLOCK_TIME_NONE;
-    else if (!GST_CLOCK_TIME_IS_VALID (data->group->selector[data->type].
-            group_start_accum))
+    else if (!GST_CLOCK_TIME_IS_VALID (data->group->selector[data->
+                type].group_start_accum))
       data->group->selector[data->type].group_start_accum = segment->accum;
   } else if (GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) {
     gst_segment_init (&data->playbin->segments[index], GST_FORMAT_UNDEFINED);
@@ -2974,8 +2943,8 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps,
   GstPad *text_sinkpad = NULL;
 
   text_sink =
-      (group->playbin->text_sink) ? gst_object_ref (group->playbin->
-      text_sink) : NULL;
+      (group->playbin->text_sink) ? gst_object_ref (group->
+      playbin->text_sink) : NULL;
   if (text_sink)
     text_sinkpad = gst_element_get_static_pad (text_sink, "sink");
 
index 6d09c37..ae7f85d 100644 (file)
 
 #include "gstscreenshot.h"
 
+void
+gst_play_marshal_BUFFER__BOXED (GClosure * closure,
+    GValue * return_value G_GNUC_UNUSED,
+    guint n_param_values,
+    const GValue * param_values,
+    gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
+{
+  typedef GstBuffer *(*GMarshalFunc_OBJECT__BOXED) (gpointer data1,
+      gpointer arg_1, gpointer data2);
+  register GMarshalFunc_OBJECT__BOXED callback;
+  register GCClosure *cc = (GCClosure *) closure;
+  register gpointer data1, data2;
+  GstBuffer *v_return;
+
+  g_return_if_fail (return_value != NULL);
+  g_return_if_fail (n_param_values == 2);
+
+  if (G_CCLOSURE_SWAP_DATA (closure)) {
+    data1 = closure->data;
+    data2 = g_value_peek_pointer (param_values + 0);
+  } else {
+    data1 = g_value_peek_pointer (param_values + 0);
+    data2 = closure->data;
+  }
+  callback =
+      (GMarshalFunc_OBJECT__BOXED) (marshal_data ? marshal_data : cc->callback);
+
+  v_return = callback (data1, g_value_get_boxed (param_values + 1), data2);
+
+  gst_value_take_buffer (return_value, v_return);
+}
+
 static void
 feed_fakesrc (GstElement * src, GstBuffer * buf, GstPad * pad, gpointer data)
 {
index c17215b..4647a32 100644 (file)
 
 G_BEGIN_DECLS
 
+void gst_play_marshal_BUFFER__BOXED (GClosure * closure,
+    GValue * return_value G_GNUC_UNUSED,
+    guint n_param_values,
+    const GValue * param_values,
+    gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data);
+
 GstBuffer *     gst_play_frame_conv_convert  (GstBuffer *buf, GstCaps   *to);
 
 G_END_DECLS