Commit graph

476 commits

Author SHA1 Message Date
Edward Hervey
67a4c0c7b2 videoencoder: Add a reference to frame passed to subclass
We have one reference owned by the internal frame list and one reference
passed to the subclass.
2012-05-01 16:59:00 +02:00
Edward Hervey
8217575af1 videodecoder: Add a reference to frame passed to subclass
We have one reference owned by the internal frame list and one reference
passed to the subclass.
2012-05-01 16:58:55 +02:00
Wim Taymans
34bfcb2af9 videodecoder: don't leak events
When need to push out all the previously received events, concatenate all the
events from the previous frames (instead of leaking the old ones)
Improve debugging a little

Conflicts:

	gst-libs/gst/video/gstvideodecoder.c
2012-05-01 16:58:48 +02:00
Wim Taymans
8fde7850c0 videodecoder: don't leak frames
Frames receive a refcount when added to the frames list so release that refcount
in gst_video_decoder_do_finish_frame(). Also release the ref on the frame
because gst_video_decoder_do_finish_frame() takes ownership of the passed frame.
2012-05-01 15:03:40 +02:00
Wim Taymans
e8c7f57a0a videodecoder: avoid double unlock 2012-05-01 15:03:21 +02:00
Sebastian Dröge
52dfa13522 videofilter: Use a GstVideoBufferPool if none was provided 2012-05-01 13:33:20 +02:00
Sebastian Dröge
cb04d8e003 videodecoder: Do bufferpool configuration inside the default decide_allocation() implementation
This allows subclasses to override it, as is necessary for e.g. the
video-crop meta. It is now necessary that after decide_allocation()
there is always a allocator and a configured buffer pool inside the
query.
2012-05-01 13:33:20 +02:00
Sebastian Dröge
f9facc6a4a video: Remove interlaced handling from the video base classes
This must be handled by the subclasses in 0.11 because interlacing
is much more complex now and can't be handled in a generic way.
2012-04-25 18:21:03 +02:00
Wim Taymans
ae42b25c07 video: improve docs and design of multiview interlaced
Put fields of interlaced frames after eachother.
Improve the docs of the video interlaced enums.
2012-04-25 15:27:04 +02:00
Wim Taymans
07d34f576a video: add fields interlacing enum
Add an enum and docs for the fields interlace mode.
Improve the video caps docs for the fields interlace mode.
2012-04-25 14:57:40 +02:00
Wim Taymans
777d044357 videodec: remove some FIXMEs 2012-04-25 14:57:40 +02:00
Sebastian Dröge
bcef106f73 video: Fix latency query handling if the element's own max_latency is GST_CLOCK_TIME_NONE 2012-04-25 13:53:29 +02:00
Sebastian Dröge
71900c4342 video: Only use the interlacing buffer flags if the caps specify interlaced video 2012-04-25 13:46:00 +02:00
Sebastian Dröge
47e169b0b5 videoencoder: Proxy the interlaced buffer flags to the GstVideoCodecFrame 2012-04-25 13:44:30 +02:00
Sebastian Dröge
76f47979c1 videoencoder: Don't propose video-meta by default 2012-04-25 13:19:11 +02:00
Sebastian Dröge
7c165187af videodecoder: Change configure_buffer_pool() vfunc to decide_allocation() with same semantics as in basetransform 2012-04-25 13:19:11 +02:00
Sebastian Dröge
3de8d58c4e videoencoder: Add support for subclasses to propose allocation parameters 2012-04-24 22:42:59 +02:00
Sebastian Dröge
1483997207 videodecoder: Add support for subclasses to configure the buffer pool 2012-04-24 22:35:29 +02:00
Sebastian Dröge
a8c40a658c video: Some porting bugfixes 2012-04-24 21:32:08 +02:00
Sebastian Dröge
b945c01549 videodecoder: Add minimal support for buffer pools 2012-04-24 20:04:48 +02:00
Sebastian Dröge
63563e3d5e videodecoder: Require to chain up to the parent classes event functions 2012-04-24 19:51:30 +02:00
Sebastian Dröge
13b88908ce videoencoder: Require to chain up to the parent's sink event functions 2012-04-24 19:47:22 +02:00
Sebastian Dröge
f7bc9cc5ba video: Initial port of video base classes and related things to 0.11 2012-04-24 19:35:24 +02:00
Sebastian Dröge
3ab5be1cff video: Remove custom marshallers 2012-04-24 18:16:27 +02:00
Sebastian Dröge
a0e3a9e32d Merge remote-tracking branch 'origin/0.10'
Video base classes and theora plugin still needs to be ported again

