Commit graph

52 commits

Author SHA1 Message Date
Duncan Palmer
4e83e894df xvimagesink: error out on buffer size sanity check failure.
If sanity checks on the buffer size allocated by XvShmCreateImage() fail,
call on g_set_error(), rather than just logging a warning, as this
failure is fatal.

Add a sanity check on buffer size when the video format is RGB. This adds to
existing checks on various YUV pixel formats.

https://bugzilla.gnome.org/show_bug.cgi?id=767712
2016-07-18 14:15:10 +01:00
Sebastian Dröge
19d714fa2f xvimagesink: Put error message into debug output instead of just throwing it away 2015-10-04 18:36:00 +01:00
Stefan Sauer
923d72d399 x/xv_image_sink: rename for consitency
Insert '_' to match the CamelCase. This is needed so that the plugin docs can
guess the names from the type name.
2015-07-06 17:37:15 +02:00
Tim-Philipp Müller
c53ba4beeb Fix double semicolons 2015-03-10 09:27:08 +00:00
Song Bing
e9c6c833c9 videopool: update video alignment after applying
Video buffer pool will update video alignment to respect stride alignment
requirement. But haven't updated it to video alignment in configure.
Which will cause user get wrong video alignment.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741501
2014-12-22 09:25:04 -05:00
Song Bing
8baf1ec500 videopool: update buffer size after video alignment
Update the new buffer size after alignment in the pool configuration
before calling the parent set_config. This ensures that the parent knows
about the buffer size that we will allocate and makes the size check
work in the release_buffer method.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741420
2014-12-16 12:14:53 +01:00
Tim-Philipp Müller
39c6b41864 xvimagesink: get rid of unnecessary private struct for pool 2014-09-27 16:21:37 +01:00
Wim Taymans
0cf392837d xvimagesink: use xvcontext for allocation
Make a new refcounted xvcontext object that handles the X connection.
Use the xvcontext to allocate images and windows. Move some code
around so that all X calls are made from the xvcontext object.
Make a GstXvImageAllocator object that allocates images from the xvcontext. We
can implement a copy function now for these memory objects now.
Make the bufferpool use the xvimageallocator object for its images.
2013-03-13 11:51:12 +01:00
Wim Taymans
b740edff06 xvimagesink: mark as NO_SHARE
We don't want to share the memory between buffers because that could
cause the memory of the bufferpool buffers to be copied and replaced
with other memory.

This is a hopefully a temporary fix until we can figure out how to share
properly.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=695203
2013-03-05 16:34:35 +01:00
Sebastian Dröge
3c78fcd6b2 xvimagepool: gst_memory_init() does not take ownership of the allocator 2013-02-24 09:45:19 +01:00
Sebastian Dröge
45ac6dea64 xvimagesink: Implement XvImage memory as a GstMemory, not as a GstMeta 2013-02-23 09:58:51 +01: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
Michael Smith
a29c4f9489 meta registration: use g_once functions to register these threadsafely. 2012-10-03 10:44:59 -07:00
Tim-Philipp Müller
8a3bdca78d xvimagesink: port to new GLib thread API 2012-09-10 01:26:20 +01:00
Wim Taymans
ee3613da1e X11: add unpadded width/height as videometa
We need to add the real width/height as the values in the video metadata instead
of the padded values.
2012-08-20 16:13:00 +02:00
Wim Taymans
bc9c1685c2 X11: use new alignment function
Remove some custom padding and alignment functions and replace with the new
align function from the video library.
2012-08-20 11:19:37 +02:00
Wim Taymans
9b3849db1c x11: fix alignment in non-XSHM case
Align the allocated memory to 16 bytes. When doing XSHM we are already aligned
to a page boundary but without, we use plain g_malloc, which could allocate
aligned on 8 bytes only.

