Commit graph

34 commits

Author SHA1 Message Date
Tim-Philipp Müller
33a5e3e06f appsink: add buffer fallback in case the application doesn't handle buffer lists
We shouldn't assume the application handles buffer lists, for
ease-of-use reasons and for backwards compatibility reasons.
2011-01-31 18:06:18 +00:00
Cai Yuanqing
71dec68cba appsink: send new-buffer-list signal
Send new-buffer-list signal when emit-signals is TRUE

https://bugzilla.gnome.org/show_bug.cgi?id=640607
2011-01-31 15:32:40 +01:00
Wim Taymans
5f36105915 appsink: unset flushing flag when starting
When we start again after being stopped, clear the flushing flag or else
it will always be TRUE.

Fixes #636769
2010-12-10 19:00:48 +01:00
Tim-Philipp Müller
c3a519494b docs: fix typo in appsink docs so function gets cross-referenced properly 2010-08-14 19:12:37 +01:00
Benjamin Otte
3bd4aa26ff Add -Wwrite-strings to configure
Fixes for the code included
2010-03-16 17:41:51 +01:00
Wim Taymans
7cce982ee2 appsink: cleanups
Avoid some typecasting.
Avoid dereferencing appsink->priv all the time.
2010-02-12 12:31:49 +01:00
Tim-Philipp Müller
f71c4167e0 docs: add short descriptions for API reference contents page 2009-12-12 18:17:32 +00:00
Wim Taymans
2c08c76383 appsink: don't block in paused
When we are asked to unlock we should either leave the render function or call
the wait_preroll method to release the stream lock.

Fixes #592657
2009-08-24 13:16:39 +02:00
Wim Taymans
3928dbbb45 appsink: add docs and signals
Add docs for the new callback.
Add signals for the new buffer-list support.
2009-06-29 12:14:43 +02:00
Branko Subasic
6518d283d5 Added buffer list support. 2009-06-29 11:59:47 +02:00
Martin Samuelsson
ee03bf5379 appsink: make callbacks return GstFlowReturn
Make the new_buffer and new_preroll callbacks return a GstFlowReturn so that
errors can be reported properly.
Fixes #577827.
2009-04-09 23:46:17 +02:00
Wim Taymans
c4036dd701 app: add callbacks to appsrc, cleanups
Add a uri handler to appsink.
don't emit signals when we have installed callbacks on appsink.

Add callbacks to appsrc to replace the signals.
Add property to disable callbacks in appsrc, default to TRUE for backwards
compatibility but disable when callbacks are installed.

