Commit graph

49 commits

Author SHA1 Message Date
Vincent Penquerc'h
f3cb4439cf basevideoencoder: fix element leak
and this concludes an hour of yelling at the bloody test failing,
only to track down the problem not being in the test.

https://bugzilla.gnome.org/show_bug.cgi?id=657368
2011-08-26 10:25:46 +02:00
Sebastian Dröge
8c743fbc0f basevideo: Fix locking, especially if both pads have different streaming threads 2011-08-18 10:23:32 +02:00
Sebastian Dröge
a081501a90 basevideo: Don't call g_type_class_peek_parent() in class_init
This is already done by the GObject boilerplate macro
2011-08-18 10:15:20 +02:00
Sebastian Dröge
d576e23aa4 basevideoencoder: Proxy the width/height/framerate/PAR constraints of downstream caps to upstream
This allows to specify constraints on the compressed downstream caps
by muxers or capsfilters, which will then be forwarded to upstream
and allows video converters to fulfill the constraints.

Code based on Mark Nauwelaerts audio encoder base class.
2011-08-12 12:25:03 +02:00
Sebastian Dröge
4a76d3a978 basevideoencoder: Remove ::get_caps() vfunc
Subclasses can set the caps more efficiently and this only
caused additional indirections.
2011-08-12 12:06:23 +02:00
Sebastian Dröge
ce0655c275 basevideoencoder: Make access to the list of frames threadsafe 2011-08-03 09:41:20 +02:00
Sebastian Dröge
976d372f9b basevideoencoder: Allow finishing of frames with no src_buffer to drop/free the GstVideoFrame 2011-07-21 08:09:11 +02:00
Sebastian Dröge
e5be8aa8ff basevideoencoder: Only get caps from the subclass if they were not set yet by the subclass 2011-07-21 08:09:11 +02:00
Sebastian Dröge
b2525a3044 basevideoencoder: Delay sending of serialized sink events until finish_frame() 2011-07-21 08:09:11 +02:00
Sebastian Dröge
f011e59943 basevideoencoder: Add ::reset vfunc and handle ::reset/::finish the same way as in the decoder 2011-07-21 08:09:10 +02:00
Sebastian Dröge
2dbd24ca84 basevideoencoder: Use a temporary GstVideoState until the subclass accepted the caps
Also store the caps in the GstVideoState and assume a PAR of 1/1 instead
of 0/1 if no PAR is specified in the caps.
2011-07-19 12:52:31 +02:00
Sebastian Dröge
e61d3d1a0c basevideo: Move the utils from the codec header to its own header 2011-07-09 11:40:17 +02: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
04f4a583dd basevideocodec: fully free video frame 2011-05-16 20:32:23 +02:00
Mark Nauwelaerts
3bd16a48b4 basevideo: cater for format conversion 2011-05-16 20:32:22 +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
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
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
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
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
3ada35cc0e basevideo: merge utils header into basevideocodec 2011-03-23 21:33:49 -07:00
David Schleef
fe50055715 basevideo: Move common fields/functions to basecodec 2010-10-15 16:30:57 -07:00
David Schleef
db43b033ae basevideo: Add handling of GstForceKeyUnit events 2010-09-20 12:34:46 -07:00
David Schleef
af7ae41646 basevideo: remove gst_base_video_state_from_caps 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
David Schleef
9564562fe8 basevideo: make printf formats portable 2010-06-02 12:16:56 -07:00
David Schleef
bdb5926cda basevideo: Move base video from vp8 to gst-libs 2010-06-02 00:01:10 -07: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
David Schleef
1ee3b51ee0 dirac: convert to BaseVideoEncoder 2009-10-02 22:10:07 -07: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
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