Commit graph

808 commits

Author SHA1 Message Date
Sebastian Dröge 3e4aec6e7b video: Make sure to push pre-caps events before the caps event
https://bugzilla.gnome.org/show_bug.cgi?id=699894
2013-05-08 15:50:34 +02:00
Sebastian Dröge f7db63f1b8 videoencoder: Try harder to push writable buffers downstream
For this release the corresponding GstVideoCodecFrame before
pushing the buffer. The buffer will now be writable unless
the subclass still holds another reference to the buffer or
the frame.
2013-04-25 16:23:14 +02:00
Sebastian Dröge 0be8d14965 videodecoder: Try harder to push writable buffers downstream
For this release the corresponding GstVideoCodecFrame before
pushing the buffer. The buffer will now be writable unless
the subclass still holds another reference to the buffer or
the frame.
2013-04-25 16:13:10 +02:00
Tim-Philipp Müller f5c0d61be7 Update disted orc backup files
Generated with 0.4.17 now.
2013-04-22 13:58:33 +01:00
Sebastian Dröge 9d309a3e06 videoencoder: Simply setcaps function 2013-04-18 09:58:37 +02:00
Sebastian Dröge 74f6376c53 videometa: Extend GstVideoGLTextureUploadMeta
https://bugzilla.gnome.org/show_bug.cgi?id=697112
2013-04-17 10:50:05 +02:00
Sebastian Dröge 0b83d13231 videoencoder: Ignore caps events if the caps did not change 2013-04-15 09:44:37 +02:00
Tom Greenwood 3023521366 videodecoder: Ignore caps events if the caps did not change
https://bugzilla.gnome.org/show_bug.cgi?id=697672
2013-04-15 09:44:36 +02:00
Víctor Manuel Jáquez Leal 52d269b6b1 videometa: gst_buffer_add_meta() can return NULL
https://bugzilla.gnome.org/show_bug.cgi?id=697824
2013-04-11 23:47:36 +01:00
Matej Knopp c78cbd0d95 videofilter: add caps to pool config
Does not cause problems but it fixes a warning in the log.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696916
2013-04-04 10:44:13 +02:00
Tim-Philipp Müller 707d112315 docs: add since marker for new video API 2013-04-02 23:40:13 +01:00
Sebastian Dröge 229d7aa910 video-format: Add GST_VIDEO_CAPS_MAKE_WITH_FEATURES() macro 2013-04-01 10:22:04 +02:00
Sebastian Dröge f14c4bbbd7 videometa: Add caps feature #defines for video and GL texture upload meta 2013-04-01 10:22:04 +02:00
Wim Taymans c3651a7905 videodecoder: always send the new buffer to parse functions
When we get a new buffer, always call the parse function, even if it is a 0
sized buffer. For theora we need to also decode 0 sized buffers.
Ideally we would like to make theoradec be packetized but that fails currently
because of oggdemux and because of the assumptions that the base class makes.
2013-03-31 18:31:37 +02:00
Wim Taymans 3b8d053232 videodecoder: forward stream-start immediately 2013-03-30 19:14:40 +01:00
Sebastian Dröge c5d5221cb2 videometa: Add documentation for GstVideoGLTextureUploadMeta 2013-03-29 16:56:25 +01:00
Sebastian Dröge 3d1322f08e videometa: Implement copying of GstVideoGLTextureUploadMeta 2013-03-29 16:37:01 +01:00
Sebastian Dröge 5f79a8cb93 videometa: API: Add GstVideoGLTextureUploadMeta
This allows elements to specify a function to upload
a buffer content to a specific OpenGL texture ID. It
could be used by the vaapi elements to provide a way
for eglglessink or WebKit to upload a VA surface to
an GL texture without the respective sinks knowing
anything about VA.
2013-03-29 16:07:23 +01:00
Wim Taymans 052a1d0f1e video: set interlaced flag correctly in frame
We only look at the interlaced buffer flag in mixed mode, in other modes we
always need to set the interlaced flag.
2013-03-25 09:59:45 +01:00
Wim Taymans bf642ea085 video-format: add small comment 2013-03-24 00:39:01 +01:00
Tim-Philipp Müller 5afc2002b0 video: navigation: minor GValue optimisation 2013-03-03 17:43:47 +00:00
Arnaud Vrac 95266cf212 video-overlay-composition: fix ayuv/argb conversion
Helps when using dvbsuboverlay in connection with vaapisink
or some other video sink that wants ARGB pixels (dvbsuboverlay
attaches pixels in AYUV format, and we then convert as needed).

Alignment should not be a problem here.
2013-02-19 20:39:29 +00:00
Tim-Philipp Müller 0b329f2c22 video: add define for video formats supported by the overlay blending code
For use in template caps by overlay elements that use
video_overlay_composition_blend().

API: GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS

