Commit graph

29 commits

Author SHA1 Message Date
Matthew Waters
0b5c7e8b49 gl/docs: update some doc comments 2017-12-09 19:31:58 +00:00
Nicolas Dufresne
50c491dd36 glbufferpool: Fix offset for odd height
We also need to recalculate the offset, since otherwise the frame
mapping will be forward two lines in the U and V planes (I420) due
to gst_video_info_align() round up the Y plane to a even number of
lines.

https://bugzilla.gnome.org/show_bug.cgi?id=745054
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
de79830b05 glmemory: Add GstAllocationParams and alignment support
This implements support for GstAllocationParams and memory alignments.
The parameters where simply ignored which could lead to crash on
certain platform when used with libav and no luck.

https://bugzilla.gnome.org/show_bug.cgi?id=744246
2017-12-09 19:31:55 +00:00
Edward Hervey
f56c4c541a gl: Add/Update more debug statements
Where possible, use the _OBJECT variants in order to track better from
which object the debug statement is coming from

Define (and use) GST_CAT_DEFAULT where applicable

Use GST_PTR_FORMAT where applicable
2017-12-09 19:31:54 +00:00
Nicolas Dufresne
eeda7a29ce glbufferpool: Always recalculate buffer size
Actually we should always recalculate buffer size since our buffer size
even when not-padded is smaller for many sub-sampled formats. This is
because we don't add padding between the planes.

https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
a1e02726ee gl: Add support for GstVideoAlignment
This allow saving a copy with libav video decoders or decoders with
similar padding requirement.

https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Matthew Waters
6bb113f685 gl: add a sync meta for synchronizing across GL contexts
A context can create a GLsync object that can be waited on in order
to ensure that GL resources created in one context are able to be
used in another shared context without any chance of reading invalid
data.

This meta would be placed on buffers that are known to cross from
one context to another.  The receiving element would then wait
on the sync object to ensure that the data to be used is complete.
2017-12-09 19:31:51 +00:00
Matthew Waters
0806de5c75 glbufferpool: add the GstVideoGLTextureUploadMeta buffer pool option 2017-12-09 19:31:48 +00:00
Tim-Philipp Müller
15cd3d3d5c glbufferpool: fix allocator leak in some cases
Spotted by Sebastian Rasmussen.

https://bugzilla.gnome.org/show_bug.cgi?id=734523
2017-12-09 19:31:45 +00:00
Matthew Waters
ec8f3e58de glbufferpool: provide a consistent API regardless of platform 2017-12-09 19:31:43 +00:00
Matthew Waters
32343333aa gl/upload: add GstGLUploadMeta object
That simply deals with the provider aspect of GstVideoGLTextureUploadMeta.
2017-12-09 19:31:41 +00:00
Matthew Waters
6c1a4e30c4 gl/upload: implement lazy init
Rename init_format to set_format
2017-12-09 19:31:39 +00:00
Julien Isorce
88864ea2cc gl: no need to initialize a frame buffer object to upload an eglimage
Fix https://bugzilla.gnome.org/show_bug.cgi?id=729588
2017-12-09 19:31:39 +00:00
Matthew Waters
db544c3c1f gl/pool: init the upload object on start
Theoretically, set_config could be called multiple times
2017-12-09 19:31:38 +00:00
Julien Isorce
213590c79c gl/bufferpool: do not reset upload when set_config does not change the caps
With videotestsrc ! glimagesink it was reset 3 times
2017-12-09 19:31:37 +00:00
Matthew Waters
30c6efc432 gl/mem: allocate the memory per plane
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.

Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).

Should not lose any features/video formats.
2017-12-09 19:31:36 +00:00
Matthew Waters
a20a5d36e2 gl: pass video info's by reference 2017-12-09 19:31:35 +00:00
Julien Isorce
c2471aec81 gl: add EGLImage support
* picked from old libgstegl:
  - GstEGLImageMemory
  - GstEGLImageAllocator
  - last_buffer management from removed GstEGLImageBufferPool

* add-ons:
  - GstEGLImageMemory now old a reference on GstGLContext
    so that it can delete the EGLImage and its gltexture source
    while having the associated gl context being current.
  - add EGLImage support for GstVideoGLTextureUploadMeta which
    mainly call EGLImageTargetTexture2D
  - GstGLBufferPool now supports GstEGLImageAllocator
  - glimagesink / glfilters / etc.. now propose GstEGLImageAllocator
    to upstream

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:35 +00:00
Matthew Waters
d233bb66a9 [876/906] glmem: use GstVideoInfo for format configuration
Allows use of strides
2017-12-09 19:31:33 +00:00
Matthew Waters
1e02438715 [855/906] upload: add support for GstVideoGLTextureUploadMeta 2017-12-09 19:31:32 +00:00
Matthew Waters
711ad485b2 [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2017-12-09 19:31:31 +00:00
Julien Isorce
d17a4381b1 [732/906] build: fix repeated typedefs
Write forward declarations in another way to avoid
repeated typedefs "error: redefinition of typedef".
Raised when using i686-apple-darwin11-llvm-gcc-4.2
It seems that C apple compiler does not support
C11 feature.

https://bugzilla.gnome.org/show_bug.cgi?id=703885
2017-12-09 19:31:29 +00:00
Matthew Waters
761bc0156a [704/906] Use gst_object_[un]ref so we can get refcounts in the log 2017-12-09 19:31:28 +00:00
Matthew Waters
4c35d682c9 [603/906] update FSF address 2017-12-09 19:31:25 +00:00
Matthew Waters
d55bbf7f55 [600/906] docs: add docs for new objects and expand on some existing ones 2017-12-09 19:31:25 +00:00
Matthew Waters
67f5b303c8 [586/906] fix up some debug statements to get them into the right categories 2017-12-09 19:31:25 +00:00
Matthew Waters
fa5d1efaa3 [580/906] bufferpool: remove obselete gl meta buffer pool options 2017-12-09 19:31:25 +00:00
Matthew Waters
574612f129 [576/906] remove uneeded GstGLMeta (use GstVideoMeta) 2017-12-09 19:31:25 +00:00
Matthew Waters
a8b1853755 [517/906] add GstGLBufferPool
which adds GstGLMeta to buffers
2017-12-09 19:31:24 +00:00