Hi,
I am new to gstreamer and I am working on a C project with gstreamer 1.8.2 librairies and plugins (built from sources). I want to upload a video to an openGL texture. For that, I found the glimagesink plugin that seems to do what I want and gst-inspect confirms that it is installed but gst_element_factory_make("glimagesink", "glimagesink0") returns NULL Can anybody explain me this behaviour ? Do I need to do something else to access glimagesink element from my application ? Thanks, Clement |
On Tue, 2016-07-12 at 07:10 -0700, clement wrote:
Hi, > I am new to gstreamer and I am working on a C project with gstreamer > 1.8.2 librairies and plugins (built from sources). I want to upload a > video to an openGL texture. For that, I found the glimagesink plugin > that seems to do what I want and gst-inspect confirms that it is > installed but gst_element_factory_make("glimagesink", "glimagesink0") > returns NULL Can anybody explain me this behaviour ? Do I need to do > something else to access glimagesink element from my application ? Are you sure you have it installed? Does $ gst-inspect-1.0 glimagesink show lots of output? (element details) Did you call gst_init() at the start of your application and before calling gst_element_factory_make() ? Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks for your reply,
$gst-inspect-1.0 glimagesink gives me this : Factory Details: Rank secondary (128) Long-name GL Sink Bin Klass Sink/Video Description Infrastructure to process GL textures Author Matthew Waters <matthew@centricular.com> Plugin Details: Name opengl Description OpenGL plugin Filename /opt/gstreamer/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstopengl.so Version 1.8.2 License LGPL Source module gst-plugins-bad Source release date 2016-06-09 Binary package GStreamer Bad Plug-ins source release Origin URL Unknown package origin GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBin +----GstGLSinkBin +----GstGLImageSinkBin Implemented Interfaces: GstChildProxy GstVideoOverlay GstNavigation GstColorBalance Pad Templates: SINK template: 'sink' Availability: Always Capabilities: video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition) format: { RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE } width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] video/x-raw(memory:EGLImage, meta:GstVideoOverlayComposition) format: RGBA width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition) format: { RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE } width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] video/x-raw(meta:GstVideoGLTextureUploadMeta, meta:GstVideoOverlayComposition) format: RGBA width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] video/x-raw(memory:GLMemory) format: { RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE } width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] video/x-raw(memory:EGLImage) format: RGBA width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] video/x-raw format: { RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE } width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] video/x-raw(meta:GstVideoGLTextureUploadMeta) format: RGBA width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] Element Flags: no flags set Bin Flags: no flags set Element Implementation: Has change_state() function: 0xf6c0a641 Element has no clocking capabilities. Element has no URI handling capabilities. Pads: SINK: 'sink' Element Properties: name : The name of the object flags: readable, writable String. Default: "glimagesinkbin0" parent : The parent of the object flags: readable, writable Object of type "GstObject" async-handling : The bin will handle Asynchronous state changes flags: readable, writable Boolean. Default: false message-forward : Forwards all children messages flags: readable, writable Boolean. Default: false sink : The GL sink chain to use flags: readable, writable, changeable only in NULL or READY state Object of type "GstElement" sync : Sync on the clock flags: readable, writable Boolean. Default: true max-lateness : Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited) flags: readable, writable Integer64. Range: -1 - 9223372036854775807 Default: 20000000 qos : Generate Quality-of-Service events upstream flags: readable, writable Boolean. Default: true async : Go asynchronously to PAUSED flags: readable, writable Boolean. Default: true ts-offset : Timestamp offset in nanoseconds flags: readable, writable Integer64. Range: -9223372036854775808 - 9223372036854775807 Default: 0 enable-last-sample : Enable the last-sample property flags: readable, writable Boolean. Default: true last-sample : The last sample received in the sink flags: readable Boxed pointer of type "GstSample" blocksize : Size in bytes to pull per buffer (0 = default) flags: readable, writable Unsigned Integer. Range: 0 - 4294967295 Default: 4096 render-delay : Additional render delay of the sink in nanoseconds flags: readable, writable Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 throttle-time : The time to keep between rendered buffers (0 = disabled) flags: readable, writable Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 max-bitrate : The maximum bits per second to render (0 = disabled) flags: readable, writable Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 contrast : contrast flags: readable, writable, controllable Double. Range: 0 - 2 Default: 1 brightness : brightness flags: readable, writable, controllable Double. Range: -1 - 1 Default: 0 hue : hue flags: readable, writable, controllable Double. Range: -1 - 1 Default: 0 saturation : saturation flags: readable, writable, controllable Double. Range: 0 - 2 Default: 1 force-aspect-ratio : When enabled, scaling will respect original aspect ratio flags: readable, writable Boolean. Default: true pixel-aspect-ratio : The pixel aspect ratio of the device flags: readable, writable Fraction. Range: 0/1 - 2147483647/1 Default: 0/1 handle-events : When enabled, XEvents will be selected and handled flags: readable, writable Boolean. Default: true context : Get OpenGL context flags: readable Object of type "GstGLContext" ignore-alpha : When enabled, alpha will be ignored and converted to black flags: readable, writable Boolean. Default: true show-preroll-frame : Whether to render video frames during preroll flags: readable, writable Boolean. Default: true output-multiview-mode: Choose output mode for multiview/3D video flags: readable, writable Enum "GstVideoMultiviewMode" Default: 0, "mono" (-1): none - GST_VIDEO_MULTIVIEW_MODE_NONE (0): mono - GST_VIDEO_MULTIVIEW_MODE_MONO (1): left - GST_VIDEO_MULTIVIEW_MODE_LEFT (2): right - GST_VIDEO_MULTIVIEW_MODE_RIGHT (3): side-by-side - GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE (4): side-by-side-quincunx - GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX (5): column-interleaved - GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED (6): row-interleaved - GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED (7): top-bottom - GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM (8): checkerboard - GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD (32): frame-by-frame - GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME (33): multiview-frame-by-frame - GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME (34): separated - GST_VIDEO_MULTIVIEW_MODE_SEPARATED output-multiview-flags: Output multiview layout modifier flags flags: readable, writable Flags "GstVideoMultiviewFlags" Default: 0x00000000, "none" (0x00000000): none - GST_VIDEO_MULTIVIEW_FLAGS_NONE (0x00000001): right-view-first - GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST (0x00000002): left-flipped - GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED (0x00000004): left-flopped - GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED (0x00000008): right-flipped - GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED (0x00000010): right-flopped - GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED (0x00004000): half-aspect - GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT (0x00008000): mixed-mono - GST_VIDEO_MULTIVIEW_FLAGS_MIXED_MONO output-multiview-downmix-mode: Output anaglyph type to generate when downmixing to mono flags: readable, writable Enum "GstGLStereoDownmix" Default: 0, "green-magenta-dubois" (0): green-magenta-dubois - Dubois optimised Green-Magenta anaglyph (1): red-cyan-dubois - Dubois optimised Red-Cyan anaglyph (2): amber-blue-dubois - Dubois optimised Amber-Blue anaglyph Element Signals: "client-draw" : gboolean user_function (GstElement* object, GstGLContext* arg0, GstSample* arg1, gpointer user_data); "client-reshape" : gboolean user_function (GstElement* object, GstGLContext* arg0, guint arg1, guint arg2, gpointer user_data); "create-element" : GstElement * user_function (GstElement* object, gpointer user_data); Children: sink glcolorbalance0 glcolorconvertelement0 gluploadelement0 I also call gst_init() in the first lines of my application, before all the gst_element_factory_make. The other elements are correctly created by gst_element_factory_make, it just fails with glimagesink. |
Free forum by Nabble | Edit this page |