Commit graph

249 commits

Author SHA1 Message Date
Julien Isorce
d16583d771 eglglessink: add GstEGLImageBufferPoolSendBlockingAllocate callback
The goal here is to prepare GstEGLBufferPool to be moved into
gstegl lib. So it has to not depend on 'gst_eglglessink_queue_object'
2013-09-04 13:32:14 +01:00
Julien Isorce
c0ca9bc422 eglglessink: prepare gst_egl_adaptation_allocate_eglimage to be moved
into gstegl lib or splited between gstegl lib and gstgl lib
because it both depends on egl and gl

So it has to not depend on GstEglAdaptationContext
2013-09-04 13:32:14 +01:00
Edward Hervey
97426a1caa all: Fix for GST_DISABLE_GST_DEBUG
Where applicable, remove methods that don't do anything different than
the default implementation.
2013-07-29 09:42:12 +02:00
Sebastian Dröge
aad0992ae6 eglglessink: Remove workaround for a bug in the RPi EGL implementation
It's fixed in the latest firmware since a few weeks.
2013-06-08 14:49:34 +02:00
Thiago Santos
ef66e39d03 eagl: fix handling of surface dimension changes
Detect when the eagl surface changed its dimension (when the user rotates
the device for example) and adapt the egl internals to draw to that,
preventing that ios resizes the image again when drawing.

This is particularly harmful when eagl would scale down a image
to draw and the ios screen would scale it back up because the
surface is now bigger than when the element was configured.
2013-05-16 15:16:30 -03:00
Sebastian Dröge
275e104be6 egl: Add destroy notify instead of always calling eglTerminate() on the display
In some scenarios, for example in QtWebKit, might be difficult to obtain full
control on the egl display and it might be only accessible indirectly via
eglGetCurrentDisplay().

https://bugzilla.gnome.org/show_bug.cgi?id=700058
2013-05-10 12:50:05 +02:00
Sebastian Dröge
9f25db0981 eglglessink: Use gst_egl_display_get() instead of passing a GstEGLDisplay to EGL functions 2013-04-24 09:40:24 +02:00
Thiago Santos
b40c9ff39a eglglessink: eagl: fix eagl reuse by not releasing the context
It seems EAGL expects the application to simply ignore unused
EAGL contexts as the resources for it would be released when a new
context is set as the current one. Also move the egl extensions
querying to after a context is set to prevent crashes.

This makes the EAGL version of eglglessink reusable.
2013-04-19 08:45:02 +02:00
Sebastian Dröge
baa9754f6f eglglessink: Give only SECONDARY rank
If available we still prefer xvimagesink.
2013-04-18 15:27:11 +02:00
Josep Torra
87f2bae822 eglglessink: fixes 'makes integer from pointer without a cast' warning 2013-04-18 12:54:31 +02:00
Josep Torra
1190a79b19 eglglessink: silence warnings building for RPI related to 'vcos_*' 2013-04-18 12:53:28 +02:00
Josep Torra
9a88d737fc eglglessink: fix warnings building on the RPI 2013-04-18 12:35:55 +02:00
Sebastian Dröge
a8cca17027 eglglessink: Fix GstContext refcounting some more 2013-04-17 13:48:28 +02:00
Sebastian Dröge
f398742608 eglglessink: Fix GstContext refcounting 2013-04-17 13:16:27 +02:00
Sebastian Dröge
e8ad67f2b4 eglglessink: Update for GLTextureUploadMeta and EGL API changes 2013-04-17 10:51:18 +02:00
Sebastian Dröge
92e9988a40 eglglessink: Reorder surface queries
Otherwise wrong values can be returned.
2013-04-16 22:51:18 +02:00
Sebastian Dröge
118f8f33ef eglglessink: Properly set a debug category for the adaption layers 2013-04-16 22:25:19 +02:00
Sebastian Dröge
9fdec0f83b eglglessink: Get the EGL/GLES extensions at the right position 2013-04-16 22:25:02 +02:00
Sebastian Dröge
0fe6fbd677 eglglessink: Fix compiler warning
gstegladaptation_egl.c: In function 'gst_egl_adaptation_create_native_window':
gstegladaptation_egl.c:868:3: error: format '%p' expects argument of type 'void *', but argument 8 has type 'EGLNativeWindowType' [-Werror=format=]
   GST_DEBUG_OBJECT (ctx->element, "Using window handle %p", window);
   ^
2013-04-16 22:14:09 +02:00
Thiago Santos
149cb5a7cf eglglessink: refactor to allow eagl support
Put EGL specific code to a separate file and create the same functions
for EAGL, the Apple's specific EGL implementaton.

