mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
glimagesink: forward ALL the properties on the bin
This commit is contained in:
parent
3d8eb44b7c
commit
3aad6d73f1
1 changed files with 93 additions and 8 deletions
|
@ -100,6 +100,20 @@
|
||||||
GST_DEBUG_CATEGORY (gst_debug_glimage_sink);
|
GST_DEBUG_CATEGORY (gst_debug_glimage_sink);
|
||||||
#define GST_CAT_DEFAULT gst_debug_glimage_sink
|
#define GST_CAT_DEFAULT gst_debug_glimage_sink
|
||||||
|
|
||||||
|
#define DEFAULT_SHOW_PREROLL_FRAME TRUE
|
||||||
|
#define DEFAULT_SYNC TRUE
|
||||||
|
#define DEFAULT_MAX_LATENESS -1
|
||||||
|
#define DEFAULT_QOS FALSE
|
||||||
|
#define DEFAULT_ASYNC TRUE
|
||||||
|
#define DEFAULT_TS_OFFSET 0
|
||||||
|
#define DEFAULT_BLOCKSIZE 4096
|
||||||
|
#define DEFAULT_RENDER_DELAY 0
|
||||||
|
#define DEFAULT_ENABLE_LAST_SAMPLE TRUE
|
||||||
|
#define DEFAULT_THROTTLE_TIME 0
|
||||||
|
#define DEFAULT_MAX_BITRATE 0
|
||||||
|
#define DEFAULT_HANDLE_EVENTS TRUE
|
||||||
|
#define DEFAULT_FORCE_ASPECT_RATIO TRUE
|
||||||
|
|
||||||
typedef GstGLSinkBin GstGLImageSinkBin;
|
typedef GstGLSinkBin GstGLImageSinkBin;
|
||||||
typedef GstGLSinkBinClass GstGLImageSinkBinClass;
|
typedef GstGLSinkBinClass GstGLImageSinkBinClass;
|
||||||
|
|
||||||
|
@ -109,7 +123,20 @@ enum
|
||||||
{
|
{
|
||||||
PROP_BIN_0,
|
PROP_BIN_0,
|
||||||
PROP_BIN_FORCE_ASPECT_RATIO,
|
PROP_BIN_FORCE_ASPECT_RATIO,
|
||||||
|
PROP_BIN_HANDLE_EVENTS,
|
||||||
|
PROP_BIN_CONTEXT,
|
||||||
|
PROP_BIN_SHOW_PREROLL_FRAME,
|
||||||
|
PROP_BIN_SYNC,
|
||||||
|
PROP_BIN_MAX_LATENESS,
|
||||||
|
PROP_BIN_QOS,
|
||||||
|
PROP_BIN_ASYNC,
|
||||||
|
PROP_BIN_TS_OFFSET,
|
||||||
|
PROP_BIN_ENABLE_LAST_SAMPLE,
|
||||||
PROP_BIN_LAST_SAMPLE,
|
PROP_BIN_LAST_SAMPLE,
|
||||||
|
PROP_BIN_BLOCKSIZE,
|
||||||
|
PROP_BIN_RENDER_DELAY,
|
||||||
|
PROP_BIN_THROTTLE_TIME,
|
||||||
|
PROP_BIN_MAX_BITRATE,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -183,16 +210,76 @@ gst_gl_image_sink_bin_class_init (GstGLImageSinkBinClass * klass)
|
||||||
gobject_class->get_property = gst_gl_image_sink_bin_get_property;
|
gobject_class->get_property = gst_gl_image_sink_bin_get_property;
|
||||||
gobject_class->set_property = gst_gl_image_sink_bin_set_property;
|
gobject_class->set_property = gst_gl_image_sink_bin_set_property;
|
||||||
|
|
||||||
|
/* gl sink */
|
||||||
g_object_class_install_property (gobject_class, PROP_BIN_FORCE_ASPECT_RATIO,
|
g_object_class_install_property (gobject_class, PROP_BIN_FORCE_ASPECT_RATIO,
|
||||||
g_param_spec_boolean ("force-aspect-ratio",
|
g_param_spec_boolean ("force-aspect-ratio",
|
||||||
"Force aspect ratio",
|
"Force aspect ratio",
|
||||||
"When enabled, scaling will respect original aspect ratio", TRUE,
|
"When enabled, scaling will respect original aspect ratio",
|
||||||
|
DEFAULT_FORCE_ASPECT_RATIO,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_HANDLE_EVENTS,
|
||||||
|
g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",
|
||||||
|
"When enabled, alpha will be ignored and converted to black",
|
||||||
|
DEFAULT_HANDLE_EVENTS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_CONTEXT,
|
||||||
|
g_param_spec_object ("context", "OpenGL context", "Get OpenGL context",
|
||||||
|
GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
/* video sink */
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_SHOW_PREROLL_FRAME,
|
||||||
|
g_param_spec_boolean ("show-preroll-frame", "Show preroll frame",
|
||||||
|
"Whether to render video frames during preroll",
|
||||||
|
DEFAULT_SHOW_PREROLL_FRAME,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
/* base sink */
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_SYNC,
|
||||||
|
g_param_spec_boolean ("sync", "Sync", "Sync on the clock", DEFAULT_SYNC,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_MAX_LATENESS,
|
||||||
|
g_param_spec_int64 ("max-lateness", "Max Lateness",
|
||||||
|
"Maximum number of nanoseconds that a buffer can be late before it "
|
||||||
|
"is dropped (-1 unlimited)", -1, G_MAXINT64, DEFAULT_MAX_LATENESS,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_QOS,
|
||||||
|
g_param_spec_boolean ("qos", "Qos",
|
||||||
|
"Generate Quality-of-Service events upstream", DEFAULT_QOS,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_ASYNC,
|
||||||
|
g_param_spec_boolean ("async", "Async",
|
||||||
|
"Go asynchronously to PAUSED", DEFAULT_ASYNC,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_TS_OFFSET,
|
||||||
|
g_param_spec_int64 ("ts-offset", "TS Offset",
|
||||||
|
"Timestamp offset in nanoseconds", G_MININT64, G_MAXINT64,
|
||||||
|
DEFAULT_TS_OFFSET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_ENABLE_LAST_SAMPLE,
|
||||||
|
g_param_spec_boolean ("enable-last-sample", "Enable Last Buffer",
|
||||||
|
"Enable the last-sample property", DEFAULT_ENABLE_LAST_SAMPLE,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
g_object_class_install_property (gobject_class, PROP_BIN_LAST_SAMPLE,
|
g_object_class_install_property (gobject_class, PROP_BIN_LAST_SAMPLE,
|
||||||
g_param_spec_boxed ("last-sample", "Last Sample",
|
g_param_spec_boxed ("last-sample", "Last Sample",
|
||||||
"The last sample received in the sink", GST_TYPE_SAMPLE,
|
"The last sample received in the sink", GST_TYPE_SAMPLE,
|
||||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_BLOCKSIZE,
|
||||||
|
g_param_spec_uint ("blocksize", "Block size",
|
||||||
|
"Size in bytes to pull per buffer (0 = default)", 0, G_MAXUINT,
|
||||||
|
DEFAULT_BLOCKSIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_RENDER_DELAY,
|
||||||
|
g_param_spec_uint64 ("render-delay", "Render Delay",
|
||||||
|
"Additional render delay of the sink in nanoseconds", 0, G_MAXUINT64,
|
||||||
|
DEFAULT_RENDER_DELAY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_THROTTLE_TIME,
|
||||||
|
g_param_spec_uint64 ("throttle-time", "Throttle time",
|
||||||
|
"The time to keep between rendered buffers (0 = disabled)", 0,
|
||||||
|
G_MAXUINT64, DEFAULT_THROTTLE_TIME,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
g_object_class_install_property (gobject_class, PROP_BIN_MAX_BITRATE,
|
||||||
|
g_param_spec_uint64 ("max-bitrate", "Max Bitrate",
|
||||||
|
"The maximum bits per second to render (0 = disabled)", 0,
|
||||||
|
G_MAXUINT64, DEFAULT_MAX_BITRATE,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_DRAW] =
|
gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_DRAW] =
|
||||||
g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass),
|
g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass),
|
||||||
|
@ -380,9 +467,9 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass)
|
||||||
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO,
|
g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO,
|
||||||
g_param_spec_boolean ("force-aspect-ratio",
|
g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio",
|
||||||
"Force aspect ratio",
|
"When enabled, scaling will respect original aspect ratio",
|
||||||
"When enabled, scaling will respect original aspect ratio", TRUE,
|
DEFAULT_FORCE_ASPECT_RATIO,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO,
|
g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO,
|
||||||
|
@ -391,9 +478,7 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass)
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_CONTEXT,
|
g_object_class_install_property (gobject_class, PROP_CONTEXT,
|
||||||
g_param_spec_object ("context",
|
g_param_spec_object ("context", "OpenGL context", "Get OpenGL context",
|
||||||
"OpenGL context",
|
|
||||||
"Get OpenGL context",
|
|
||||||
GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_HANDLE_EVENTS,
|
g_object_class_install_property (gobject_class, PROP_HANDLE_EVENTS,
|
||||||
|
@ -401,7 +486,7 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass)
|
||||||
"When enabled, XEvents will be selected and handled", TRUE,
|
"When enabled, XEvents will be selected and handled", TRUE,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_HANDLE_EVENTS,
|
g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA,
|
||||||
g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",
|
g_param_spec_boolean ("ignore-alpha", "Ignore Alpha",
|
||||||
"When enabled, alpha will be ignored and converted to black", TRUE,
|
"When enabled, alpha will be ignored and converted to black", TRUE,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
Loading…
Reference in a new issue