https://bugzilla.gnome.org/show_bug.cgi?id=665751
2013-02-19 12:54:40 +00:00
Thijs Vermeir d189beda4d videodecoder: allow parse function to not use all data on adapter 2013-02-12 10:17:46 +01:00
David Schleef 31312d586e videodecoder: Don't blindly assign DTS to PTS
DTS and PTS usually have a non-zero offset between them in MPEG-TS,
so assigning DTS to PTS is almost always wrong.  The other, newer
timestamp recovery code does it correctly if we leave it as invalid.
2013-02-11 11:57:08 -08:00
David Schleef ceb6585d26 videodecoder: warn if frame list gets long
Decoders that get unparsed input are internally leaking nearly
every incoming buffer.  This checks that case.
2013-02-11 11:56:14 -08:00
Tim-Philipp Müller dce49a1a7e video: fix return type of _get_palette() and add since markers to docs
'const gpointer' is not the same as 'gconstpointer', see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35928.
2013-02-06 12:43:51 +00:00
Wim Taymans c1a25d2ce7 video-format: fix interlaced 4:2:0 and 4:1:0 pack/unpack
For interlaced vertically subsampled images we need to combine alternating
chroma lines with alternating luma lines. That is line 0 and 2 are combined
with the first line of chroma samples and line 1 and 3 with the second line
of chroma samples.

See also: https://bugzilla.gnome.org/show_bug.cgi?id=588535
2013-02-04 15:06:10 +01:00
Wim Taymans cb7a7cd05c video-format: add method to get palette
Make a new method to get the default palette for paletted formats.
2013-02-04 15:06:07 +01:00
Wim Taymans e303b0ad33 video-format: add interlace flag
Add an interlaced flag that can be used to control the unpack/pack
functions.
2013-02-04 15:05:59 +01:00
Tim-Philipp Müller 664adc6e19 gst-libs: use GST_*_1_0 environment variables everywhere
The _1_0 suffixed environment variables override the
non-suffixed ones, so if we're in an environment that
sets the _1_0 suffixed ones, such as jhbuild, we need
to set those to make sure ours actually always get
used.
2013-01-16 10:16:27 +00:00
Nicolas Dufresne 7107e97273 videoencoder: Remove done ToDo
https://bugzilla.gnome.org/show_bug.cgi?id=675761
2012-12-31 19:09:01 +00:00
Nicolas Dufresne 8a233a215d videoencoder: Documentation fix
https://bugzilla.gnome.org/show_bug.cgi?id=675761
2012-12-31 19:03:29 +00:00
Tim-Philipp Müller df186d5240 video: fix A420 size calculation 2012-12-22 21:04:11 +00:00
Thijs Vermeir 675562d362 video: use appropriate printf format for gsize 2012-12-18 15:31:52 +01:00
Sebastian Dröge 3f82e919dd libs: Use foo/foo.h as single-include header consistently everywhere
https://bugzilla.gnome.org/show_bug.cgi?id=688785
2012-12-12 17:13:10 +00:00
Tim-Philipp Müller e05abf0ef1 docs: fix up some more GstXOverlay -> GstVideoOverlay
https://bugzilla.gnome.org/show_bug.cgi?id=689740
2012-12-10 13:40:26 +00:00
Sebastian Dröge 0bb5c6c012 videodecoder: Only keep track of timestamps if the subclass is parsing data
Otherwise we just pass through the timestamps directly and don't
need to waste additional memory for them.

Fixes bug #689814.
2012-12-10 11:51:02 +00:00
Sebastian Dröge 7af386fdaf libs: Fix last commit by using correct include paths and only include existing headers 2012-11-21 11:12:57 +01:00
Evan Nemerson 4d77fba46c libs: Add missing single include headers and use them in GIRs 2012-11-21 11:01:24 +01:00
Sebastian Dröge 1990c45b60 videodecoder: Return the proportion directly 2012-11-20 12:21:08 +01:00
Sebastian Dröge 6228872df7 videodecoder: Rename from get_qos_info() to get_qos_proportion()
And only return the proportion. The earliest time already can be
retrieved from get_max_decode_time() and by renaming we allow this
to be more extensible in the future.
2012-11-20 12:08:26 +01:00
Andoni Morales Alastruey 5f55ea1ef3 videodecoder: add getter for QoS proportion and earliest_time
Add a getter for the QoS proportion and earliest_time to help
subclasses do better estimations based on the proportion.

API: gst_video_decoder_get_qos_info()

https://bugzilla.gnome.org/show_bug.cgi?id=687991
2012-11-19 23:57:43 +00:00
Wim Taymans 7de757a0d4 video-format: fix plane offsets for GBR formats
Also make some macros to get to the R/G/B planes
Remove unused stride macros.
2012-11-13 16:22:12 +01:00
Sebastian Dröge 1ebeac9a22 video: Add GBR/GBR_10LE/GBR_10BE color formats
Planar RGB color format used by h264
2012-11-10 22:24:08 +01:00
Sebastian Dröge b83e67dd5a video: Add Y444_10{LE,BE} video formats 2012-11-10 22:24:08 +01:00
Sebastian Dröge d697dd6d39 videodecoder: Reset the error count to 0 after successfully decoding a frame 2012-11-09 16:47:37 +01:00
Tim-Philipp Müller 377c806685 video: don't crash when blending onto video formats that unpack to 64 bits per pixel
We only allocate 8 bits per component for our temp buffers, which
causes invalid memory accesses if we try to unpack formats that
unpack into a format with 16 bits per component such as e.g. v210.

