From b2aee5ef7612fa9adf9f69a5b984172886f7f0b3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 7 May 2008 10:38:23 +0000 Subject: gst-libs/gst/app/: Add marshal.list, make it compile and add to cvsignore. Original commit message from CVS: * gst-libs/gst/app/.cvsignore: * gst-libs/gst/app/Makefile.am: * gst-libs/gst/app/gstapp-marshal.list: Add marshal.list, make it compile and add to cvsignore. * gst-libs/gst/app/gstappsink.c: (gst_app_sink_dispose), (gst_app_sink_stop): Small cleanups. * gst-libs/gst/app/gstappsrc.c: (gst_app_src_class_init), (gst_app_src_init), (gst_app_src_set_property), (gst_app_src_get_property), (gst_app_src_unlock), (gst_app_src_unlock_stop), (gst_app_src_start), (gst_app_src_stop), (gst_app_src_create), (gst_app_src_set_caps), (gst_app_src_get_caps), (gst_app_src_set_size), (gst_app_src_get_size), (gst_app_src_set_seekable), (gst_app_src_get_seekable), (gst_app_src_set_max_buffers), (gst_app_src_get_max_buffers), (gst_app_src_push_buffer), (gst_app_src_end_of_stream): * gst-libs/gst/app/gstappsrc.h: Beat appsrc in shape, add signals and actions. Add some docs. Add properties for caps, size, seekability and max-buffers. Fix unlock/stop code. --- gst-libs/gst/app/gstappsink.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gst-libs/gst/app/gstappsink.c') diff --git a/gst-libs/gst/app/gstappsink.c b/gst-libs/gst/app/gstappsink.c index 8c5deaa4..cd5779cb 100644 --- a/gst-libs/gst/app/gstappsink.c +++ b/gst-libs/gst/app/gstappsink.c @@ -1,5 +1,6 @@ /* GStreamer * Copyright (C) 2007 David Schleef + * (C) 2008 Wim Taymans * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -61,7 +62,7 @@ enum SIGNAL_NEW_PREROLL, SIGNAL_NEW_BUFFER, - /* acions */ + /* actions */ SIGNAL_PULL_PREROLL, SIGNAL_PULL_BUFFER, @@ -334,15 +335,18 @@ gst_app_sink_dispose (GObject * obj) GstAppSink *appsink = GST_APP_SINK (obj); GstBuffer *buffer; + GST_OBJECT_LOCK (appsink); if (appsink->caps) { gst_caps_unref (appsink->caps); appsink->caps = NULL; } + GST_OBJECT_UNLOCK (appsink); + + g_mutex_lock (appsink->mutex); if (appsink->preroll) { gst_buffer_unref (appsink->preroll); appsink->preroll = NULL; } - g_mutex_lock (appsink->mutex); while ((buffer = g_queue_pop_head (appsink->queue))) gst_buffer_unref (buffer); g_mutex_unlock (appsink->mutex); @@ -483,7 +487,6 @@ gst_app_sink_stop (GstBaseSink * psink) g_mutex_lock (appsink->mutex); GST_DEBUG_OBJECT (appsink, "stopping"); - appsink->is_eos = FALSE; appsink->flushing = TRUE; appsink->started = FALSE; gst_app_sink_flush_unlocked (appsink); -- cgit v1.2.1