Commit graph

188 commits

Author SHA1 Message Date
Sebastian Dröge
fc93c66d3b basevideo: Add destroy notify for the coder_hook to prevent memory leaks
Fixes bug #654293.
2011-07-09 11:00:28 +02:00
David Schleef
929603d56c basevideodecoder: Better handling of invalid par 2011-06-04 14:09:29 -07:00
Debarshi Ray
03bb5dc8ba Remove unused but set variables
This is needed to satisfy the new -Wunused-but-set-variable added in
GCC 4.6: http://gcc.gnu.org/gcc-4.6/changes.html
2011-05-30 22:52:03 +10:00
Mark Nauwelaerts
9b6e819247 basevideodecoder: handle missing framerate when calculating timestamp 2011-05-16 20:32:24 +02:00
Mark Nauwelaerts
cfe85ad780 basevideodecoder: debug code style fixes 2011-05-16 20:32:24 +02:00
Mark Nauwelaerts
2f6af91f09 basevideodecoder: tune parsing sink caps into video state
... to provide subclass with more information w.r.t. original caps.
2011-05-16 20:32:24 +02:00
Mark Nauwelaerts
380a443be4 basevideodecoder: video state reference to codec_data is not refcounted
... but rather implicitly valid as long as sink caps are not modified.
2011-05-16 20:32:24 +02:00
Mark Nauwelaerts
a1825bd5e2 basevideodecoder: improve glitch resilience
Provide a replacement for GST_ELEMENT_ERROR to avoid aborting at the first
atom out of place, while on the other hand not failing indefinitely.
2011-05-16 20:32:24 +02:00
Mark Nauwelaerts
1588ed321c basevideodecoder: reverse playback support 2011-05-16 20:32:23 +02:00
Mark Nauwelaerts
1d99e8eafa basevideodecoder: use basevideocodec discont field 2011-05-16 20:32:23 +02:00
Mark Nauwelaerts
1b151caf11 basevideodecoder: really and only set src pad caps whenever requested
... since subclass is expected to be wise enough to know when to do so.
2011-05-16 20:32:23 +02:00
Mark Nauwelaerts
550237347b basevideodecoder: add some sanity enforcing 2011-05-16 20:32:23 +02:00
Mark Nauwelaerts
f72658435b basevideodecoder: add documentation
... and remove some more stray unused code and methods.
2011-05-16 20:32:23 +02:00
Mark Nauwelaerts
04f4a583dd basevideocodec: fully free video frame 2011-05-16 20:32:23 +02:00
Mark Nauwelaerts
a085acb586 basevideodecoder: streamline discont, flush and reset handling
... which is not to say there is no room for further tweaking ...
2011-05-16 20:32:23 +02:00
Mark Nauwelaerts
444b169188 basevideodecoder: add some header commentary 2011-05-16 20:32:22 +02:00
Mark Nauwelaerts
cfc65b14b1 basevideodecoder: remove (almost) unused fields
... and also some more unused code.
2011-05-16 20:32:22 +02:00
Mark Nauwelaerts
f591361d2f basevideodecoder: invoke subclass start method at state change and use set_format
While this changes API slightly (e.g. actually uses set_format now), which is OK
for unstable API, it has following merits:
* symmetric w.r.t. stop at state change
* in line with other base class practice
* otherwise no subclass method at state change (global activation time)
Moreover, subclassese are either unaffected or trivially adjusted accordingly.
2011-05-16 20:32:22 +02:00
Mark Nauwelaerts
04a34b4ab7 basevideodecoder: fixup tweak 2011-05-16 20:32:22 +02:00
Mark Nauwelaerts
39fb2fa74a basevideodecoder: add and tweak debug statements 2011-05-16 20:32:22 +02:00
Mark Nauwelaerts
fc705cf8fd basevideodecoder: arrange for limited legacy seeking support
In particular, tweak src query and event handling to provide for
byte <-> time conversion.
2011-05-16 20:32:22 +02:00
Mark Nauwelaerts
3bd16a48b4 basevideo: cater for format conversion 2011-05-16 20:32:22 +02:00
Mark Nauwelaerts
5af2f6f40e videocodec: remove unused fields and code 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
4311909a53 basevideodecoder: fix copy-and-paste variable misnomer 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
7862d9ed35 basevideodecoder: subsume skip_frame into finish_frame 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
0230143cb8 basevideodecoder: remove unused code 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
8defa8cb49 basevideodecoder: code cleanup and debug style fixes 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
576fb1b4cb basevideoencoder: pass along buffer discont flag 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
ef4bceabbb basevideoencoder: implement preset interface 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
5a8bc266c8 basevideoencoder: add documentation and related cosmetics 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
d15b8c7ad3 basevideoencoder: provide proper upstream flow return handling 2011-05-16 20:32:21 +02:00
Mark Nauwelaerts
d0753dec9b basevideoencoder: enhance set_caps
Specifically, only invoke set_format if incoming format really changed,
and finish current format if so (and if any current).
2011-05-16 20:32:20 +02:00
Mark Nauwelaerts
d68288b597 basevideoencoder: elaborate finish to draining 2011-05-16 20:32:20 +02:00
Mark Nauwelaerts
4b5623d687 basevideoencoder: invoke subclass start method at state change
While this changes order w.r.t. set_format, which is OK for unstable API,
it has following merits:
* symmetric w.r.t. stop at state change
* in line with other base class practice
* little benefit in invoking 2 subclass virtual methods (set_format and start)
  in immediate succession; all actions in the second could be done in the first
  whereas subclass has no chance to do anything 'global' at activation time