Conflicts:
	docs/libs/gst-plugins-base-libs-docs.sgml
	docs/libs/gst-plugins-base-libs-sections.txt
	docs/libs/gst-plugins-base-libs.types
	ext/theora/gsttheoradec.c
	ext/theora/gsttheoradec.h
	ext/theora/gsttheoraenc.c
	ext/theora/gsttheoraenc.h
	gst-libs/gst/video/Makefile.am
	gst-libs/gst/video/video.c
	gst-libs/gst/video/video.h
	gst/playback/gsturidecodebin.c
	tests/check/libs/video.c
	tests/check/pipelines/theoraenc.c
	win32/common/libgstvideo.def
2012-04-24 18:14:31 +02:00
Edward Hervey
4f1e7eec40 video: Fix gst_video_info_to_caps
And use the 0.10 caps style
2012-04-24 17:03:40 +02:00
Edward Hervey
a744c98985 videodecoder: Detect buffers inputted with DTS
Some container formats (like AVI) set DTS on the buffers instead of
PTS.
We detect this by:
* detecting if input timestamps are non-increasing
* detecting if the order the frames come out is the same as the order
  they were inputted (meaning the implementation is reordering frames).

If the decoder reorders frames, but input buffer timestamps were not
reordered, that means the buffers has DTS and not PTS as their timestamp.
If this is the case, we use set the PTS of the outgoing frames in the
same order as they were given to the decoder.

This fixes the issue for any decoder using this base class (yay).
2012-04-24 17:03:40 +02:00
Edward Hervey
f6cfd763e4 video: Base classes for video decoders and encoders 2012-04-24 17:03:40 +02:00
Edward Hervey
a22545134d video: Add gst_video_info_is_equal 2012-04-24 10:44:44 +02:00
Edward Hervey
0a7d047b1f video: Add GST_VIDEO_FORMAT_ENCODED 2012-04-24 10:44:44 +02:00
Edward Hervey
8f00d76c97 video: Backport GstVideoInfo/GstVideoFormatInfo from 0.11 2012-04-24 10:44:44 +02:00
Wim Taymans
04a2610444 video: improve frame_flags
Rename the frame_flags to flags. Because they are flags on the frame object it
does not need the redundant frame_ prefix.
Change the order of the metadata constructor so that the flags come before the
format and dimension arguments.
2012-04-19 14:14:35 +02:00
Sebastian Dröge
91ffe7dd5e video: Clean up interlaced flags and enums
There's a new GstVideoFrameFlags enum now that contains the frame
specific flags only. GstVideoFlags does not contain the TFF/TFF/ONEFIELD
flags anymore because these are strictly frame specific.

Also add fallback to parse these fields from the GstBufferFlags in
gst_video_frame_map() if there's no GstVideoMeta attached to the buffer.
2012-04-19 12:30:57 +02:00
Wim Taymans
66615a8a6a videofilter: shortcut transform_ip when not set
We can ask the base class to not call our transform_ip method when the subclass
didn't provide an in-place transform function.
2012-04-14 11:26:28 +02:00
Víctor Manuel Jáquez Leal
3f3dceb675 videopool: fix mem leak
When setting its config, the pool increase the ref count of the allocator, but
at finalize the ref count is also increased rather than decreased.

This one-liner patch changes the gst_allocator_ref() for gst_allocator_unref()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674011
2012-04-14 10:36:02 +02:00
Sebastian Dröge
69b18ab09d gst-libs: Remove interfaces libs and mixer/tuner interfaces
The navigation interface is now in the video library.
2012-04-13 13:14:13 +02:00
Sebastian Dröge
65307dd132 gst: Update versioning 2012-04-04 14:55:15 +02:00
Wim Taymans
ac9a8781ba video: fix macros 2012-04-02 12:25:30 +02:00
Wim Taymans
1d60bd12e5 videometa: use new buffer methods when mapping memory
Use _find_memory and _map_range to simplify, improve and optimize the
memory mapping of video frames.
2012-04-01 18:04:10 +02:00
Wim Taymans
6f8347de9f videofilter: don't map writable in passthrough
In passthrough mode we shouldn't map the buffer in write mode because the buffer
might not be writable.
2012-04-01 18:01:15 +02:00
Edward Hervey
32c617c867 video: Fix 'comparison of unsigned enum expression < 0 is always false' compiler warning 2012-03-30 12:05:51 +02:00
Sebastian Dröge
9e13d70b2c Merge remote-tracking branch 'origin/0.10'
Conflicts:
	gst-libs/gst/video/video-overlay-composition.c
	tests/check/libs/video.c
