AW: [External] Re: ZeroCopy + AppSink + VAAPI + Qt

Timtchenko, Michael Michael.Timtchenko at agcocorp.com
Mon Feb 10 12:30:49 UTC 2020


Hi all,

maybe my last mail was a bit too time consuming for fast reading...

I'll summarize my situation:

- Setup: udpsrc -> vaapi -> glupload -> appsink
- Pulling Frames with retrieving texture ids (ids are increased by every frame) via appsink
- Mapped texture ids are propagated to rendering code, but they are not mapped properly

My guess is, that there is sth wrong with content sharing. But unfortunately i don't know what.

Am i right, that gstreamer creates its own gl context, and the passed context by the bus-message "GST_MESSAGE_NEED_CONTEXT" is merely used
for sharing textures between both? In the case that this is correct, should it be possible to bind an textureid in Thread/Context A, which has
been created in Thread/Context B?

Furthermore i get three context requests over the bus with the following types:

gst.gl.app_context
gst.gl.GLDisplay
gst.vaapi.Display

Is it nescessary to provide all three contexts, or is the application context sufficient for appsink?

Does anybody has suggestions towards this issue? I really appreciate any help/advice or coding examples. Unfortunately i cannot find any complete example :-/

BR,
Michael



-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Timtchenko, Michael
Gesendet: Freitag, 7. Februar 2020 10:04
An: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Betreff: AW: [External] Re: ZeroCopy + AppSink + VAAPI + Qt

 Hi again,

Thx for your support! :)

I've decided to use the glupload mechanism, because I wasn't able to generate proper eglimages.. however, it seems to generate textures.

Right now I'm trying to set the GstGlContext properly. To achieve this, I tried to "grab" the opengl context from the "QSGRenderThread" in the QT-Screnegraph and injected it afterwards to the gstreamer.
This thread provides the context, which i used for uploading of texture in my prior approach.

I'm doing this with the following code:

...
GstGLDisplay* display = gst_gl_display_new(); guintptr context = gst_gl_context_get_current_gl_context( GST_GL_PLATFORM_EGL );
GstGLContext* gstcontext = gst_gl_context_new_wrapped( display, context, GST_GL_PLATFORM_EGL, GST_GL_API_ANY ); ...

whereas *gstcontext* ist stored and afterwards injected via bus callback in gstreamer.

Here is my respond to the bus callback:
...
        case GST_MESSAGE_NEED_CONTEXT:
            {
                const gchar* context_type;
                GstContext* context = NULL;
                gst_message_parse_context_type( message, &context_type );
                g_print( "got need context %s\n", context_type );
                if( g_strcmp0( context_type, "gst.gl.app_context" ) == 0 )
                {
                    GstGLContext* gl_context = gstcontext; // *context from above*
                    GstStructure* s;
                    context = gst_context_new( "gst.gl.app_context", TRUE );
                    s = gst_context_writable_structure( context );
                    gst_structure_set( s, "context", GST_TYPE_GL_CONTEXT, gl_context, NULL );
                    gst_element_set_context( GST_ELEMENT( message->src ), context );
                }
                if( context )
                {
                    gst_context_unref( context );
                }
                break;
            }
...

When i'm trying to pull a frame, i'm getting a texure id. Furthermore, the provided texture ids increase by every single call. (They start with 0).
I pass this id to my another part of my application where i'm binding it to a texture.

And here i encounter the problem:

The uploaded video frames are not available in the rendering context. The provided ids are bound, but they have a different meaning in rendering thread.
For example i receive the frame with id 2, bind this and get a previously uploaded item from the rendering thread displayed.

I'm pretty sure, that there is a mistake within the context setup.
Could some provide an example, how the context of the GstGLContext can be retrieved from the current thread with gstreamer 1.14?

The debug log says:
        672     got need context gst.gl.GLDisplay
        673     got need context gst.gl.app_context
        675     ** (myApp:172): CRITICAL **: 02:47:37.191: gst_gl_context_get_display: assertion 'GST_IS_GL_CONTEXT (context)' failed
        677     ** (myApp:172): CRITICAL **: 02:47:37.191: gst_gl_display_get_handle_type: assertion 'GST_IS_GL_DISPLAY (display)' failed
