docs/random/signal: added notes about using BOXED for GstBuffer signal marshallers...
authorChristophe Fergeau <teuf@gnome.org>
Wed, 3 Nov 2004 18:49:59 +0000 (18:49 +0000)
committerChristophe Fergeau <teuf@gnome.org>
Wed, 3 Nov 2004 18:49:59 +0000 (18:49 +0000)
Original commit message from CVS:
2004-11-03  Christophe Fergeau  <teuf@gnome.org>

* docs/random/signal: added notes about using BOXED for GstBuffer
signal marshallers, not POINTER

ChangeLog
docs/random/signal [new file with mode: 0644]

index 541f3fe..4ab79f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-11-03  Christophe Fergeau  <teuf@gnome.org>
 
+       * docs/random/signal: added notes about using BOXED for GstBuffer
+       signal marshallers, not POINTER
+
+2004-11-03  Christophe Fergeau  <teuf@gnome.org>
+
        * gst/elements/gstfakesink.c: (gst_fakesink_class_init):
        * gst/elements/gstfakesrc.c: (gst_fakesrc_class_init): more
        POINTER=>BOXED changes to marshal GstBuffers
diff --git a/docs/random/signal b/docs/random/signal
new file mode 100644 (file)
index 0000000..679a36c
--- /dev/null
@@ -0,0 +1,12 @@
+Random notes on signals:
+
+* Use a BOXED (and not a POINTER) marshaller when your signal will have a 
+  GstBuffer argument:
+
+g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
+              G_STRUCT_OFFSET (GstIdentityClass, handoff), NULL, NULL,
+              gst_marshal_VOID__BOXED, G_TYPE_NONE, 1,
+              GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+* For GstBuffers arguments, consider using G_SIGNAL_TYPE_STATIC_SCOPE as it
+  can prevent an extra copy of the buffer