API: GstAppSrc::emit-signals
API: GstAppSrc::gst_app_src_set_emit_signals()
API: GstAppSrc::gst_app_src_get_emit_signals()
API: GstAppSrc::gst_app_src_set_callbacks()
2009-02-26 16:44:53 +01:00
Stefan Kost
251e4d160a docs: don't put random stuff in tags.
Tags like Since: or Returns: can only be followed by more tags. gtk-doc has no
tag to append text again to the documentation body.
2009-02-26 10:09:59 +02:00
Tim-Philipp Müller
07d2dbfdfe app: add win32 .def file and only export functions we want exported
Add a .def file for win32 builds (and make check-exports).
Fix LDFLAGS in Makefile.am, so the usual export regexps are used (fixes #573165).
Make sure private marshaller functions aren't exported by prefixing them with __gst;
also rename gst_app_marshal_OBJECT__VOID to _BUFFER__VOID, make it static and add
a comment why we're not using glib-genmarshal for this one.
2009-02-25 19:50:00 +00:00
Wim Taymans
e5d8551552 Add method to install callbacks on appsink
Based on pacth by Martin Samuelsson <martin dot samuelsson at axis dot com>
Fixes #571299.

Add gst_app_sink_set_callbacks() to install a set of callbacks. This is a more
performant alternative to connecting to the signals.

Add a unit test for appsink.

Clean up some of the appsink docs.

API: GstAppSink::gst_app_sink_set_callbacks()
2009-02-19 10:44:31 +01:00
Jan Schmidt
80ac3b565e gst-libs/gst/app/gstappsink.c: Store the returned signal id in the right slot when registering the pull-buffer signal.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c:
Store the returned signal id in the right slot when
registering the pull-buffer signal.
Fixes #567168
Spotted by: Thomas Vander Stichele  <thomas at apestaart dot org>
2009-01-09 23:13:17 +00:00
Tim-Philipp Müller
ada70bb159 gst-libs/gst/app/: Make debug categories static. Use _element_class_set_details_simple().
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c:
* gst-libs/gst/app/gstappsink.h:
* gst-libs/gst/app/gstappsrc.c:
* gst-libs/gst/app/gstappsrc.h:
Make debug categories static. Use _element_class_set_details_simple().
2009-01-06 11:10:29 +00:00
Tim-Philipp Müller
d2b82026c8 gst-libs/gst/app/: Move private data into a private instance struct. Add padding to instance and class structures exp...
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (_GstAppSinkPrivate),
(gst_app_sink_class_init), (gst_app_sink_init),
(gst_app_sink_dispose), (gst_app_sink_finalize),
(gst_app_sink_unlock_start), (gst_app_sink_unlock_stop),
(gst_app_sink_flush_unlocked), (gst_app_sink_start),
(gst_app_sink_stop), (gst_app_sink_event), (gst_app_sink_preroll),
(gst_app_sink_render), (gst_app_sink_getcaps),
(gst_app_sink_set_caps), (gst_app_sink_get_caps),
(gst_app_sink_is_eos), (gst_app_sink_set_emit_signals),
(gst_app_sink_get_emit_signals), (gst_app_sink_set_max_buffers),
(gst_app_sink_get_max_buffers), (gst_app_sink_set_drop),
(gst_app_sink_get_drop), (gst_app_sink_pull_preroll),
(gst_app_sink_pull_buffer)::
* gst-libs/gst/app/gstappsink.h: (GstAppSinkPrivate), (_GstAppSink)::
* gst-libs/gst/app/gstappsrc.c: (_GstAppSrcPrivate),
(gst_app_src_class_init), (gst_app_src_init),
(gst_app_src_flush_queued), (gst_app_src_dispose),
(gst_app_src_finalize), (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_is_seekable), (gst_app_src_check_get_range),
(gst_app_src_query), (gst_app_src_do_seek), (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_stream_type), (gst_app_src_get_stream_type),
(gst_app_src_set_max_bytes), (gst_app_src_get_max_bytes),
(gst_app_src_set_latencies), (gst_app_src_set_latency),
(gst_app_src_get_latency), (gst_app_src_push_buffer_full),
(gst_app_src_push_buffer_action), (gst_app_src_end_of_stream)::
* gst-libs/gst/app/gstappsrc.h: (GstAppSrcPrivate)::
Move private data into a private instance struct. Add padding to
instance and class structures exposed in public headers. Add
Since markers to the gtk-doc blurbs (#566750).
2009-01-06 10:56:45 +00:00
Jan Schmidt
08393941a8 Move AppSrc/AppSink from gst-plugins-bad. Fixes #564421
Original commit message from CVS:
* configure.ac:
* docs/libs/Makefile.am:
* docs/libs/gst-plugins-base-libs-docs.sgml:
* docs/libs/gst-plugins-base-libs-sections.txt:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* docs/plugins/gst-plugins-base-plugins.args:
* docs/plugins/gst-plugins-base-plugins.hierarchy:
* docs/plugins/gst-plugins-base-plugins.interfaces:
* docs/plugins/gst-plugins-base-plugins.prerequisites:
* docs/plugins/gst-plugins-base-plugins.signals:
* docs/plugins/inspect/plugin-app.xml:
* gst-libs/gst/Makefile.am:
* gst-libs/gst/app/gstappsink.c:
* gst-libs/gst/app/gstappsrc.c:
* tests/examples/Makefile.am:
* tests/examples/app/Makefile.am:
Move AppSrc/AppSink from gst-plugins-bad. Fixes #564421
2009-01-05 23:04:57 +00:00
Wim Taymans
8567ee2149 Add appsrc and appsink documentation.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* gst-libs/gst/app/gstappsink.c:
* gst-libs/gst/app/gstappsrc.c: (gst_app_src_class_init):
Add appsrc and appsink documentation.
2008-12-17 13:51:46 +00:00
Edward Hervey
dfa2705aa0 gst/: Wim, you're a bad boy. You don't want people to contact you or what?
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c:
* gst-libs/gst/app/gstappsrc.c:
* gst/h264parse/gsth264parse.c:
Wim, you're a bad boy. You don't want people to contact you or what?
2008-11-10 14:53:45 +00:00
Wim Taymans
1f724549e4 gst-libs/gst/app/gstappsink.c: Fix the docs.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_class_init):
Fix the docs.
2008-10-29 17:02:55 +00:00
Stefan Kost
4ad8ad3db5 docs/plugins/: docs/plugins/inspect/plugin-mythtv.xml
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* docs/plugins/gst-plugins-bad-plugins.args:
* docs/plugins/gst-plugins-bad-plugins.hierarchy:
* docs/plugins/gst-plugins-bad-plugins.interfaces:
* docs/plugins/gst-plugins-bad-plugins.prerequisites:
* docs/plugins/gst-plugins-bad-plugins.signals:
* docs/plugins/inspect/plugin-alsaspdif.xml:
* docs/plugins/inspect/plugin-amrwb.xml:
* docs/plugins/inspect/plugin-app.xml:
* docs/plugins/inspect/plugin-bayer.xml:
* docs/plugins/inspect/plugin-bz2.xml:
* docs/plugins/inspect/plugin-cdaudio.xml:
* docs/plugins/inspect/plugin-cdxaparse.xml:
* docs/plugins/inspect/plugin-dtsdec.xml:
* docs/plugins/inspect/plugin-dvb.xml:
* docs/plugins/inspect/plugin-dvdspu.xml:
* docs/plugins/inspect/plugin-faac.xml:
* docs/plugins/inspect/plugin-faad.xml:
* docs/plugins/inspect/plugin-fbdevsink.xml:
* docs/plugins/inspect/plugin-festival.xml:
* docs/plugins/inspect/plugin-filter.xml:
* docs/plugins/inspect/plugin-flvdemux.xml:
* docs/plugins/inspect/plugin-freeze.xml:
* docs/plugins/inspect/plugin-gsm.xml:
* docs/plugins/inspect/plugin-gstinterlace.xml:
* docs/plugins/inspect/plugin-gstrtpmanager.xml:
* docs/plugins/inspect/plugin-h264parse.xml:
* docs/plugins/inspect/plugin-interleave.xml:
* docs/plugins/inspect/plugin-jack.xml:
* docs/plugins/inspect/plugin-ladspa.xml:
* docs/plugins/inspect/plugin-metadata.xml:
* docs/plugins/inspect/plugin-mms.xml:
* docs/plugins/inspect/plugin-modplug.xml:
* docs/plugins/inspect/plugin-mpeg2enc.xml:
* docs/plugins/inspect/plugin-mpeg4videoparse.xml:
* docs/plugins/inspect/plugin-mpegtsparse.xml:
* docs/plugins/inspect/plugin-mpegvideoparse.xml:
* docs/plugins/inspect/plugin-musepack.xml:
* docs/plugins/inspect/plugin-musicbrainz.xml:
* docs/plugins/inspect/plugin-mve.xml:
* docs/plugins/inspect/plugin-mythtv.xml
* docs/plugins/inspect/plugin-nas.xml:
* docs/plugins/inspect/plugin-neon.xml:
* docs/plugins/inspect/plugin-nsfdec.xml:
* docs/plugins/inspect/plugin-nuvdemux.xml:
* docs/plugins/inspect/plugin-oss4.xml
* docs/plugins/inspect/plugin-rawparse.xml:
* docs/plugins/inspect/plugin-real.xml:
* docs/plugins/inspect/plugin-replaygain.xml:
* docs/plugins/inspect/plugin-rfbsrc.xml:
* docs/plugins/inspect/plugin-sdl.xml:
* docs/plugins/inspect/plugin-sdp.xml:
* docs/plugins/inspect/plugin-selector.xml:
* docs/plugins/inspect/plugin-sndfile.xml:
* docs/plugins/inspect/plugin-soundtouch.xml:
* docs/plugins/inspect/plugin-spcdec.xml:
* docs/plugins/inspect/plugin-speed.xml:
* docs/plugins/inspect/plugin-speexresample.xml:
* docs/plugins/inspect/plugin-stereo.xml:
* docs/plugins/inspect/plugin-subenc.xml
* docs/plugins/inspect/plugin-timidity.xml:
* docs/plugins/inspect/plugin-tta.xml:
* docs/plugins/inspect/plugin-vcdsrc.xml:
* docs/plugins/inspect/plugin-videosignal.xml:
* docs/plugins/inspect/plugin-vmnc.xml:
* docs/plugins/inspect/plugin-wildmidi.xml:
* docs/plugins/inspect/plugin-x264.xml:
* docs/plugins/inspect/plugin-xvid.xml:
* docs/plugins/inspect/plugin-y4menc.xml:
* ext/amrwb/gstamrwbdec.c:
* ext/amrwb/gstamrwbenc.c:
* ext/amrwb/gstamrwbparse.c:
* ext/dc1394/gstdc1394.c:
* ext/directfb/dfbvideosink.c:
* ext/ivorbis/vorbisdec.c:
* ext/jack/gstjackaudiosink.c:
* ext/mpeg2enc/gstmpeg2enc.cc:
* ext/mplex/gstmplex.cc:
* ext/musicbrainz/gsttrm.c:
* ext/mythtv/gstmythtvsrc.c:
* ext/theora/theoradec.c:
* ext/timidity/gsttimidity.c:
* ext/timidity/gstwildmidi.c:
* gst-libs/gst/app/gstappsink.c:
* gst/deinterlace/gstdeinterlace.c:
* gst/dvdspu/gstdvdspu.c:
* gst/festival/gstfestival.c:
* gst/freeze/gstfreeze.c:
* gst/interleave/deinterleave.c:
* gst/interleave/interleave.c:
* gst/modplug/gstmodplug.cc:
* gst/nuvdemux/gstnuvdemux.c:
Add missing elements to docs. Fix doc-markup: use convinience syntax
for examples (produces valid docbook), add several refsec2 when we
have several titles. Fix some types.
2008-06-13 11:59:21 +00:00
Stefan Kost
e54b324d7d Do not use short_description in section docs for elements. We extract them from element details and there will be war...
Original commit message from CVS:
* ext/dc1394/gstdc1394.c:
* ext/ivorbis/vorbisdec.c:
* ext/jack/gstjackaudiosink.c:
* ext/metadata/gstmetadatademux.c:
* ext/mythtv/gstmythtvsrc.c:
* ext/theora/theoradec.c:
* gst-libs/gst/app/gstappsink.c:
* gst/bayer/gstbayer2rgb.c:
* gst/deinterlace/gstdeinterlace.c:
* gst/rawparse/gstaudioparse.c:
* gst/rawparse/gstvideoparse.c:
* gst/rtpmanager/gstrtpbin.c:
* gst/rtpmanager/gstrtpclient.c:
* gst/rtpmanager/gstrtpjitterbuffer.c:
* gst/rtpmanager/gstrtpptdemux.c:
* gst/rtpmanager/gstrtpsession.c:
* gst/rtpmanager/gstrtpssrcdemux.c:
* gst/selector/gstinputselector.c:
* gst/selector/gstoutputselector.c:
* gst/videosignal/gstvideoanalyse.c:
* gst/videosignal/gstvideodetect.c:
* gst/videosignal/gstvideomark.c:
* sys/oss4/oss4-mixer.c:
* sys/oss4/oss4-sink.c:
* sys/oss4/oss4-source.c:
Do not use short_description in section docs for elements. We extract
them from element details and there will be warnings if they differ.
Also fixing up the ChangeLog order.
2008-06-12 14:49:15 +00:00
Wim Taymans
8c3b00be4d 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.
2008-05-07 10:38:23 +00:00
Wim Taymans
1275eda108 gst-libs/gst/app/gstappsink.*: Start some docs.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_class_init),
(gst_app_sink_init), (gst_app_sink_set_property),
(gst_app_sink_get_property), (gst_app_sink_unlock_start),
(gst_app_sink_unlock_stop), (gst_app_sink_flush_unlocked),
(gst_app_sink_start), (gst_app_sink_stop), (gst_app_sink_event),
(gst_app_sink_preroll), (gst_app_sink_render),
(gst_app_sink_set_caps), (gst_app_sink_set_drop),
(gst_app_sink_get_drop):
* gst-libs/gst/app/gstappsink.h:
Start some docs.
Add property to drop buffers when the queue is filled
Fix unlocking and flushing when the queues are filled.
2008-05-05 10:27:45 +00:00
Wim Taymans
0c5d01b59f gst-libs/gst/app/gstappsink.*: Add more docs.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_class_init),
(gst_app_sink_init), (gst_app_sink_set_property),
(gst_app_sink_get_property), (gst_app_sink_event),
(gst_app_sink_preroll), (gst_app_sink_render),
(gst_app_sink_set_emit_signals), (gst_app_sink_get_emit_signals),
(gst_app_sink_set_max_buffers), (gst_app_sink_get_max_buffers),
(gst_app_sink_pull_buffer):
* gst-libs/gst/app/gstappsink.h:
Add more docs.
Add signals for when preroll and render buffers are available.
Add property to control signal emission.
Add property to control the max queue size.
2008-04-25 18:18:47 +00:00
Wim Taymans
88322ce012 gst-libs/gst/app/gstappsink.c: Really clean up the queue instead of just unreffing all buffers in it.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_dispose):
Really clean up the queue instead of just unreffing all buffers
in it.
* gst-libs/gst/app/gstappsrc.c: (gst_app_src_base_init),
(gst_app_src_class_init), (gst_app_src_init),
(gst_app_src_dispose), (gst_app_src_finalize):
Fix dispose/finalize.
2008-01-31 17:18:46 +00:00
Wim Taymans
0bba976bd3 gst-libs/gst/app/gstappsink.*: Add properties, signals and actions to access the element even without linking to the ...
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_marshal_OBJECT__VOID),
(gst_app_sink_class_init), (gst_app_sink_init),
(gst_app_sink_dispose), (gst_app_sink_finalize),
(gst_app_sink_set_property), (gst_app_sink_get_property),
(gst_app_sink_flush_unlocked), (gst_app_sink_start),
(gst_app_sink_event), (gst_app_sink_getcaps),
(gst_app_sink_set_caps), (gst_app_sink_get_caps),
(gst_app_sink_is_eos), (gst_app_sink_pull_preroll),
(gst_app_sink_pull_buffer):
* gst-libs/gst/app/gstappsink.h:
Add properties, signals and actions to access the element even without
linking to the library.
Fix some method names and signatures.
2007-09-20 13:59:50 +00:00
Peter Kjellerstedt
3b6df87810 gst/: Printf format fixes (#476128).
Original commit message from CVS:
Patch by: Peter Kjellerstedt  <pkj at axis com>
* gst-libs/gst/app/gstappsink.c:
* gst/flv/gstflvdemux.c:
* gst/flv/gstflvparse.c:
* gst/interleave/deinterleave.c:
* gst/switch/gstswitch.c:
Printf format fixes (#476128).
2007-09-12 08:38:21 +00:00
Wim Taymans
c17a721e0a gst-libs/gst/app/gstappsink.c: Override the preroll vmethod instead of overriding the render method twice.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_class_init):
Override the preroll vmethod instead of overriding the render method
twice.
2007-08-16 17:11:48 +00:00
Wim Taymans
1ec11dbc8e gst-libs/gst/app/gstappsink.c: Don't use new API.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_flush_unlocked):
Don't use new API.
2007-08-14 17:47:34 +00:00
Wim Taymans
dd72f88a8c gst-libs/gst/app/gstappsink.*: Make love to appsink.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_base_init),
(gst_app_sink_class_init), (gst_app_sink_dispose),
(gst_app_sink_flush_unlocked), (gst_app_sink_start),
(gst_app_sink_stop), (gst_app_sink_event), (gst_app_sink_preroll),
(gst_app_sink_render), (gst_app_sink_get_caps),
(gst_app_sink_set_caps), (gst_app_sink_end_of_stream),
(gst_app_sink_pull_preroll), (gst_app_sink_pull_buffer):
* gst-libs/gst/app/gstappsink.h:
Make love to appsink.
Make it support pulling of the preroll buffer.
Add docs and debug statements.
Fix some races wrt to EOS handling and stopping.
Implement getcaps.
Implement FLUSHING.
API: gst_app_sink_pull_preroll()
2007-08-14 17:38:05 +00:00
David Schleef
6cf863e33c Add appsrc/appsink example.
Original commit message from CVS:
* configure.ac:
* examples/Makefile.am:
* examples/app/Makefile.am:
* examples/app/appsrc_ex.c:
Add appsrc/appsink example.
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/app/gstapp.c:
* gst-libs/gst/app/gstappsink.c:
* gst-libs/gst/app/gstappsink.h:
* gst/app/gstapp.c:
Add appsink.
2007-03-11 00:48:26 +00:00