We don't support blending onto those yet, so just bail out.
2012-11-07 11:17:14 +00:00
Tim-Philipp Müller 5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Miguel Angel Cabrera Moya 2d8edb1e86 video-blend: fix memory leak when called with invalid parameters
https://bugzilla.gnome.org/show_bug.cgi?id=687472
2012-11-02 19:37:26 +00:00
Tim-Philipp Müller a4f2df6341 Revert "g-i: change g-ir-scanner arg --library=libgstfoo-X.la to --library=gstfoo-X"
This reverts commit e39fbe6b7e.

Looks like we need to pass the full .la file after all in a setup
with libtool, or it might not find the library, e.g. like

  ERROR: can't resolve libraries to shared libraries: gstfft-1.0

Conflicts:
	gst-libs/gst/audio/Makefile.am
	gst-libs/gst/pbutils/Makefile.am

Also see https://bugzilla.gnome.org/show_bug.cgi?id=603710
2012-10-29 12:47:05 +00:00
Sreerenj Balachandran f816f94995 videodecoder: fix inappropriate compiler optimization hint macro usage
https://bugzilla.gnome.org/show_bug.cgi?id=679456
2012-10-28 23:09:36 +00:00
Tim-Philipp Müller e39fbe6b7e g-i: change g-ir-scanner arg --library=libgstfoo-X.la to --library=gstfoo-X
As it should be according to the man page.

https://bugzilla.gnome.org/show_bug.cgi?id=679315
2012-10-28 17:35:57 +00:00
Tim-Philipp Müller 6c0c3eb967 videodecoder: don't leak message strings when error is not fatal 2012-10-20 11:37:33 +01:00
Tim-Philipp Müller efff57d497 videodecoder: return NULL from _allocate_output_buffer() if alloc fails
.. instead of garbage pointer. Also log failure in debug log.
Should've returned the flow return like _allocate_output_frame().

https://bugzilla.gnome.org/show_bug.cgi?id=683098
2012-10-17 10:55:01 +01:00
Mark Nauwelaerts 706498cb6e videodecoder: finetune missing timestamp estimating
Monitor for reordered output timestamps, and then avoid oldest DTS
as PTS approach, and try for an oldest PTS as out PTS approach,
if at least all valid PTS available.

Avoids bogus estimating upon sparse available input PTS, and tries
to handle all-keyframe input, or input PTS which are actually DTS.
2012-10-10 15:04:10 +02:00
Andoni Morales Alastruey 8a5cf5ef4d audio/video: update documentation for vfunc's that require chaining up 2012-10-08 13:04:02 +02:00
Wim Taymans c1d67d9bd6 video: small docs fix 2012-10-08 09:21:16 +02:00
Michael Smith 92560517e8 Merge branch 'master' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-base 2012-10-03 10:45:26 -07:00
Michael Smith a29c4f9489 meta registration: use g_once functions to register these threadsafely. 2012-10-03 10:44:59 -07:00
Sebastian Dröge 9d59b789c7 videodecoder: Fix unused variable compiler warning if debugging is disabled 2012-10-02 09:29:49 +02:00
Olivier Crête 531a5af30c videodecoder: Also use the object lock to protect the output_state
Hold both the stream and the object lock to modify the output_state,
this way it can be safely modified while hold either one or the other.

Also, only hold the object lock in the query

https://bugzilla.gnome.org/show_bug.cgi?id=684832
2012-10-01 14:43:29 -04:00
Mark Nauwelaerts 4adfff03ef video{de,en}coder: fix missing timestamp estimating
... by having some more timestamp tracking in a private frame field.
Not doing so would lead to (a.o.) losing the needed minimum timestamp in
an earlier sent frame.
2012-09-28 13:59:24 +02:00
Mark Nauwelaerts dc2f2c9a40 videodecoder: use oldest frame DTS to estimate missing outgoing PTS 2012-09-27 11:31:34 +02:00
Mark Nauwelaerts dbc89e3ab6 videoencoder: use oldest frame PTS to estimate missing outgoing DTS 2012-09-26 16:32:37 +02:00
Mark Nauwelaerts d247301aec videoencoder: incoming buffer DTS is irrelevant
... and bogus anyway if PTS != DTS
2012-09-26 16:32:37 +02:00
Mark Nauwelaerts 6973a66813 videoencoder: clip input buffers to current input segment
... rather than to output segment, which will only be set
to current input segment if some output is produced
(coming from non-clipped input).

Also fixup debug message.
2012-09-25 17:19:15 +02:00
Tim-Philipp Müller 62c111f1e4 videodecoder: don't take STREAM_LOCK on upstream events
Don't try to take STREAM_LOCK on upstream events such as QOS.
Protect qos-related variables with object lock instead. Fixes
possible deadlock when shutting down in certain situations.

