summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/app/gstappsink.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-05-07 10:38:23 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-05-07 10:38:23 +0000
commitb2aee5ef7612fa9adf9f69a5b984172886f7f0b3 (patch)
treead797cb4b7cb36e33e36b3549e2ae7f297700b1e /gst-libs/gst/app/gstappsink.c
parent42d7c3409f0f58e204c57c026fd6333969d50103 (diff)
downloadgst-plugins-bad-b2aee5ef7612fa9adf9f69a5b984172886f7f0b3.tar.gz
gst-plugins-bad-b2aee5ef7612fa9adf9f69a5b984172886f7f0b3.tar.bz2
gst-plugins-bad-b2aee5ef7612fa9adf9f69a5b984172886f7f0b3.zip
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.
Diffstat (limited to 'gst-libs/gst/app/gstappsink.c')
-rw-r--r--gst-libs/gst/app/gstappsink.c9
1 files changed, 6 insertions, 3 deletions
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 <ds@schleef.org>
+ * (C) 2008 Wim Taymans <wim.taymans@gmail.com>
*
* 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);