See https://bugzilla.gnome.org/show_bug.cgi?id=680796
2012-08-10 16:58:47 +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
c84108de3c video: Update for libgstvideo API changes 2012-04-19 12:30:57 +02:00
Jonathan Lyons
798ce6c0e1 x11: fix build without XSHM
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=673327
2012-04-02 11:37:43 +02:00
Wim Taymans
345dc31f20 update for buffer api change 2012-03-30 18:15:30 +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
bee3d7b683 update for get_param changes
Remove the const from the GstCaps.
Fix some GstStructure leaks.
2012-03-27 12:44:02 +02:00
Wim Taymans
1e884df1df update for bufferpool changes 2012-03-15 22:10:58 +01:00
Wim Taymans
02dc419aae update for bufferpool api change 2012-03-15 14:06:24 +01:00
Wim Taymans
39d78762b9 take padding into account 2012-03-14 19:56:51 +01:00
Wim Taymans
6885b9d397 xvimage: improve debugging 2012-03-05 15:42:09 +01:00
Wim Taymans
502c12f827 update for metadata API changes 2012-02-29 17:25:10 +01:00
Wim Taymans
1c05eeece5 update for metadata tags 2012-02-28 12:10:14 +01:00
Wim Taymans
525f330142 update for metadata changes 2012-02-24 10:26:04 +01:00
Wim Taymans
63f3f27164 update for new memory api 2012-02-22 02:05:24 +01:00
Sebastian Dröge
68c0790817 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/interfaces/propertyprobe.c
	sys/xvimage/xvimagesink.c
2012-01-25 11:50:54 +01:00
Wim Taymans
3fc48e114b x11: reset alignment 2011-12-21 18:14:45 +01:00
Edward Hervey
15687f381b xvimagebufferpool: Use the default ::free_buffer() implementation
Which does exactly the same thing
2011-11-21 13:04:12 +01:00
Wim Taymans
e067e67923 rename meta* -> *meta 2011-11-02 09:04:27 +01:00
Wim Taymans
515d4a9a6d xvimage: avoid caps intersection
Store the video format in the XvImage format list so that we can quickly map
between the two.
2011-08-15 18:39:09 +02:00
Wim Taymans
2e00a6d169 xvimagepool: cleanups 2011-08-05 12:48:07 +02:00
Wim Taymans
66142747bd xv: apply cropping on padded images
Store the dimensions of the unpadded image in the metadata and use that info to
display the valid region of the image.
2011-08-01 18:36:33 +02:00
Wim Taymans
27e622b99e xvimage: add suport for video alignment
Add support for the VideoAlignment option in the bufferpool. The extra
configuration options can be used to request special padding and alignment
requirements for the video buffers.
2011-08-01 17:10:10 +02:00
Wim Taymans
5a85e1d75f base: update for new bufferpool API 2011-07-29 17:15:39 +02:00
Wim Taymans
084eac3a77 x11: call parent set_config
Call the parent set_config method to make it aware of the current config so that
its default methods can do preallocation.
2011-07-18 18:46:01 +02:00
Wim Taymans
ddce68a5c2 video: More video helper library improvements
Make a new GstVideoFormatinfo structure that contains the specific information
related to a format such as the number of planes, components, subsampling,
pixel stride etc. The result is that we are now able to introduce the concept of
components again in the API.
Use tables to specify the formats and its properties.
Use macros to get information about the video format description.
Move code to set strides, offsets and size into one function.
Remove methods that are not handled with the structures.
Add methods to retrieve pointers and strides to the components in the video.
2011-07-04 16:01:14 +02:00
Wim Taymans
cf91192668 x11: handle new bufferpool metadata api
Provide a method to list the supported metadata apis.
Activate the video metadata on buffers when a downstream element configured the
bufferpool to support that api.
2011-06-20 13:28:12 +02:00
Wim Taymans
5eeb468c75 x11: use GstVideoInfo to parse caps
Use GstVideoInfo to keep track of the configured format.
Add GstMetaVideo to buffers, disabled by default for now until we can have it
enabled with a property on the bufferpool configuration.
2011-06-17 17:54:52 +02:00
Wim Taymans
0d75dc5a0b x11: make function static
Don't export buffer creation function, we need to use the bufferpool
now.
2011-06-17 17:27:22 +02:00
Wim Taymans
9c54ca5254 -base: update for buffer API change 2011-06-13 16:32:56 +02:00
Wim Taymans
1c8324a0d1 update for bufferpool api change 2011-06-11 18:54:44 +02:00
Sebastian Dröge
bf08ca7020 Merge branch 'master' into 0.11 2011-05-26 13:54:09 +02:00
Wim Taymans
c81b1b8019 -base: remove metadata (des)serialize functions 2011-05-11 19:12:42 +02:00
Wim Taymans
c8fee4a4b3 ximage: don't share the memory
We can't share the memory on the buffer with other buffers because the metadata
X(v)Image points to it and we don't want it to go away.
2011-04-07 16:07:57 +02:00