(I've attached the full log below)

Thx in advance!

Best regards
Michael

### Appendix ###

Pipeline:

 "udpsrc port=55555 caps=\"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96\" "
                                         "! rtph264depay "
                                         "! vaapih264dec "
                                         "! vaapipostproc name=postproc "
                                         "! glupload "
                                         "! video/x-raw(memory:GLMemory), format=(string)RGBA "
                                         "! appsink name=sink emit-signals=true sync=false max-buffers=1 drop=true"

Debug-Log:

        523     0:00:00.987126921   172       0x5bbe00 DEBUG               glupload gstglupload.c:1599:gst_gl_upload_new:<glupload0> Created new GLUpload for context (NULL)
        524     0:00:01.001294399   172       0x5bbe00 DEBUG           glbasefilter gstglbasefilter.c:429:gst_gl_base_filter_change_state:<gluploadelement0> changing state: NULL => READY
        525     0:00:01.001501817   172       0x5bbe00 INFO               gldisplay gstgldisplay.c:289:gst_gl_display_new: creating a display, user choice:(NULL) (platform: (NULL))
        526     0:00:01.002189708   172       0x5bbe00 DEBUG              gldisplay gstgldisplay_egl.c:116:gst_gl_display_egl_get_from_native: egl no display extensions: EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_MESA_platform_gbm
        527     0:00:01.008901079   172       0x5bbe00 DEBUG           glbasefilter gstglbasefilter.c:429:gst_gl_base_filter_change_state:<gluploadelement0> changing state: READY => PAUSED
        528     0:00:01.009128869   172       0x5bbe00 LOG                  glutils gstglutils.c:438:gst_gl_handle_context_query:<gluploadelement0> handle context query context query: 0xc780f0, GstQueryContext, context-type=(string)gst.vaapi.Display;
        529     0:00:01.014013717   172       0x5bbe00 DEBUG           glbasefilter gstglbasefilter.c:429:gst_gl_base_filter_change_state:<gluploadelement0> changing state: PAUSED => PLAYING
        530     0:00:01.108233349   172       0xfb68a0 LOG                  glutils gstglutils.c:438:gst_gl_handle_context_query:<gluploadelement0> handle context query context query: 0x7f6694007850, GstQueryContext, context-type=(string)gst.vaapi.Display;
        531     0:00:01.110263863   172       0xfb68a0 DEBUG              gldisplay gstgldisplay.c:676:_get_gl_context_for_thread_unlocked:<gldisplayegl0> No GL context for thread (nil)
        532     0:00:01.110311709   172       0xfb68a0 DEBUG              gldisplay gstgldisplay.c:701:gst_gl_display_get_gl_context_for_thread:<gldisplayegl0> returning context (NULL) for thread (nil)
        533     0:00:01.110375791   172       0xfb68a0 INFO               glcontext gstglcontext.c:337:gst_gl_context_new: creating a context for display <gldisplayegl0>, user choice:(null)
        534     0:00:01.110464937   172       0xfb68a0 DEBUG              glcontext gstglcontext.c:371:gst_gl_context_new:<glcontextegl0> Done creating context for display <gldisplayegl0> (user_choice:(null))
        535     0:00:01.110481115   172       0xfb68a0 DEBUG              gldisplay gstgldisplay.c:534:gst_gl_display_create_context:<gldisplayegl0> creating context <glcontextegl0> from other context (NULL)
        536     0:00:01.110500431   172       0xfb68a0 DEBUG              glcontext gstglcontext.c:1025:gst_gl_context_create:<glcontextegl0>  other_context:(NULL)
        537     0:00:01.110520730   172       0xfb68a0 INFO                glwindow gstglwindow.c:251:gst_gl_window_new: creating a window, user choice:(null)
        538     0:00:01.110530438   172       0xfb68a0 WARN                glwindow gstglwindow.c:293:gst_gl_window_new: Could not create window. user specified (null), creating dummy window
        539     0:00:01.110744842   172       0xfb68a0 DEBUG              glcontext gstglcontext.c:934:gst_gl_context_set_window:<glcontextegl0> window:<gldummywindow0>
        540     0:00:01.110884115   172 0x7f66940078a0 DEBUG              glcontext gstglcontext.c:1183:gst_gl_context_create_thread:<glcontextegl0> Creating thread
        541     0:00:01.110943648   172 0x7f66940078a0 INFO               glcontext gstglcontext.c:1240:gst_gl_context_create_thread:<glcontextegl0> Attempting to create opengl context. user chosen api(s) (any), compiled api support (gles2) display api (any)
        542     0:00:01.110956788   172 0x7f66940078a0 DEBUG              glcontext gstglcontext_egl.c:301:gst_gl_context_egl_create_context:<glcontextegl0> Creating EGL context
        543     0:00:01.110971742   172 0x7f66940078a0 LOG                gldisplay gstgldisplay_egl.c:260:gst_gl_display_egl_from_gl_display:<gldisplayegl0> display <gldisplayegl0>is already a GstGLDisplayEGL
        544     0:00:01.123070353   172 0x7f66940078a0 INFO               glcontext gstglcontext_egl.c:339:gst_gl_context_egl_create_context: egl initialized, version: 1.4
        545     0:00:01.123126820   172 0x7f66940078a0 INFO               glcontext gstglcontext_egl.c:451:gst_gl_context_egl_create_context: Bound OpenGL|ES
        546     0:00:01.123199378   172 0x7f66940078a0 INFO               glcontext gstglcontext_egl.c:206:gst_gl_context_egl_choose_config: config set: 140078144964064, 1
        547     0:00:01.123247242   172 0x7f66940078a0 DEBUG              glcontext gstglcontext_egl.c:250:_create_context_with_flags:<glcontextegl0> attempting to create OpenGL ES context version 3.2 flags 1 profile 0
        548     0:00:01.124847761   172 0x7f66940078a0 INFO               glcontext gstglcontext_egl.c:492:gst_gl_context_egl_create_context: gl context created: 140078144949584
        549     0:00:01.124892990   172 0x7f66940078a0 DEBUG              glcontext gstglcontext_egl.c:566:gst_gl_context_egl_create_context: No surface/handle !
        550     0:00:01.124913056   172 0x7f66940078a0 INFO               glcontext gstglcontext.c:1251:gst_gl_context_create_thread:<glcontextegl0> created context
        551     0:00:01.124925813   172 0x7f66940078a0 DEBUG              glcontext gstglcontext.c:754:gst_gl_context_activate:<glcontextegl0> activate:1
        552     0:00:01.125056339   172 0x7f66940078a0 INFO               glcontext gstglcontext.c:1267:gst_gl_context_create_thread:<glcontextegl0> available GL APIs: gles2
        553     0:00:01.125074643   172 0x7f66940078a0 DEBUG              glcontext gstglcontext.c:1286:gst_gl_context_create_thread:<glcontextegl0> Filling info
        554     0:00:01.125612559   172 0x7f66940078a0 INFO               glcontext gstglcontext.c:1080:_create_context_info:<glcontextegl0> GL_VERSION: OpenGL ES 3.2 Mesa 18.3.3
        555     0:00:01.125636705   172 0x7f66940078a0 INFO               glcontext gstglcontext.c:1083:_create_context_info:<glcontextegl0> GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 3.20
        556     0:00:01.125648309   172 0x7f66940078a0 INFO               glcontext gstglcontext.c:1085:_create_context_info:<glcontextegl0> GL_VENDOR: Intel Open Source Technology Center
        557     0:00:01.125663588   172 0x7f66940078a0 INFO               glcontext gstglcontext.c:1087:_create_context_info:<glcontextegl0> GL_RENDERER: Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
        558     0:00:01.126069606   172 0x7f66940078a0 DEBUG              glcontext gstglcontext.c:1424:gst_gl_context_fill_info:<glcontextegl0> GL_EXTENSIONS: GL_ANDROID_extension_pack_es31a GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_APPLE_texture_max_level GL_EXT_base_instance GL_EXT_blend_func_extended GL_EXT_blend_minmax GL_EXT_buffer_storage GL_EXT_clip_cull_distance GL_EXT_color_buffer_float GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_frag_depth GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_gpu_shader5 GL_EXT_map_buffer_range GL_EXT_multi_draw_arrays GL_EXT_occlusion_query_boolean GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_read_format_bgra GL_EXT_render_snorm GL_EXT_robustness GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_shader_integer_mix GL_EXT_shader_io_blocks GL_EXT_shader_samples_identical GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map_array GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_norm16 GL_EXT_texture_rg GL_EXT_texture_sRGB_decode GL_EXT_texture_type_2_10_10_10_REV GL_EXT_unpack_subimage GL_INTEL_conservative_rasterization GL_INTEL_performance_query GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_debug GL_KHR_no_error GL_KHR_robust_buffer_access_behavior GL_KHR_robustness GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_sliced_3d GL_MESA_framebuffer_flip_y GL_MESA_shader_integer_functions GL_NV_draw_buffers GL_NV_fbo_color_attachments GL_NV_fragment_shader_interlock GL_NV_image_formats GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_compressed_ETC1_RGB8_texture GL_OES_copy_image GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_get_program_binary GL_OES_gpu_shader5 GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_primitive_bounding_box GL_OES_required_internalformat GL_OES_rgb8_rgba8 GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_image_atomic GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_surfaceless_context GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_3D GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view GL_OES_vertex_array_object GL_OES_vertex_half_float GL_OES_viewport_array
        ...
        617     0:00:01.128329630   172 0x7f66940078a0 INFO               glcontext gstgldebug.c:352:_gst_gl_debug_enable:<glcontextegl0> Enabling GL context debugging
        618     0:00:01.128402461   172 0x7f66940078a0 INFO               glcontext gstglcontext.c:1140:_unlock_create_thread:<glcontextegl0> gl thread running
        619     0:00:01.128447966   172       0xfb68a0 INFO               glcontext gstglcontext.c:1046:gst_gl_context_create:<glcontextegl0> gl thread created
        620     0:00:01.128475728   172       0xfb68a0 DEBUG              gldisplay gstgldisplay.c:676:_get_gl_context_for_thread_unlocked:<gldisplayegl0> No GL context for thread 0x7f66940078a0
        621     0:00:01.128502670   172       0xfb68a0 DEBUG              gldisplay gstgldisplay.c:789:gst_gl_display_add_context:<gldisplayegl0> Adding GL context <glcontextegl0>
        622     0:00:01.128517007   172       0xfb68a0 DEBUG              gldisplay gstgldisplay.c:797:gst_gl_display_add_context:<gldisplayegl0> successfully inserted context <glcontextegl0>
        623     0:00:01.128572606   172 0x7f66940078a0 DEBUG                gldebug gstgldebug.c:320:_gst_gl_debug_callback:<glcontextegl0> low: GL debug marker from third party id:0, starting element gluploadelement0
        624     0:00:01.129411049   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:319:gst_gl_buffer_pool_new:<glbufferpool0> new GL buffer pool for context <glcontextegl0>
        625     0:00:01.129602003   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:111:gst_gl_buffer_pool_set_config:<glbufferpool0> 1280x720, caps video/x-raw(memory:DMABuf), format=(string)RGBA, width=(int)1280, height=(int)720, framerate=(fraction)0/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
        626     0:00:01.132893570   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:360:gst_gl_buffer_pool_finalize:<glbufferpool0> finalize GL buffer pool 0x7f66940bc0b0
        627     0:00:01.135439530   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:319:gst_gl_buffer_pool_new:<glbufferpool1> new GL buffer pool for context <glcontextegl0>
        628     0:00:01.135521277   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:111:gst_gl_buffer_pool_set_config:<glbufferpool1> 1280x720, caps video/x-raw(memory:DMABuf), format=(string)RGBA, width=(int)1280, height=(int)720, framerate=(fraction)0/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
        629     0:00:01.135664205   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:360:gst_gl_buffer_pool_finalize:<glbufferpool1> finalize GL buffer pool 0x7f66940bc220
        630     0:00:01.137504804   172       0xfb68a0 DEBUG               glupload gstglupload.c:1776:_upload_find_method:<glupload0> attempting upload with uploader GLMemory
        631     0:00:01.137552259   172       0xfb68a0 DEBUG               glupload gstglupload.c:1776:_upload_find_method:<glupload0> attempting upload with uploader Dmabuf
        632     0:00:01.137768199   172       0xfb68a0 DEBUG             gleglimage gsteglimage.c:370:_drm_fourcc_from_info: Getting DRM fourcc for RGBA plane 0
        633     0:00:01.137802118   172       0xfb68a0 DEBUG             gleglimage gsteglimage.c:445:gst_egl_image_from_dmabuf: fourcc AB24 (875708993) plane 0 (1280x720)
        634     0:00:01.137813565   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 0: 12375
        635     0:00:01.137824948   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 1: 1280
        636     0:00:01.137833311   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 2: 12374
        637     0:00:01.137841486   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 3: 720
        638     0:00:01.137849645   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 4: 12913
        639     0:00:01.137857970   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 5: 875708993
        640     0:00:01.137866623   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 6: 12914
        641     0:00:01.137874949   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 7: 76
        642     0:00:01.137883493   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 8: 12915
        643     0:00:01.137891694   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 9: 0
        644     0:00:01.137899847   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 10: 12916
        645     0:00:01.137908007   172       0xfb68a0 LOG               gleglimage gsteglimage.c:462:gst_egl_image_from_dmabuf: attr 11: 5120
        646     0:00:01.137924516   172       0xfb68a0 LOG                gldisplay gstgldisplay_egl.c:260:gst_gl_display_egl_from_gl_display:<gldisplayegl0> display <gldisplayegl0>is already a GstGLDisplayEGL
        667     0:00:01.152973210   172       0xfb68a0 LOG                gldisplay gstgldisplay_egl.c:260:gst_gl_display_egl_from_gl_display:<gldisplayegl0> display <gldisplayegl0>is already a GstGLDisplayEGL
        668     0:00:01.153412185   172 0x7f66940078a0 DEBUG           glbasememory gstglbasememory.c:178:gst_gl_base_memory_init: new GL buffer memory:0x7f667c1a4a80 size:3686400
        669     0:00:01.153453864   172 0x7f66940078a0 DEBUG          glbasetexture gstglmemory.c:340:gst_gl_memory_init: new GL texture context:<glcontextegl0> memory:0x7f667c1a4a80 target:2D format:6408 dimensions:1280x720 stride:5120 size:3686400
        672     got need context gst.gl.GLDisplay
        673     got need context gst.gl.app_context
        675     ** (myApp:172): CRITICAL **: 02:47:37.191: gst_gl_context_get_display: assertion 'GST_IS_GL_CONTEXT (context)' failed
        677     ** (myApp:172): CRITICAL **: 02:47:37.191: gst_gl_display_get_handle_type: assertion 'GST_IS_GL_DISPLAY (display)' failed
        678     0:00:01.162750514   172       0x5bbe00 WARN                 glutils gstglutils.c:384:gst_gl_handle_set_context:<gluploadelement0> warning: Cannot set a GL context with a different display type
        679     0:00:01.162842863   172       0x5bbe00 WARN                 glutils gstglutils.c:384:gst_gl_handle_set_context:<gluploadelement0> warning: Cannot set a GL context with a different display type
        684     0:00:01.171573162   172 0x7f66c4004890 INFO               gldisplay gstgldisplay.c:289:gst_gl_display_new: creating a display, user choice:(NULL) (platform: (NULL))
        685     0:00:01.172184559   172 0x7f66c4004890 DEBUG              gldisplay gstgldisplay_egl.c:116:gst_gl_display_egl_get_from_native: egl no display extensions: EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_MESA_platform_gbm
        687     0:00:01.246980731   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:319:gst_gl_buffer_pool_new:<glbufferpool2> new GL buffer pool for context <glcontextegl0>
        688     0:00:01.247122421   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:111:gst_gl_buffer_pool_set_config:<glbufferpool2> 1280x720, caps video/x-raw(memory:DMABuf), format=(string)RGBA, width=(int)1280, height=(int)720, framerate=(fraction)0/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
        689     0:00:01.247543458   172       0xfb68a0 LOG             glbufferpool gstglbufferpool.c:360:gst_gl_buffer_pool_finalize:<glbufferpool2> finalize GL buffer pool 0x7f66940bc390



-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Víctor Jáquez
Gesendet: Mittwoch, 5. Februar 2020 11:25
An: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Betreff: [External] Re: ZeroCopy + AppSink + VAAPI + Qt

On Wed, 05 Feb 2020 at 11:15, Víctor Jáquez wrote:
> On Tue, 04 Feb 2020 at 14:00, Timtchenko, Michael wrote:
> >
> > What context is supposed to get passed into
> > gst_egl_image_from_dmabuf(xxx). Is it the target context, where i want to use the fd, or is it a different one?
> >
> > But my biggest problem is, that i don't have a glue, how i can
> > retrieve a texture from the given eglimage resp. its fd. I cannot
> > find any sources on the web, related to EglImage texture-conversions or anything like that.
>
> Not an epxert, but you don't retrieve a texture from an EGLImage. You
> bind the EGLImage to a texture handled by your application's GL
> Context. Look for EGLImageTargetTexture2D

Another option would be to use the glupload element, so you appsink would retrieve gl-based buffer which you can "map" with GST_MAP_GL flag and it will return a texture ready to use. But, to achieve that, you must pass your application's GL context, wrapping it inside a GstGLContext, to the pipeline through the sync bus.

In gst-plugins-base code there are examples of this.

vmjl
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


Bitte beachten / Please note!

*******************************************************************************

AGCO GmbH
Sitz der AGCO GmbH: Johann-Georg-Fendt-Str.4, 87616 Marktoberdorf, Germany Registergericht Amtsgericht Kempten HRB 10327
Geschäftsführer: Christoph Groeblinghoff, Ingrid Bussjaeger-Martin, Dr. Heribert Reiter, Ekkehart Glaeser Vorsitzender des Aufsichtsrates: Torsten Dehner

*******************************************************************************

Diese E-Mail ist nur für den Empfänger bestimmt, an den es gerichtet ist und kann vertrauliches bzw. unter das Berufsgeheimnis fallendes Material enthalten. Jegliche darin enthaltene Ansicht oder Meinungsäußerung ist die des Autors und stellt nicht notwendigerweise die Ansicht oder Meinung von AGCO dar. Sind Sie nicht der Empfänger, so haben Sie diese E-Mail irrtümlich erhalten und jegliche Verwendung, Veröffentlichung, Weiterleitung, Abschrift oder jeglicher Druck dieser E-Mail ist strengstens untersagt. Weder AGCO noch der Absender übernehmen die Haftung für Viren; es obliegt Ihrer Verantwortung, die E-Mail und deren angehängte Dateien (sofern vorhanden) auf Viren zu überprüfen.

*******************************************************************************

This email is intended solely for the use of the individual to whom it is addressed and may contain confidential and/or privileged material. Any views or opinions presented are solely those of the author and do not necessarily represent those of AGCO. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Neither AGCO nor the sender accepts any responsibility for viruses and it is your responsibility to scan and virus check the email and its
attachment(s) (if any).

*******************************************************************************
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

This email is intended solely for the use of the individual to whom it is addressed and may contain confidential and/or privileged material. Any views or opinions presented are solely those of the author and do not necessarily represent those of AGCO. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Neither AGCO nor the sender accepts any responsibility for viruses and it is your responsibility to scan and virus check the e-mail and its attachment(s) (if any).


More information about the gstreamer-devel mailing list