Moreover, current -bad subclass relevant methods either trivially commute
or are either trivially adjusted accordingly.
2011-05-16 20:32:20 +02:00
Mark Nauwelaerts
d567fa2834 basevideoencoder: enable clipping by default 2011-05-16 20:32:20 +02:00
Mark Nauwelaerts
3f0824b699 basevideoencoder: reset more state 2011-05-16 20:32:20 +02:00
Mark Nauwelaerts
02a065e406 basevideoencoder: header cosmetic and doc fixes 2011-05-16 20:32:20 +02:00
Mark Nauwelaerts
b0c982db5b basevideocodec: remove redundant caps field
... as it is already at hand as the src pad's negotiated caps.
2011-05-16 20:32:20 +02:00
Mark Nauwelaerts
8aa9d83eb4 basevideoencoder: remove unused code 2011-05-16 20:32:19 +02:00
Mark Nauwelaerts
294cecbc69 basevideoencoder: add event virtual method to allow subclass event handling 2011-05-16 20:32:19 +02:00
Mark Nauwelaerts
16c6a49bd4 basevideoencoder: improve GstForceKeyUnit event handling 2011-05-16 20:32:19 +02:00
Mark Nauwelaerts
adbbe36408 basevideocodec: debug style fixes 2011-05-16 20:32:19 +02:00
Mark Nauwelaerts
1659e7dfcf basevideocodec: remove unused code cluttering up the place
Also minor debug style fixes.
2011-05-16 20:32:19 +02:00
Mark Nauwelaerts
72a32afc65 basevideoencoder: simplify negotiated checking
... by avoiding some extraneous (un)ref'ing.
2011-05-16 20:32:19 +02:00
Mark Nauwelaerts
dd118538e9 basevideoencoder: code cleanup and some debug
Also add some minor locking and remove unused bits.
2011-05-16 20:32:19 +02:00
Andoni Morales Alastruey
85703b8886 basevideencoder: Fix use after free after state change transition 2011-05-14 12:08:40 +02:00
David Schleef
50e1a73bbc basevideoencoder: Don't allow buffers after EOS
Fixes #647852.
2011-04-24 19:40:08 -07:00
David Schleef
4f432e09fa basevideo: Don't duplicate code in basevideocodec
Both basevideoencoder and basevideocodec were setting
system_frame_number, leading to confusion.  Fixes #647853.
2011-04-24 19:40:08 -07:00
David Schleef
aa02a4074f basevideo: Check if caps are set directly
Fixes #647854.
2011-04-24 19:40:08 -07:00
Tim-Philipp Müller
fb67a0d126 basevideo: fix unused-but-set-variable warnings with gcc 4.6 2011-04-14 16:49:18 +01:00
David Schleef
293b0f7757 basevideo: Fix negotiation errors 2011-04-01 13:54:02 -07:00
David Schleef
83d6a5099b basevideo: Add function to allocate src buffer 2011-04-01 13:54:02 -07:00
David Schleef
3ada35cc0e basevideo: merge utils header into basevideocodec 2011-03-23 21:33:49 -07:00
David Schleef
5b90c31ca2 basevideocodec: remove parser in favor of baseparse 2011-02-20 12:16:08 -08:00
Sebastian Dröge
44da64d86b basevideodecoder: Initialize some variables to make gcc 4.6 happy 2011-01-27 17:29:12 +01:00
David Schleef
fe50055715 basevideo: Move common fields/functions to basecodec 2010-10-15 16:30:57 -07:00
Sebastian Dröge
5816dbce6f basevideodecoder: Don't use GST_FLOW_IS_SUCCESS() 2010-09-21 12:26:34 +02:00
David Schleef
356daf25a5 basevideo: Remove unused code 2010-09-20 12:34:46 -07:00
David Schleef
9a62433722 basevideo: Remove check for old -base 2010-09-20 12:34:46 -07:00
David Schleef
db43b033ae basevideo: Add handling of GstForceKeyUnit events 2010-09-20 12:34:46 -07:00
David Schleef
62a9383527 basevideodecoder: add capture pattern handling
Move typical scan_for_sync() usage into base class, which just
calls gst_adapter_masked_scan_uint32().
2010-09-18 19:27:07 -07:00
David Schleef
dbbf1182dc basevideodecoder: Don't blow away field information
Also, set field flags correctly.
2010-09-18 19:27:07 -07:00
David Schleef
7cd2e0dd3e basevideo: Move deadline to frame structure 2010-09-18 19:27:07 -07:00
Sebastian Dröge
29943c87f8 basevideodecoder: Reset the segment on FLUSH_STOP and when going back to READY 2010-07-27 18:24:20 +02:00
Sebastian Dröge
ccbb765743 basevideodecoder: Fix memory leak
The timestamps are only used if the output adapter is used, not
if complete frames are provided by the decoder and finish_frame() is
called and even in the case where the output adapter is used they
might not be used and are leaked.
2010-07-10 15:50:50 +02:00
Philip Jägenstedt
7a181a9ed3 basevideodecoder: remove spurious warning 2010-06-10 10:58:54 -07:00
David Schleef
07eb2a7293 basevideoparse: fix warning 2010-06-02 19:46:50 -07:00
David Schleef
faa81e7386 basevideoparse: remove bogus api 2010-06-02 19:38:35 -07:00
David Schleef
af7ae41646 basevideo: remove gst_base_video_state_from_caps 2010-06-02 19:28:16 -07:00
David Schleef
b67706b584 basevideo: remove compatibility code 2010-06-02 19:28:16 -07:00
David Schleef
c295354da5 basevideo: use debug category for each class 2010-06-02 19:28:16 -07:00
Jan Schmidt
efb8a4324c basevideo: Fail if caps don't contain a framerate field
Return false from the caps parsing function if there is no framerate
field in the provided caps