2012-03-29 15:00:22 +02:00
Wim Taymans
18fe3ed9fa videopool: avoid caps copy
Now that the caps from the bufferpool are not returned as const we
can take a ref instead of doing a copy.
2012-03-27 15:44:59 +02:00
Wim Taymans
c6f55538e3 video: keep the buffer reffed in the videoframe
This would also ensure that the buffer is not writable while mapped.
2012-03-27 15:01:01 +02:00
Wim Taymans
bee3d7b683 update for get_param changes
Remove the const from the GstCaps.
Fix some GstStructure leaks.
2012-03-27 12:44:02 +02:00
Mark Nauwelaerts
6c260d732c video: remove bogus define 2012-03-26 18:13:13 +02:00
Tim-Philipp Müller
3242f55861 test: fix leak in video overlay composition unit test
gst_buffer_set_qdata() will leak the structure passed to it
when called incorrectly (e.g. on a non-metadata-writable buffer).
This is expected, but we must avoid doing that in valgrind.
2012-03-25 13:35:23 +01:00
Tim-Philipp Müller
35a17ac152 video: overlay-composition: blending micro-optimisation 2012-03-25 11:33:04 +01:00
Tim-Philipp Müller
79953f27a8 video: overlay-composition: try to avoid floating point maths in inner loop
Try to avoid floating point maths for each pixel to be blended in
inner loop, and try to avoid the multiplication entirely for the
most common case of the global alpha being 1. Could probably be
refactored a bit more.
2012-03-25 11:31:31 +01:00
Tim-Philipp Müller
32679e1826 video: overlay-composition: some minor clean-ups
extract_alpha and apply_global alpha always return TRUE really,
so just do away with the return value. Convert a g_return_if_fail()
into a g_assert(), since this is only to check internal consistency
and not a guard for public API. Add some locking.

https://bugzilla.gnome.org/show_bug.cgi?id=668483
2012-03-25 11:27:24 +01:00
Holger Kaelberer
76c0881549 video: overlay-composition: add support for global alpha multiplicator
https://bugzilla.gnome.org/show_bug.cgi?id=668483
2012-03-25 11:27:24 +01:00
Wim Taymans
32bd12dba9 Merge branch 'master' into 0.11
Conflicts:
	.gitignore
	common
	configure.ac
	ext/vorbis/gstvorbisdeclib.h
	gst-libs/gst/audio/gstaudioencoder.c
	gst-libs/gst/riff/riff-read.c
	gst/playback/gstplaysink.c
	gst/playback/gstplaysinkconvertbin.c
	tests/check/libs/video.c
2012-03-22 11:35:13 +01:00
Mark Nauwelaerts
d455b29db4 video: fix assertion comparison mishap 2012-03-20 11:22:29 +01:00
Wim Taymans
e620dbc57d video: add function to copy one video plane 2012-03-19 12:26:11 +01:00
Wim Taymans
1e884df1df update for bufferpool changes 2012-03-15 22:10:58 +01:00
Wim Taymans
7c0e2b5b1e update for allocation query changes 2012-03-15 20:36:51 +01:00
Wim Taymans
02dc419aae update for bufferpool api change 2012-03-15 14:06:24 +01:00
Wim Taymans
df5253b22c update for memory api changes 2012-03-15 13:32:08 +01:00
Wim Taymans
28034226c6 update for memory api changes 2012-03-14 21:35:45 +01:00
Wim Taymans
39d78762b9 take padding into account 2012-03-14 19:56:51 +01:00
Tim-Philipp Müller
2c4b379470 video: overlay-composition: fix alpha premultiply and unpremultiply
Fix component offsets for little endian systems.