https://bugzilla.gnome.org/show_bug.cgi?id=684658
2012-09-24 10:56:35 +01:00
Sebastian Dröge 1e8f5a0b06 videodecoder: Update comments about forwarding/not-forwarding serialized events immediately 2012-09-20 10:04:30 +02:00
Olivier Crête ebae8ffa71 videodecoder: Protect all accesses to priv->output_frame with the stream lock
Fixes segfault as queries/events can happen after a reset
2012-09-19 21:16:01 -04:00
Tim-Philipp Müller 5e0dfec62c Remove -DGST_USE_UNSTABLE_API 2012-09-17 16:05:37 +01:00
Wim Taymans 24bab1e5a8 fix for appsink GstFlowReturn 2012-09-14 13:39:20 +02:00
Tim-Philipp Müller f7c6aa5abd Release 0.11.94 2012-09-14 02:47:54 +01:00
Jan Schmidt 6159817c95 videodecoder: Handle GAP events
Drain out the decoder when encountering a gap. Needed for DVD 'still'
sequences which consist of a single video frame, and a large gap
while audio plays.
2012-09-12 23:07:29 -07:00
Jan Schmidt 52cfce851a Fix still-frame handling.
Still frame events are not OOB downstream. Also, always send
immediately downstream.
2012-09-12 23:07:28 -07:00
Michael Smith 79f0210aed video: Add support for 4:2:2 10 bit video.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=683838
2012-09-12 09:59:26 +02:00
Wim Taymans cbb78eb610 video-info: don't do alignment on the palette
Don't align the palette data. Fixes endless loop when trying to align
paletted formats.
2012-09-11 12:53:01 +02:00
Mark Nauwelaerts 214b7b6d1d video: add some padding
... and clean up some related resolved FIXMEs
2012-09-10 14:03:49 +02:00
Mark Nauwelaerts 75fe950c33 gst-libs: restore original full padding 2012-09-10 11:45:44 +02:00
Tim-Philipp Müller 5101adf740 Remove some #define GLIB_DISABLE_DEPRECATION_WARNINGS that are no longer needed 2012-09-10 01:27:18 +01:00
Thibault Saunier 39a907d04d video: port to the new GLib thread API 2012-09-09 20:41:06 -03:00
Tim-Philipp Müller 2079a8c12b Remove glib-compat-private.h stuff we don't need any more
It's all been ported to the latest GLib API now.
2012-09-09 18:36:49 +01:00
Mark Nauwelaerts d4c1b160ef videoencoder: only set invalid DTS equal to PTS for keyframe
Also add a bit more debug.

See also https://bugzilla.gnome.org/show_bug.cgi?id=679443
2012-09-07 17:41:52 +02:00
Mark Nauwelaerts 20806e4c16 videoencoder: plug some leaks 2012-09-06 13:04:56 +02:00
Mark Nauwelaerts cd2e795154 videooverlaycomposition: add some _get_argb and _get_ayuv functions
... that will handle automatic conversion to indicated format.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=683180
2012-09-05 10:15:51 +02:00
Jan Schmidt 041c16b47d On a still-frame begin message, drain out the decoder and send it.
Fixes still frame handling on DVDs
2012-09-02 23:19:09 -07:00
Jan Schmidt acadc94279 Revert "videodecoder: Send serialised events immediately, after we're pre-rolled."
This reverts commit ef5316fbb0.
2012-09-02 22:59:58 -07:00
Jan Schmidt ef5316fbb0 videodecoder: Send serialised events immediately, after we're pre-rolled.
Only hold back events until the first buffer is generated, then just
send them directly. Otherwise, important events like 'still-frame' are
held forever, waiting for a frame that'll never arrive.
2012-08-31 12:40:36 -07:00
Mark Nauwelaerts 89228e911c videooverlaycomposition: allow more formats for rectangle pixel data
... adding AYUV, and allowing for ARGB or RGBA endian-independent.
2012-08-30 12:12:39 +02:00
Mark Nauwelaerts 9262e00007 videodecoder: parsing loop must ensure for a current frame 2012-08-28 14:31:06 +02:00
Mark Nauwelaerts dd4836a8d1 videooverlaycomposition: stricter check on input variables 2012-08-28 11:01:46 +02:00
Tim-Philipp Müller 7970a0ac71 docs: add docs for some of the video info macros 2012-08-24 17:23:08 +01:00
Wim Taymans a994ebcf1b videoencoder: allow 0 sized output frames
Allow 0 sized frames in gst_video_encoder_allocate_output_frame(). Theora
encodes repeat frames, for example, as 0 sized buffers.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681196
2012-08-24 16:56:00 +02:00
Wim Taymans 211b8b6004 video-frame: only copy the visible region
Make sure to only copy the visible region instead of assuming that the complete
stride is visible (which is not the case when padding is used).
2012-08-20 16:17:27 +02:00
Wim Taymans 6702a2f64c videometa: add more debug 2012-08-20 16:14:07 +02:00
Wim Taymans 9583d1bfc9 video-info: update padding
Update the alignement structure with the new padding values because they could
have been changed when the padding was increased to align the strides.
2012-08-20 11:12:31 +02:00
Wim Taymans 9a2344c2e5 video: expose gst_video_info_align
Expose the gst_video_info_align function that adds padding and does stride
alignment on a GstVideoInfo. Move this previously private function to
video-info.co
Move the definition of the alignment structure to video.h where it can be picked
up by both the bufferpool and the video-info.
2012-08-20 10:50:59 +02:00
Wim Taymans f56e1222da videopool: improve alignment
Check the alignment of the strides in gst_video_info_align and increase the
padding on the frame until the strides are aligned.
2012-08-20 10:25:39 +02:00
Wim Taymans ca77174f91 videopool: improve alignment
Align each plane instead of each component, we might otherwise apply the
alignment adjustement twice if a plane contains multiple components.
2012-08-20 10:06:15 +02:00
Wim Taymans 2bffebcb02 video-format: fix docs a little 2012-08-20 10:06:15 +02:00
Sebastian Dröge bdc056c12d video: Add methods to return a list of all pending GstVideoCodecFrames 2012-08-16 12:13:25 +02:00
Víctor Manuel Jáquez Leal c02dcda885 videoencoder: getter for allocator
Sometimes the encoder would need to use the allocator for something else than
just allocating output buffers, for example, querying different parameters.

