emotion: forgotten file.
authorcedric <cedric>
Mon, 1 Aug 2011 12:42:16 +0000 (12:42 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Aug 2011 12:42:16 +0000 (12:42 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/emotion@61950 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/gstreamer/emotion_alloc.c [new file with mode: 0644]

diff --git a/src/modules/gstreamer/emotion_alloc.c b/src/modules/gstreamer/emotion_alloc.c
new file mode 100644 (file)
index 0000000..da98ac9
--- /dev/null
@@ -0,0 +1,32 @@
+#include <glib.h>
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/video/gstvideosink.h>
+
+#include <Ecore.h>
+
+#include "emotion_gstreamer.h"
+
+Emotion_Gstreamer_Buffer *
+emotion_gstreamer_buffer_alloc(EvasVideoSinkPrivate *sink,
+                              GstBuffer *buffer,
+                              Eina_Bool preroll)
+{
+   Emotion_Gstreamer_Buffer *send;
+
+   send = malloc(sizeof (Emotion_Gstreamer_Buffer));
+   if (!send) return NULL;
+
+   send->sink = sink;
+   send->frame = gst_buffer_ref(buffer);
+   send->preroll = preroll;
+
+   return send;
+}
+
+void
+emotion_gstreamer_buffer_free(Emotion_Gstreamer_Buffer *send)
+{
+   gst_buffer_unref(send->frame);
+   free(send);
+}