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
A previous patch increased allocations by 15 bytes in order to ensure
16 byte alignment for g_malloc blocks. However, shared memory is
already block aligned, and this extra 15 bytes caused allocation
to fail when we were already allocating to the shared memory limit,
which is a lot smaller than typical available RAM.
Fix this by removing the alignment slack when allocating shared
memory.
https://bugzilla.gnome.org/show_bug.cgi?id=706066
Can't print a GstMemory via GST_PTR_FORMAT, it will crash
inside GObject checking if it's a GObject, and we can't
check generically whether it's a derived GstMemory type,
as boxed types don't allowe derivation.
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.