This patch expose a getter accessor for the negotiated memory allocator.
2012-08-14 15:47:23 +02:00
Víctor Manuel Jáquez Leal efe9e31b34 videodecoder: getters for pool and allocator
Sometimes the decoder would need to use the pool or the allocator for
something else than just allocating output buffers. For example, the querying
for different parameters, such as asking for a bigger number of buffers to
allocate in the pool.

This patch expose a two getters accessors: one for the buffer pool and the
other for the memory allocator.
2012-08-14 15:47:04 +02:00
Tim-Philipp Müller d1299d1357 videodecoder: fix seeking again
Add missing break in FLUSH_STOP case.
2012-08-09 19:57:49 +01:00
Sebastian Dröge b141bfed60 video: Merge upstream stream tags 2012-08-09 16:24:24 +02:00
Sebastian Dröge 9ffb579b75 videodecoder: Add API to conveniently handle tags 2012-08-09 16:02:42 +02:00
Sebastian Dröge 3c915afc39 videoencoder: Add API to conveniently handle tags 2012-08-09 16:02:15 +02:00
Sebastian Dröge e37bb460bd videoencoder: Add negotiate vfunc that is used to negotiate with downstream
The default implementation negotiates a buffer pool and allocator
with downstream.
2012-08-09 14:47:46 +02:00
Sebastian Dröge 7cb22ef241 videodecoder: Add negotiate vfunc that is used to negotiate with downstream
The default implementation negotiates a buffer pool and allocator
with downstream.
2012-08-09 14:47:46 +02:00
Sebastian Dröge 7bdcb12b41 gst: Set alignment at the correct place of GstAllocationParams 2012-08-08 17:41:19 +02:00
Andoni Morales Alastruey d8326a8eda videoencoder: add proper format for gsize 2012-08-08 17:41:19 +02:00
Sebastian Dröge 98983e08ae videoencoder: Always propose a video buffer pool when the subclass didn't provide one
And also request 16-byte aligned buffers if the subclass didn't
set anything else.
2012-08-08 17:41:19 +02:00
Sebastian Dröge 8b916da6d7 videofilter: Really add a buffer pool if none was provided
And also use the allocation parameters from the query if any
and if there are none set our own (16-byte alignment) on the
query.
2012-08-08 12:19:31 +02:00
Sreerenj Balachandran 8707546345 videofilter: Fix the crash in propose_allocation
Always set a buffer pool if none is provided and don't
set/unref a NULL buffer pool on the query.

https://bugzilla.gnome.org/show_bug.cgi?id=681436
2012-08-08 12:03:05 +02:00
Tim-Philipp Müller 6422f2d085 Update .gitignore 2012-08-08 09:06:30 +01:00
Tim-Philipp Müller 211cc1cf68 video: make sure g-i doesn't parse orc-generated video-orc.h file
It's not public API.
2012-08-05 14:40:03 +01:00
Wim Taymans 683a38ad65 update for new variable names 2012-07-27 15:24:43 +02:00
Edward Hervey 6423a4027e video: Make all frame_number guint32
Unifies the code and ensures that:
* subclasses needing to use the frame_number on a void* field will
  always work
* wraparounds will be automatically taken care of if we have to deal
  with more than 2**32 frames
2012-07-26 18:38:42 +02:00
Mark Nauwelaerts 7b135e8810 video{de,en}coder: delay input caps processing until processing data
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680614
2012-07-26 14:35:45 +02:00
Arnaud Vrac 8ab19ba9ca video-frame: fix invalid plane id on video frame mapping error 2012-07-26 01:52:25 +02:00
Mark Nauwelaerts e1137b8c66 videoencoder: minor doc fix 2012-07-25 15:58:19 +02:00
Vivia Nikolaidou d2e1b64e0c videoencoder: Expose _negotiate function
This is to be called by encoders once they have set the output format
in order for (re)negotiation to be triggered as early as possible.