Merging previous commit into current codebase.
2010-06-02 19:28:16 -07:00
David Schleef
13848cc93b basevideodecoder: create new segments if missing 2010-06-02 19:28:16 -07:00
David Schleef
99a88edcc1 basevideo: Add a warning
Merging previous commit into current codebase.
2010-06-02 19:28:16 -07:00
Tim-Philipp Müller
9b1ee36328 basevideo, vp8: guard unstable API with GST_USE_UNSTABLE_API
Add some guards and fat warnings to the header files with still unstable
API, so people who just look at the installed headers know that it
actually is unstable API.

Merging previous commit into current codebase.
2010-06-02 19:28:15 -07:00
David Schleef
9564562fe8 basevideo: make printf formats portable 2010-06-02 12:16:56 -07:00
David Schleef
14c8bf96ad basevideodecoder: (in vp8) Mark discont buffers 2010-06-02 11:26:41 -07:00
David Schleef
bdb5926cda basevideo: Move base video from vp8 to gst-libs 2010-06-02 00:01:10 -07:00
David Schleef
c3d4977761 Split out GST_PLUGINS_BAD_CFLAGS from GST_CFLAGS
Move include directives for gst-libs into GST_PLUGINS_BAD_CFLAGS,
and fix all the Makefiles that use it.  This is so that all the
include directories are added in the proper order: first the
directories in srcdir/builddir, then gst-plugins-base dirs, then
gstreamer dirs.  If the order is wrong, installed headers may be
used instead of local headers and/or uninstalled headers from -base.
2010-05-19 18:24:02 -07:00
Benjamin Otte
f96e4f1581 Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
2010-03-21 21:39:18 +01:00
Josep Torra
2f603bc241 basevideo: fix warnings in macosx snow leopard 2009-10-11 11:14:16 +02:00
David Schleef
76f489c595 basevideo: Revert "Call GstBaseVideoEncoder::start/stop during pad [de]activation."
This reverts commit 4c087bcb07.
The reverted commit changes the order that set_format() and start()
are called, which is incorrect.  The correct order is set_format(),
start(), handle_frame()..., stop()
2009-10-05 17:07:36 -07:00
David Schleef
7496a84ea0 basevideo: Free frame using utility function 2009-10-05 13:34:30 -07:00
Jan Schmidt
b4fd433c57 basevideo: Fail if caps don't contain a framerate field
Return false from the caps parsing function if there is no framerate
field in the provided caps
2009-10-05 21:13:40 +01:00
David Schleef
1ee3b51ee0 dirac: convert to BaseVideoEncoder 2009-10-02 22:10:07 -07:00
Alessandro Decina
e665fb8702 Add GstBaseVideoDecoder::set_sink_caps vfunc. 2009-10-02 14:28:50 +02:00
Alessandro Decina
7dc185655f Call GstBaseVideoDecoder::start/stop during pad [de]activation. 2009-10-02 14:28:15 +02:00
Alessandro Decina
a6f616c1ee Don't ignore the value returned from GstBaseVideoEncoder::set_format. 2009-10-02 12:14:07 +02:00
Alessandro Decina
867cb76b21 Unref frame->sink_buffer in gst_base_video_encoder_finish_frame 2009-10-02 12:14:06 +02:00
Alessandro Decina
40d832918a Make GstBaseVideoEncoder::handle_frame return GstFlowReturn 2009-10-02 12:14:06 +02:00
Alessandro Decina
4c087bcb07 Call GstBaseVideoEncoder::start/stop during pad [de]activation. 2009-10-02 12:14:06 +02:00
David Schleef
62b692d549 basevideo: debug at new segment events 2009-09-17 17:03:41 -07:00
David Schleef
440fceec73 basevideo: Add a warning 2009-09-17 17:03:40 -07:00
Sebastian Dröge
9b9b8cd58e basevideo: Link with libgstvideo for some used functions 2009-07-07 20:29:16 +02:00
Tim-Philipp Müller
6a763f6a47 basevideo, schroedinger: guard unstable API with GST_USE_UNSTABLE_API
Add some guards and fat warnings to the header files with still unstable
API, so people who just look at the installed headers know that it
actually is unstable API.
2009-07-03 16:08:38 +01:00
David Schleef
cf2b2b017f basevideo: move from -base
Also move schroedinger plugin.  This creates a new library,
gstbasevideo-0.10, which will probably be merged back into
gstvideo-0.10 when this is moved back to -base.
2009-07-01 10:56:24 -07:00
Christian Schaller
086b25d40a remove gst-libs from gst-plugins module as it is in gst-plugins-base now
Original commit message from CVS:
remove gst-libs from gst-plugins module as it is in gst-plugins-base now
2005-05-06 11:41:28 +00:00
Tim-Philipp Müller
4dd33312fe Add G_BEGIN_DECLS and G_END_DECLS around headers where missing, so that they work when included from C++ code
Original commit message from CVS:
Add G_BEGIN_DECLS and G_END_DECLS around headers where missing, so that they work when included from C++ code
2005-02-09 22:31:05 +00:00
David Schleef
595055ea7a gst-libs/gst/video/videosink.h: Change copyright block to LGPL.
Original commit message from CVS:
* gst-libs/gst/video/videosink.h: Change copyright block to LGPL.
2004-08-11 21:19:13 +00:00
David Schleef
b14c2fe0df ext/pango/gsttextoverlay.c: Add copyright block and fix plugin license field
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: Add copyright block and fix plugin
license field
* gst-libs/gst/idct/Makefile.am: Remove mmx/sse code
* gst-libs/gst/video/gstvideosink.c: Change copyright block to
LGPL.
* gst/auparse/gstauparse.c: Fix plugin license field.
* gst/monoscope/gstmonoscope.c: Fix plugin license field.
* gst/mpeg1sys/gstmpeg1systemencode.c: Fix plugin license field.
* gst/rtp/gstrtp.c: Fix plugin license field.
2004-08-11 21:06:48 +00:00