At this point, the EAGL version wasn't compiled or tested as there isn't
any simple documented way to build 1.0 for iOS. This code for the EAGL
version is still the 0.10 version, some updates should be made when 1.0
is buildable for iOS.
2013-04-16 16:04:35 -03:00
Thiago Santos
0fafdf8db1 eglglessink: refactor egl functions/data to a separate file
This is part of the changes required to make
eglglessink work with both EGL and Apple's EAGL
2013-04-16 15:58:12 -03:00
Sebastian Dröge
0f10fb622e eglglessink: Print EGL/GLES extensions after we are actually initialized enough 2013-04-16 16:30:08 +02:00
Sebastian Dröge
611ab7f744 eglglessink: Fix compiler warnings
gsteglglessink.c: In function 'gst_eglglessink_fill_texture':
gsteglglessink.c:1815:3: error: format '%d' expects argument of type 'int', but argument 11 has type 'gsize' [-Werror=format]
gsteglglessink.c: In function 'gst_eglglessink_configure_caps':
gsteglglessink.c:2850:3: error: format '%p' expects argument of type 'void *', but argument 8 has type 'EGLNativeWindowType' [-Werror=format]
2013-04-15 08:48:19 +02:00
Sebastian Dröge
1acde42b6e eglglessink: Use the EGLImage and GstVideoGLTextureUploadMeta caps features 2013-04-01 10:22:07 +02:00
Sebastian Dröge
95f819109f eglglessink: Use gst_element_get_context() wherever possible 2013-03-31 11:47:01 +02:00
Sebastian Dröge
ce9b6e5afb eglglessink: Implement GstContext handling 2013-03-29 16:38:34 +01:00
Sebastian Dröge
9e2af116f6 eglglessink: Use a separate texture for the custom textures 2013-03-29 16:11:56 +01:00
Sebastian Dröge
3233c6163a eglglessink: Add support for GstVideoGLTextureUploadMeta 2013-03-29 16:07:23 +01:00
Sebastian Dröge
86363b4f39 eglglessink: Add support for different EGLImage orientations 2013-03-13 13:02:07 +01:00
Sebastian Dröge
d5f15cf3a2 eglglessink: Add RGBA to the caps again 2013-03-13 11:10:02 +01:00
Sebastian Dröge
71768daceb eglglessink: Make sure the buffer is released to the pool if it's the last used one 2013-03-12 19:36:12 +01:00
Sebastian Dröge
bd8963f591 eglglessink: There are only two GLSL programs, not three 2013-03-07 11:58:25 +01:00
Sebastian Dröge
0931724767 eglglessink: gst_buffer_pool_config_get_allocator() does *not* return a new reference to the allocator
Different to gst_query_get_n_allocation_params() which does
2013-03-07 11:51:06 +01:00
Sebastian Dröge
c4fc3428eb eglglessink: Fix allocation of RGBA textures 2013-03-06 17:53:18 +01:00
Sebastian Dröge
a50700404a eglglessink: Make sure to set the NO_SHARE flag on the EGLImage memories
See https://bugzilla.gnome.org/show_bug.cgi?id=695203
2013-03-06 10:53:59 +01:00
Sebastian Dröge
ebe5849443 eglglessink: Always use an RGBA configuration 2013-03-05 12:47:07 +01:00
Sebastian Dröge
a2e89b0858 eglglessink: Properly negotiate an allocator 2013-03-03 12:31:05 +01:00
Sebastian Dröge
a47f52bb96 egl: Mark memory as not mappable if it isn't 2013-03-03 12:31:05 +01:00
Sebastian Dröge
106a0f09af eglglessink: Store a reference to the last_buffer if using EGLImages 2013-03-03 12:31:05 +01:00
Sebastian Dröge
196223b810 eglglessink: Fix compiler warning on RPi 2013-03-03 12:31:05 +01:00
Sebastian Dröge
e852f18e93 eglglessink: Port to new EGL library 2013-03-03 12:31:04 +01:00
Sebastian Dröge
f9eccfe015 egl: Move configure checks around and re-use for eglglessink plugin 2013-03-03 12:31:04 +01:00
Sebastian Dröge
ec19fa930c eglglessink: Fix GST_ERROR_OBJECT() parameters 2013-03-03 12:29:24 +01:00
Sebastian Dröge
4f638c720a eglglessink: gst_video_sink_center_rect() takes the structs itself instead of pointers as first parameters 2013-02-28 12:04:50 +01:00
Sebastian Dröge
31bed4c27d eglglessink: Fix aspect-ratio issues caused by scaling on RPi 2013-02-28 11:29:24 +01:00
Sebastian Dröge
d875858167 eglglessink: Close the dispman display on RPi after usage 2013-02-13 15:22:37 +01:00
Sebastian Dröge
3876a7f9e6 eglglessink: For RPi, initialize bcm_host in plugin_init() 2013-02-13 15:22:37 +01:00
Julian Scheel
f337777eb5 eglglessink: Add bcm/Raspberry Pi support.
This adds a video platform backend for the dispmanx display manager used by
broadcom and the Raspberry Pi.

Signed-off-by: Julian Scheel <julian@jusst.de>
2013-02-13 12:38:31 +01:00
Sebastian Dröge
1b88d7cada eglglessink: Don't return EGLImages that we just rendered from the buffer pool
Mapping them will fail because they're still internally used.
2013-01-03 17:28:49 +01:00
Sebastian Dröge
2aefc09248 eglglessink: Handle copying of GstMemory properly
We have to use the default video meta mapping functions.
2013-01-03 15:22:38 +01:00