https://bugzilla.gnome.org/show_bug.cgi?id=668483
2012-03-14 18:04:38 +00:00
Holger Kaelberer
027f5bb471 video: overlay-composition: fix rectangle caching after alpha (un)premultiplying
If we are asked to (un)premultiply,we need to create the new rectangle
with the right flags, so we can find it properly on subsequent cache
lookups (also because it's wrong otherwise).

https://bugzilla.gnome.org/show_bug.cgi?id=668483
2012-03-14 18:04:38 +00:00
Holger Kaelberer
7a21d1eb32 video: overlay-composition: fix crash when doing premultiplied<->unpremultiplied alpha conversion
We need to copy the pixels before messing with them, not least
because the buffer creation code below assumes it's ok to take
ownership.

Fixes crash caused by double-free.

https://bugzilla.gnome.org/show_bug.cgi?id=668483
2012-03-14 18:04:38 +00:00
Holger Kaelberer
6b7f25a2f0 video: overlay-composition: check the right flags when searching for a cached rectangle
Compare the flags of the *cached* rectangle to the desired flags when
checking for a suitable rectangle in the cache.

https://bugzilla.gnome.org/show_bug.cgi?id=668483
2012-03-14 18:04:37 +00:00
Wim Taymans
781f9474ea videometa: also copy map/unmap functions 2012-03-13 20:17:55 +01:00
Tim-Philipp Müller
29c266ccff Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	common
	docs/libs/gst-plugins-base-libs.types
	ext/pango/gsttextoverlay.c
	ext/vorbis/gstvorbisdec.c
	gst/playback/gstplaysink.c
	gst/playback/gstplaysinkconvertbin.c
	sys/ximage/ximagesink.c
	sys/xvimage/xvimagesink.c
2012-03-08 20:31:34 +00:00
Wim Taymans
8ebd13ee5e videopool: only do alignment when videometa is enabled
We require the videometa activated before we can implement the alignment of
buffers. Users of the bufferpool should do this manually based on the results of
the allocation query.
2012-03-08 13:03:22 +01:00
Wim Taymans
4da57f08a1 videometa: make video metatransform
Make more generic video meta transform data that can be used for many video
transformations later.
2012-03-06 12:52:01 +01:00
Sebastian Dröge
1af6f94d84 video-blend: Actually allow negative offsets in the function signature too 2012-03-06 12:42:03 +01:00
Wim Taymans
1ede067d27 videofilter: always chain up to parent propose_allocation 2012-03-02 17:34:50 +01:00
Wim Taymans
337eed6e91 videometa: add videoscale metadata transform 2012-03-02 13:11:36 +01:00
Sebastian Dröge
84a02f9f13 Merge branch '0.11' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-base into 0.11 2012-03-02 10:13:52 +01:00
Sebastian Dröge
f7939bb43f Merge branch 'master' into 0.11
Conflicts:
	NEWS
	RELEASE
	configure.ac
	docs/plugins/gst-plugins-base-plugins.args
	docs/plugins/gst-plugins-base-plugins.hierarchy
	docs/plugins/gst-plugins-base-plugins.interfaces
	docs/plugins/inspect/plugin-adder.xml
	docs/plugins/inspect/plugin-alsa.xml
	docs/plugins/inspect/plugin-app.xml
	docs/plugins/inspect/plugin-audioconvert.xml
	docs/plugins/inspect/plugin-audiorate.xml
	docs/plugins/inspect/plugin-audioresample.xml
	docs/plugins/inspect/plugin-audiotestsrc.xml
	docs/plugins/inspect/plugin-cdparanoia.xml
	docs/plugins/inspect/plugin-encoding.xml
	docs/plugins/inspect/plugin-ffmpegcolorspace.xml
	docs/plugins/inspect/plugin-gdp.xml
	docs/plugins/inspect/plugin-gio.xml
	docs/plugins/inspect/plugin-gnomevfs.xml
	docs/plugins/inspect/plugin-libvisual.xml
	docs/plugins/inspect/plugin-ogg.xml
	docs/plugins/inspect/plugin-pango.xml
	docs/plugins/inspect/plugin-playback.xml
	docs/plugins/inspect/plugin-subparse.xml
	docs/plugins/inspect/plugin-tcp.xml
	docs/plugins/inspect/plugin-theora.xml
	docs/plugins/inspect/plugin-typefindfunctions.xml
	docs/plugins/inspect/plugin-uridecodebin.xml
	docs/plugins/inspect/plugin-videorate.xml
	docs/plugins/inspect/plugin-videoscale.xml
	docs/plugins/inspect/plugin-videotestsrc.xml
	docs/plugins/inspect/plugin-volume.xml
	docs/plugins/inspect/plugin-vorbis.xml
	docs/plugins/inspect/plugin-ximagesink.xml
	docs/plugins/inspect/plugin-xvimagesink.xml
	gst-libs/gst/app/gstappsink.c
	gst-libs/gst/audio/mixer.c
	gst-libs/gst/audio/mixer.h
	gst-libs/gst/tag/gstxmptag.c
	gst-libs/gst/video/colorbalance.c
	gst-libs/gst/video/colorbalance.h
	gst/adder/gstadder.c
	gst/playback/gstplaybasebin.c
	gst/playback/gstplaybin2.c
	gst/playback/gstplaysink.c
	gst/videoscale/gstvideoscale.c
	tests/check/elements/videoscale.c
	tests/examples/seek/seek.c
	tests/examples/v4l/probe.c
	win32/common/_stdint.h
	win32/common/audio-enumtypes.c
	win32/common/config.h
2012-03-02 10:00:55 +01:00
Wim Taymans
91c587af22 videofilter: fix for decide_allocation changes
Chain up to parent.
2012-03-01 17:34:56 +01:00
Wim Taymans
502c12f827 update for metadata API changes 2012-02-29 17:25:10 +01:00
Wim Taymans
a232714065 meta: add return value to transform 2012-02-28 16:18:30 +01:00
Wim Taymans
af308ac04d videofilter: fix some comments 2012-02-28 16:16:22 +01:00
Wim Taymans
1c05eeece5 update for metadata tags 2012-02-28 12:10:14 +01:00
Alessandro Decina
9f1732fba7 Fix compiler warnings 2012-02-26 20:36:46 +01:00
Wim Taymans
525f330142 update for metadata changes 2012-02-24 10:26:04 +01:00
Wim Taymans
06ccd80811 video: fix docs 2012-02-23 16:55:11 +01:00
Wim Taymans
e32e8f6c52 video: Improve video frame map/unmap
Install defaul map/unmap function on the metadata and really call the functions
instead of always calling a default implementation.
Rework some bits so that we don't have to mess with the GstMapInfo information
(adding the offset), instead pass the adjusted data pointer from the map function.
2012-02-23 16:50:28 +01:00
Wim Taymans
f552d8f0c0 videopool: fix docs 2012-02-23 16:16:37 +01:00
Wim Taymans
18e45a8a5f videofilter: improve propose_allocation
When we are in passthrough, call the parent implementation. Otherwise we have to
suggest allocation parameters ourselves.
2012-02-22 15:27:59 +01:00
Wim Taymans
6c51a80f6f videometa: adjust for memory api change 2012-02-13 18:12:01 +01:00
Wim Taymans
e615e4c2cf video: add performance log for frame copy 2012-02-09 16:03:35 +01:00
Wim Taymans
f31d5d7505 debug: add some performance debug 2012-02-09 15:28:54 +01:00
Wim Taymans
bfa00d0996 video: mark endianness correctly 2012-02-06 18:33:59 +01:00
Wim Taymans
0c5755730b videofilter: take care of in_place transform
If the subclass doesn't implement a transform_frame function we need to force
the baseclass into in_place transform.
2012-02-06 13:23:25 +01:00
Mark Nauwelaerts
fa63d7181d video: add GST_VIDEO_INFO_COMP_BITS 2012-02-06 10:52:01 +01:00
Sebastian Dröge
103c59af24 video: Add GST_VIDEO_INFO_COMP_WIDTH 2012-02-06 09:53:22 +01:00
George Kiagiadakis
1251fb3fc0 video: Use host endianness when generating caps for 16-bit rgb formats
This is necessary in order to match what the caps strings in
video.h contain for 16-bit rgb formats and also to match how
gst_video_format_parse_caps expects them.

https://bugzilla.gnome.org/show_bug.cgi?id=667681
2012-01-30 15:56:44 +00:00
Wim Taymans
fa400c372b videopool: update for allocator api update 2012-01-30 13:10:40 +01:00
Wim Taymans
fcdc385aa1 port to new map API 2012-01-25 12:30:53 +01:00
Wim Taymans
5872bcc33a Update for memory API changes 2012-01-19 12:15:18 +01:00
Tim-Philipp Müller
576bbb4fd8 Remove compatibility code cruft for old GLib versions 2012-01-18 17:22:21 +00:00
Matej Knopp
5c91ca3256 videopool: fix printf warning in debug message
https://bugzilla.gnome.org/show_bug.cgi?id=662607
2012-01-15 13:58:24 +00:00
Tim-Philipp Müller
0461ed2ada Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst-libs/gst/pbutils/gstdiscoverer-types.c
	gst-libs/gst/pbutils/gstdiscoverer.c
	tests/check/Makefile.am
2012-01-12 23:21:17 +00:00
Reynaldo H. Verdejo Pinochet
1a8ee4536c Add missing DEFAULT_INCLUDES on androgenizer call
Fix building of the libgstvideo module on Android by adding the
missing and needed $(DEFAULT_INCLUDES) to CFLAGS for the
androgenizer call on gst-libs/gst/video/Makefile.am

Before this change, building was failing due to gst-plugins-base/
and gst-plugins-base/gst-libs/gst/video being left out of the
include path.
2012-01-11 21:04:40 -03:00
Sebastian Dröge
dc8984d76c Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/app/gstappsrc.c
	gst-libs/gst/audio/multichannel.h
	gst-libs/gst/video/videooverlay.c
	gst/playback/gstplaysink.c
	gst/playback/gststreamsynchronizer.c
	tests/check/Makefile.am
	win32/common/libgstvideo.def
2012-01-10 13:15:12 +01:00