https://bugzilla.gnome.org/show_bug.cgi?id=679878
2012-07-24 20:42:49 +02:00
Sreerenj Balachandran 1256d5ed71 video-blend: Doc fix 2012-07-24 12:56:46 +02:00
Wim Taymans 38552a2a8a video: rename gst_video_orc_* to video_orc_*
Because then the functions would not be exported
2012-07-23 17:10:08 +02:00
Wim Taymans e98c8538c5 orc: prefix orc functions with gst_video_orc_
See https://bugzilla.gnome.org/show_bug.cgi?id=680025
2012-07-23 16:56:55 +02:00
Wim Taymans b392b28179 orc: rename to video-orc* 2012-07-23 16:52:33 +02:00
Robert Swain 5be353ed5e video-frame: Add missing closing brakcets on flag macros 2012-07-23 14:23:39 +02:00
Wim Taymans 9e08343d5c video-frame: add macros to get frame flags 2012-07-23 13:58:07 +02:00
Wim Taymans f9de2f499b video-frame: use interlacing buffer flags
Also use the buffer flags to enhance the GstVideoInfo flags in the case where
there was metadata on the buffers.
2012-07-23 13:32:59 +02:00
Sebastian Dröge fcf5e389ce videoencoder: Hold the stream lock when reconfiguring the element 2012-07-23 12:06:16 +02:00
Sebastian Dröge df08e333d2 video: Correct usage of the base class stream lock
And also renegotiate if the srcpad requires reconfiguration
2012-07-23 11:50:11 +02:00
Sebastian Dröge 1645ea4a90 video: Rename alloc_output_buffer() to allocate_output_buffer() 2012-07-23 10:18:41 +02:00
Sebastian Dröge 97ba363092 videoencoder: Minor cleanup 2012-07-23 10:04:48 +02:00
Sebastian Dröge fc24035790 videoencoder: Fix parameters names in header 2012-07-23 09:54:50 +02:00
Sebastian Dröge cce1078fe9 videoencoder: Add decide_allocation vfunc and functions to allocate buffers with the information from the allocation query 2012-07-23 09:39:47 +02:00
Wim Taymans 4b56b731d2 video-frame: add interlace flag
Add an interlace flag so that we can see if a frame is interlaced or progressive
in the mixed interlace-mode.
2012-07-20 10:20:38 +02:00
Tim-Philipp Müller ed8504e590 video-overlay-composition: fix GSlice alloc/free size mismatch
Fix copy'n'paste bug which made us allocate a slice of the
size of a rectangle for the overlay composition, but then
free it passing the size of an overlay composition, which
is not something GSlice takes to kindly, resulting in scary
aborts like:

***MEMORY-ERROR***: GSlice: assertion failed: sinfo->n_allocated > 0

Also, g_slice_new already includes a cast, so remove our
own casts, without which the compiler would probably have
told us about this ages ago.

https://bugzilla.gnome.org/show_bug.cgi?id=680091
2012-07-19 13:39:25 +01:00
Edward Hervey 8feaebb6eb videodecoder: Expose _negotiate function
This is to be called by decoders once they have set the output format
in order for (re)negotiation to be triggered as early as possible.

https://bugzilla.gnome.org/show_bug.cgi?id=679878
2012-07-18 18:17:57 +02:00
Mark Nauwelaerts f89c7b605f videooverlaycomposition: replace API parameters with required video meta on pixel data 2012-07-17 18:08:11 +02:00
Mark Nauwelaerts d8a9c18e81 videooverlaycomposition: use GstVideoInfo internally and streamline stride handling 2012-07-17 18:08:11 +02:00
Mark Nauwelaerts d03f926162 videoblend: use correct stride when scaling 2012-07-17 18:08:11 +02:00
Wim Taymans eacb9ee554 video: add method to get offset and scale for a format
Add a method to get the offset and scale values to transform the color values of
a format to their normalized [0.0 .. 1.0] range. This is usually required as
the first step of a colorspace conversion.
2012-07-13 17:13:10 +02:00
Wim Taymans a18c098f82 video: add option to unpack and truncate the range
Add an unpack option to specify what to do with the least significant bits of
the destination when the source format has less bits than the destination. By
default we will now copy the most significant bits of the source into the least
significant bits of the destination so that the full color range is represented.
Add an option to leave the extra destination bits 0, which may be faster and
could be compensated for in the element algorithm.
2012-07-13 15:42:26 +02:00
Wim Taymans 866bf89dfe video: fix endianness of the pack formats 2012-07-13 15:35:27 +02:00
Wim Taymans bc78df5d2d video: fix r210 format
It is an RGB format.
2012-07-13 15:22:57 +02:00
Edward Hervey 3eb5378247 video-blend: Fix argument signedness
The x/y values are meant to be signed.

This bug was introduced by 76c0881549

Conflicts:

	gst-libs/gst/video/video-blend.c
	gst-libs/gst/video/video-blend.h
2012-07-13 12:18:29 +02:00
Edward Hervey 2817bdadc9 libs: Remove "Since" markers and minor doc fixups 2012-07-13 12:11:06 +02:00
Wim Taymans 0dd87d7eb7 fix for allocator API changes 2012-07-09 16:28:25 +02:00
Wim Taymans 53fc1f3fca update for query api changes 2012-07-06 11:50:44 +02:00
Wim Taymans bc5ba349b7 update for allocation query changes 2012-07-06 11:05:09 +02:00
Mark Nauwelaerts db3ce93c51 Revert "videooverlaycomposition: ensure proper buffer copy"
This reverts commit 1d413ace64.

Plain gst_buffer_copy() is now doing the expected ...

