[rygel-gst-0-10-plugins] Fix JPEG writer



commit 508d5632e092f85a09b3e97c9f0bc9487acee3bf
Author: Jens Georg <mail jensge org>
Date:   Sat Feb 16 14:25:45 2013 +0100

    Fix JPEG writer

 src/media-export/rygel-media-export-jpeg-writer.c |   22 +++++++++++++++++++-
 1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/src/media-export/rygel-media-export-jpeg-writer.c 
b/src/media-export/rygel-media-export-jpeg-writer.c
index 70e6a15..461d493 100644
--- a/src/media-export/rygel-media-export-jpeg-writer.c
+++ b/src/media-export/rygel-media-export-jpeg-writer.c
@@ -102,7 +102,7 @@ rygel_media_export_jpeg_writer_write (RygelMediaExportJPEGWriter *self,
   priv = self->priv;
   element = GST_ELEMENT (priv->bin);
   g_object_set (priv->sink, "file", file, NULL);
-  gst_app_src_push_buffer (priv->appsrc, gst_object_ref (buffer));
+  gst_app_src_push_buffer (priv->appsrc, gst_buffer_ref (buffer));
   gst_app_src_end_of_stream (priv->appsrc);
   gst_element_set_state (element, GST_STATE_PLAYING);
   g_main_loop_run (priv->loop);
@@ -161,18 +161,36 @@ rygel_media_export_jpeg_writer_constructed (GObject *object) {
 }
 
 static void
+rygel_media_export_jpeg_writer_set_property (GObject      *object,
+                                             guint         property_id,
+                                             const GValue *value,
+                                             GParamSpec   *pspec) {
+  RygelMediaExportJPEGWriter *self = RYGEL_MEDIA_EXPORT_JPEG_WRITER (object);
+
+  switch (property_id) {
+  case RYGEL_MEDIA_EXPORT_JPEG_WRITER_BIN:
+    self->priv->bin = g_value_dup_object (value);
+  break;
+  default:
+    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+  break;
+  }
+}
+
+static void
 rygel_media_export_jpeg_writer_class_init (RygelMediaExportJPEGWriterClass *writer_class) {
   GObjectClass *object_class = G_OBJECT_CLASS (writer_class);
 
   object_class->dispose = rygel_media_export_jpeg_writer_dispose;
   object_class->constructed = rygel_media_export_jpeg_writer_constructed;
+  object_class->set_property = rygel_media_export_jpeg_writer_set_property;
+
   g_object_class_install_property (object_class,
                                    RYGEL_MEDIA_EXPORT_JPEG_WRITER_BIN,
                                    g_param_spec_object ("bin",
                                                         "bin",
                                                         "bin",
                                                         GST_TYPE_BIN,
-                                                        G_PARAM_READABLE |
                                                         G_PARAM_WRITABLE |
                                                         G_PARAM_CONSTRUCT_ONLY));
 


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