Commit graph

188 commits

Author SHA1 Message Date
Mark Nauwelaerts
b5c5fb58a3 basevideoencoder: fix parameter sanity check 2012-01-23 14:13:38 +01:00
Oleksij Rempel (Alexey Fisher)
1d0507af89 basevideodecoder: add option to hande alt frame data
altref/invisible 'frame' do not describe some frame directly, so it can't be
displayed and timestamps should not be updated.

Fix bug: https://bugzilla.gnome.org/show_bug.cgi?id=655245
Signed-off-by: Oleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>
2012-01-10 08:48:45 +01:00
Thiago Santos
51f399686e basevideocodec: Reset should reset current caps
New caps will need to be negotiated when reset happens
(PAUSED to READY). Without reseting the internal
stored format, basevideoencoder/decoder wouldn't call the
configuration function when the same caps was negotiated
again as they would believe this was the same caps as before.

The issue is that _stop has been called when going to READY and
the elements would have reset their internal codec libs/state as
well. A new configuration should be done.
2011-12-30 00:02:46 -03:00
Sebastian Dröge
c869b21b17 basevideocodec: Don't use G_TYPE_REGISTER_BOXED() yet
This would require GLib 2.26.
2011-12-13 10:18:24 +01:00
Matej Knopp
70d13bbb32 basevideo: Make GstVideoFrame a reference counted boxed object
...and also clear all existing frames when resetting the decoder or encoder.
2011-12-12 14:12:36 +01:00
Sebastian Dröge
811a2ef7aa basevideoencoder: Only make the header buffer metadata writable, not the buffer 2011-12-08 11:51:36 +01:00
Sebastian Dröge
fd828c4ac7 basevideoencoder: Fix handling of force-keyunit events 2011-12-08 10:19:40 +01:00
Sebastian Dröge
e98b17a8dc basevideoencoder: Pass the all-headers field of the force-key-unit event to the subclass 2011-11-29 12:18:20 +01:00
Sebastian Dröge
de6782cce4 basevideoencoder: Implement full support for the new force-key-unit event
Including support for the running-time and count fields.
2011-11-29 12:18:20 +01:00
Sebastian Dröge
97515ca050 basevideoencoder: Use new force-keyunit event API from gst-plugins-base 2011-11-29 12:18:20 +01:00
Sebastian Dröge
904eed3547 basevideoencoder: Adjusting padding is not required for -bad libraries 2011-11-29 12:18:19 +01:00
Sebastian Dröge
25002df594 basevideoencoder: Move some fields to the private part of the instance struct 2011-11-29 12:18:19 +01:00
Sebastian Dröge
b0000b9041 basevideoencoder: Make headers metadata writable before pushing downstream
The timestamp, duration, etc of the headers has to be changed.
2011-11-29 12:18:19 +01:00
Sebastian Dröge
4501412af3 basevideoencoder: Push the downstream force-keyframe event after the next keyframe
Even if the corresponding GstVideoFrame doesn't have the is_sync_point
flag set.
2011-11-29 12:18:19 +01:00
Sebastian Dröge
209ea84ef4 basevideoencoder: Don't push an upstream force-keyunit event downstream 2011-11-29 12:18:19 +01:00
Jonas Larsson
54cb226009 basevideoencoder: Add initial support for the all-headers field of the force-keyframe event
See bug #607742.
2011-11-29 12:18:19 +01:00
Tim-Philipp Müller
f78e9e1684 basevideodecoder: some more debug logging 2011-11-25 11:37:57 +00:00
Tim-Philipp Müller
a039499bf1 basevideodecoder: add API to drop a frame and post a QoS message on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=640017

API: gst_base_video_decoder_drop_frame()
2011-11-25 11:37:57 +00:00
Tim-Philipp Müller
27556bd668 docs: fix comment in gst_base_video_decoder_get_max_decode_time() docs 2011-11-22 23:04:49 +00:00
Tim-Philipp Müller
c75922b96b basevideodecoder: fix weird event list handling
Get rid of weird code that copies a list manually, taking
ownership of the elements and then frees the old list. Instead,
just take over the old list entirely. (If the intent was to
reverse the list, one could use g_list_reverse() instead).

Then, push events in the list out from last to first (since they
were prepended as they came in) instead of just pushing out the
last in the list and leaking the others.
2011-11-22 20:04:13 +00:00
Sebastian Dröge
022cdfc5d3 basevideoencoder: Only call ::reset once in READY->PAUSED 2011-11-17 10:34:07 -08:00
Thijs Vermeir
e40ca78278 fix documentation typo 2011-11-09 12:00:05 +01:00
Olivier Crête
9f76573bda surfaceconverter: Remove duplicated forward declaration
It seems that some compilers don't like duplicated typedefs.
2011-11-03 17:17:10 -04:00
Nicolas Dufresne
149c058209 video: Add GstVideoContext interface
This interface will be used to implement video context sharing. Those
context could be X11 Display, VaDisplay, etc.
2011-11-03 10:41:55 +01:00
Nicolas Dufresne
2808290592 video: Abstract surface API for HW accelerated codecs 2011-11-03 10:33:11 +01:00
Alessandro Decina
16ce440e7f basevideoencoder: handle failures in start() and stop() 2011-10-31 11:38:58 +01:00
Vincent Penquerc'h
8a044de701 basevideoenc: do not try to calculate latency from an unknown framerate
It'll divide by zero, and latency is unknown for an unknown framerate.

Fixes an assert in the schroenc test.

https://bugzilla.gnome.org/show_bug.cgi?id=657419
2011-09-05 12:08:00 +02:00
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
92c3aaa6e5 basevideoencoder: Remove old ::getcaps() comment 2011-08-12 12:13:45 +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
6e4e4e107c basevideodecoder: Use the cached video frame size instead of recalculating it 2011-08-09 10:43:55 +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
83c4e8814e basevideodecoder: First inform subclass about resetting before resetting/freeing all internal state
The subclass might want to access the old state.
2011-07-11 12:59:07 +02:00
Sebastian Dröge
a59246c1d1 basevideodecoder: Track present position on discont before resetting it 2011-07-11 12:36:42 +02:00
Sebastian Dröge
08823f80d6 basevideodecoder: Also protect the list of pending frames from concurrent access when pushing all pendings events 2011-07-11 11:52:48 +02:00
Sebastian Dröge
81f4c9e8bf basevideocodec: Protect access to the list of pending frames with the object lock
This is required if ::finish_frame() and all buffer output happens
on a different thread than the sinkpad streaming thread.
2011-07-11 11:28:40 +02:00
Sebastian Dröge
caed64c720 basevideodecoder: Set the correct lists to NULL after freeing 2011-07-11 09:35:25 +02:00
Sebastian Dröge
584859488b basevideodecoder: Work with a copy of the GstVideoState in setcaps until the caps are accepted
Also fix a refcount problem with the codec_data.
2011-07-11 09:19:28 +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
Sebastian Dröge
5f55a74571 basevideo: Use GSlice for allocating GstVideoFrame and don't duplicate code in the decoder base class 2011-07-09 11:09:12 +02:00
Sebastian Dröge
f341386b64 basevideodecoder: Don't reorder serialized src events
And allow to drop EOS by the subclass if ::finish returns
DROPPED. This requires that the subclass sends EOS manually later.

Fixes bug #653544.
2011-07-09 11:04:18 +02:00
Sebastian Dröge
525875727a basevideo: Add the caps to the GstVideoState and clean up caps/codec_data properly
Having access to the caps in ::set_format can be useful if
non-standard caps fields like the h264 alignment must be accessed.
2011-07-09 11:02:01 +02:00