See https://bugzilla.gnome.org/show_bug.cgi?id=678384.
2012-07-05 16:39:17 +02:00
Sebastian Dröge 9002471c93 video: Document buffer ownership of the GstVideoCodecFrame more explicit
And also the implications of calling the finish() functions.
2012-07-05 14:29:42 +02:00
Sebastian Dröge 7803ae97e9 videodecoder: Make sure the buffer is writable before changing fields in finish_frame() too
We can't be sure that we have the one and only reference here either.
2012-07-05 13:38:48 +02:00
Sebastian Dröge 8e15a2c28d videodecoder: Create a complete subbuffer before pushing
Otherwise we can't be sure that we are allowed to change the
buffer fields later for clipping.
2012-07-05 13:37:37 +02:00
Wim Taymans f7f2c13efc update for miniobject changes 2012-07-04 17:06:28 +02:00
Wim Taymans 676375ecfe videodec: add some assert 2012-07-04 09:15:26 +02:00
Wim Taymans c7cfb66467 videodec: clear the right variable 2012-07-04 09:15:26 +02:00
Mark Nauwelaerts bcc5a89a98 videooverlaycomposition: make API meta oriented
... and as such more consistent with other buffer meta components.
2012-07-03 14:27:35 +02:00
Mark Nauwelaerts fa72c94a53 videooverlaycomposition: remove some post-port obsolete parts 2012-07-03 14:27:34 +02:00
Mark Nauwelaerts 1d413ace64 videooverlaycomposition: ensure proper buffer copy
This is only temporary and could and should be modified to use
regular buffer copy once https://bugzilla.gnome.org/show_bug.cgi?id=679145
is resolved.
2012-07-02 14:34:14 +02:00
Mark Nauwelaerts 0fba95a7b1 videooverlaycomposition: fix some refcounting and avoid possible NULL use 2012-06-29 18:56:09 +02:00
Mark Nauwelaerts e94022806f videooverlaycomposition: port to 0.11
... which also entails porting video-blend

Fixes #678384.
2012-06-28 18:16:20 +02:00
Wim Taymans 136a3fd37f videoencoder: make PTS and DTS handling more explicit 2012-06-27 16:56:22 +02:00
Wim Taymans c68683c15f videodecoder: avoid crash when getting duration
Check that we have a valid output_state before attempting to use it to calculate
the duration of a buffer. It is possible that we don't have a state yet, for
example when we are dropping the first buffers.
2012-06-27 16:56:22 +02:00
Sebastian Dröge 43e94eea98 videodecoder: Use GSlice to allocate the timestamp tracking structures 2012-06-27 16:42:10 +02:00
Wim Taymans 3327d13f1b videodecoder: small cleanups 2012-06-27 14:13:02 +02:00
Wim Taymans 9f591a0bd1 videodecoder: improve PTS and DTS handling
Also keep track of the DTS and use it to set PTS on keyframes.
Set DTS on outgoing buffers.
2012-06-27 13:48:58 +02:00
Jan Schmidt 1718697ae2 videodecoder: Don't leak a ref to frames in reverse playback 2012-06-26 22:26:57 +10:00
Wim Taymans 1ed29bdb90 video-frame: handle map errors
Error out when something failed
2012-06-26 11:12:00 +02:00
Wim Taymans 59e99e827e videometa: improve debug error reporting 2012-06-26 11:12:00 +02:00
Sreerenj Balachandran a44058c12e videoutils: Use g_list_free_full instead of g_list_foreach and g_list_free 2012-06-25 11:39:08 +02:00
Wim Taymans fcc1e1f457 update for bus api changes 2012-06-20 12:34:01 +02:00
Jan Schmidt b7759a4d42 videodecoder: Don't give out bogus frame deadlines
Make sure the frame deadline was set before calculating the
max_decode_time. Fixes problems with ffmpeg skipping frames when
it doesn't need to, when the input doesn't have full timestamping
(divx in avi)
2012-06-20 03:45:14 +10:00
Jan Schmidt 9a79a145b1 videodecoder: Remove gst_video_decoder_get_timestamp function
Interpolating the timestamps from the picture numbers
does more harm than good, getting it wrong in a lot of
cases (especially reverse playback). Removing it in favour
of simply incrementing the timestamps until there's
something better
2012-06-20 03:40:29 +10:00
Jan Schmidt 45cf9f651b videodecoder: EOS handling for reverse mode.
Handle EOS correctly in reverse mode by treating it
as a final discont and flushing out whatever we can.
2012-06-20 01:43:36 +10:00
Jan Schmidt 6718f0cfff videodecoder: misc improvements/changes
Use g_list_free_full instead of walking lists twice when freeing
them.

Remove pointless clause in gst_video_decoder_chain that doesn't
actually have any effect.

Other changes to make the code slightly more like the 0.11
version.
2012-06-20 01:43:31 +10:00
Jan Schmidt ffd0f28460 videodecoder: Improve timestamp handling.
Fix problems with timestamp calculations when the incoming
buffers have sparse timestamps (as for theora) and reverse
playback. Fixes #675773
2012-06-20 01:43:26 +10:00
Jan Schmidt 1935cf0022 videodecoder: Re-work reverse playback handling
Move processing of the gather list into the flush_parse function.

Add a last ditch attempt to apply timestamps to outgoing buffers
when walking backwards through decoded frames. Requires that each
gathered region has at least one timestamp.

Make sure to remove decoded packets from the decode list when
they are sent - otherwise the list just grows on each cycle, with
more and more frames being decoded and then clipped away.

Break out of the processing loop early on a bad flow return to make
seeking more responsive.

Use the gst_video_decoder_clip_and_push_buf function in reverse
mode, instead of pushing all buffers arbitrarily.

A couple of small efficiency gains in the list handling, by moving
list elements directly and not reallocating, and by reversing
and concatenating the gather list instead of moving it one node
at a time.

Rename the gst_video_decoder_do_finish_frame function to
gst_video_decoder_release_frame.
2012-06-20 01:34:44 +10:00
Jan Schmidt 5dc7d4ea3a videodecoder: Split gst_video_decoder_finish_frame
Split the 2nd half of the gst_video_decoder_finish_frame function
out to gst_video_decoder_clip_and_push_buf.
2012-06-20 01:32:05 +10:00
Jan Schmidt c977aa2c01 videodecoder: Rename queued list to output_queued for clarity.
Use g_list_free_full instead of g_list_foreach + g_list_free
2012-06-20 01:32:05 +10:00
Jan Schmidt 487e5348e0 videodecoder: Small cleanups
Remove extra deref using a local var, and add/change some doc comments
and debug statements
2012-06-20 01:32:05 +10:00
Jan Schmidt 2d770ac406 videodecoder: Rename gst_video_decoder_have_frame_2 function
Rename gst_video_decoder_have_frame_2 to
gst_video_decoder_decode_frame and pass the frame to process
directly, rather than using the current_frame pointer as a holding
pen.

Move the negative rate handling out of the function to where it
is needed, and remove the process flag.
2012-06-20 01:32:05 +10:00
Jan Schmidt ca09aaabc7 videodecoder: Extend docs and add comments
Update the documentation block for the base class, and add a comment
block about the reverse-playback logic and implementation.
2012-06-20 01:32:03 +10:00
Sebastian Dröge bdb4f7c101 videofilter: Don't duplicate code to create a new buffer pool if none is in the query 2012-06-19 13:57:00 +01:00
Sebastian Dröge cb6b835d11 videoencoder: Ensure buffers don't disappear early
The frames are the owners of the buffers
2012-06-19 09:34:49 +01:00
Edward Hervey 4b946e8cee videodecoder: Ensure buffers don't disappear early
The frames are the owners of the buffers. In cases where a decoder
would keep around reference frames, we need to ensure they don't
disappear early.
To handle this, we pass downstream a complete sub-buffer of the output
buffer, ensuring that the buffer will only be released when downstream
is done with it *AND* the frame is no longer used.

Conflicts:

	gst-libs/gst/video/gstvideodecoder.c
2012-06-19 09:33:03 +01:00
Sebastian Dröge 4119246081 videoencoder,videodecoder: Return new references from _get_frame() 2012-06-19 09:26:36 +01:00
Sebastian Dröge 1e635f682f videodecoder: Add GstVideoDecoder::propose_allocation() vfunc 2012-06-15 16:38:16 +02:00
Jan Schmidt f865729e95 videodecoder: Fix initial timestamp in ogg, and a warning.
Don't replace the initial frame's timestamp with a bogus
one calculated from the (incorrect for Ogg) frame number just
because the 'sync time' hasn't changed.

Also, don't output a bogus warning about the output_frame being
NULL when it's being dropped/skipped due to QoS.
2012-06-13 01:58:05 +10:00
Vincent Penquerc'h 8b10be67e4 videodecoder: use GST_CLOCK_TIME_IS_VALID where appropriate 2012-06-08 13:59:53 +01:00
Wim Taymans c2112cb402 video: mark unpack formats with a flag
Add a new _UNPACK flag and use it to mark potential unpack formats.
2012-06-08 11:50:57 +02:00
Vincent Penquerc'h d7ee6a9c57 videodecoder: do not do timestamp arithmetic from an invalid timestamp
This fixes untimestampped buffers from being rejected by the segment clipper.

https://bugzilla.gnome.org/show_bug.cgi?id=676022
2012-06-07 16:59:09 +01:00
Vincent Penquerc'h fd35793c38 video: fix memory leak 2012-06-07 11:23:21 +01:00
Wim Taymans bc221fba78 video: add pack_lines variable
Use a separate variable to describe the amount of lines that will be used in
packing instead of abusing the h_sub variable. Some formats might have no
subsampling but need to operate on multipe lines.
2012-06-06 11:38:00 +02:00
Wim Taymans a96acd3dbe video: add macro for component depth 2012-06-06 11:18:56 +02:00
Wim Taymans ecdfb96f17 video: move methods into separate files
Move different video functionalities into different files
2012-06-05 12:47:22 +02:00
Wim Taymans 887d442da4 video: don't add unknown colorimetry 2012-06-04 18:24:03 +02:00
Wim Taymans d923f9fe70 videodecoder: only copy known colorimetry values
Avoid overriding the default colorimetry values.
2012-06-04 18:17:42 +02:00
Wim Taymans 831519364c video: add unknown colorimetry parameters as well.. 2012-06-04 18:08:11 +02:00
Wim Taymans 379eb410c8 video: use unknown colorimetry for unknown formats
Use the default RGB colorimetry into only on RGB formats and use an unknown set
of defaults for the unknown format.
2012-06-04 18:00:42 +02:00