GST_PAD_ALWAYS,
GST_STATIC_CAPS(gst_vaapidecode_src_caps_str));
+/* GstImplementsInterface interface */
+static gboolean
+gst_vaapidecode_implements_interface_supported(
+ GstImplementsInterface *iface,
+ GType type
+)
+{
+ return (type == GST_TYPE_VIDEO_CONTEXT);
+}
+
+static void
+gst_vaapidecode_implements_iface_init(GstImplementsInterfaceClass *iface)
+{
+ iface->supported = gst_vaapidecode_implements_interface_supported;
+}
+
+/* GstVideoContext interface */
static void
-gst_vaapidecode_implements_iface_init(GstImplementsInterfaceClass *iface);
+gst_vaapidecode_set_video_context(GstVideoContext *context, const gchar *type,
+ const GValue *value)
+{
+ GstVaapiDecode *decode = GST_VAAPIDECODE (context);
+ gst_vaapi_set_display (type, value, &decode->display);
+}
static void
-gst_video_context_interface_init(GstVideoContextInterface *iface);
+gst_video_context_interface_init(GstVideoContextInterface *iface)
+{
+ iface->set_context = gst_vaapidecode_set_video_context;
+}
#define GstVideoContextClass GstVideoContextInterface
G_DEFINE_TYPE_WITH_CODE(
return gst_vaapidecode_create(decode, caps);
}
-/* GstImplementsInterface interface */
-
-static gboolean
-gst_vaapidecode_implements_interface_supported(
- GstImplementsInterface *iface,
- GType type
-)
-{
- return (type == GST_TYPE_VIDEO_CONTEXT);
-}
-
-static void
-gst_vaapidecode_implements_iface_init(GstImplementsInterfaceClass *iface)
-{
- iface->supported = gst_vaapidecode_implements_interface_supported;
-}
-
-/* GstVideoContext interface */
-
-static void
-gst_vaapidecode_set_video_context(GstVideoContext *context, const gchar *type,
- const GValue *value)
-{
- GstVaapiDecode *decode = GST_VAAPIDECODE (context);
- gst_vaapi_set_display (type, value, &decode->display);
-}
-
-static void
-gst_video_context_interface_init(GstVideoContextInterface *iface)
-{
- iface->set_context = gst_vaapidecode_set_video_context;
-}
-
static void
gst_vaapidecode_finalize(GObject *object)
{
GstBaseTransformClass parent_class;
};
+/* GstImplementsInterface interface */
+static gboolean
+gst_vaapidownload_implements_interface_supported(
+ GstImplementsInterface *iface,
+ GType type
+)
+{
+ return (type == GST_TYPE_VIDEO_CONTEXT);
+}
+
+static void
+gst_vaapidownload_implements_iface_init(GstImplementsInterfaceClass *iface)
+{
+ iface->supported = gst_vaapidownload_implements_interface_supported;
+}
+
+/* GstVideoContext interface */
static void
-gst_vaapidownload_implements_iface_init(GstImplementsInterfaceClass *iface);
+gst_vaapidownload_set_video_context(GstVideoContext *context, const gchar *type,
+ const GValue *value)
+{
+ GstVaapiDownload *download = GST_VAAPIDOWNLOAD (context);
+ gst_vaapi_set_display (type, value, &download->display);
+}
static void
-gst_video_context_interface_init(GstVideoContextInterface *iface);
+gst_video_context_interface_init(GstVideoContextInterface *iface)
+{
+ iface->set_context = gst_vaapidownload_set_video_context;
+}
#define GstVideoContextClass GstVideoContextInterface
G_DEFINE_TYPE_WITH_CODE(
GstQuery *query
);
-/* GstImplementsInterface interface */
-
-static gboolean
-gst_vaapidownload_implements_interface_supported(
- GstImplementsInterface *iface,
- GType type
-)
-{
- return (type == GST_TYPE_VIDEO_CONTEXT);
-}
-
-static void
-gst_vaapidownload_implements_iface_init(GstImplementsInterfaceClass *iface)
-{
- iface->supported = gst_vaapidownload_implements_interface_supported;
-}
-
-/* GstVideoContext interface */
-
-static void
-gst_vaapidownload_set_video_context(GstVideoContext *context, const gchar *type,
- const GValue *value)
-{
- GstVaapiDownload *download = GST_VAAPIDOWNLOAD (context);
- gst_vaapi_set_display (type, value, &download->display);
-}
-
-static void
-gst_video_context_interface_init(GstVideoContextInterface *iface)
-{
- iface->set_context = gst_vaapidownload_set_video_context;
-}
-
static void
gst_vaapidownload_destroy(GstVaapiDownload *download)
{
GST_PAD_ALWAYS,
GST_STATIC_CAPS(gst_vaapipostproc_src_caps_str));
+/* GstImplementsInterface interface */
+static gboolean
+gst_vaapipostproc_implements_interface_supported(
+ GstImplementsInterface *iface,
+ GType type
+)
+{
+ return (type == GST_TYPE_VIDEO_CONTEXT);
+}
+
+static void
+gst_vaapipostproc_implements_iface_init(GstImplementsInterfaceClass *iface)
+{
+ iface->supported = gst_vaapipostproc_implements_interface_supported;
+}
+
+/* GstVideoContext interface */
static void
-gst_vaapipostproc_implements_iface_init(GstImplementsInterfaceClass *iface);
+gst_vaapipostproc_set_video_context(
+ GstVideoContext *context,
+ const gchar *type,
+ const GValue *value
+)
+{
+ GstVaapiPostproc * const postproc = GST_VAAPIPOSTPROC(context);
+
+ gst_vaapi_set_display(type, value, &postproc->display);
+}
static void
-gst_video_context_interface_init(GstVideoContextInterface *iface);
+gst_video_context_interface_init(GstVideoContextInterface *iface)
+{
+ iface->set_context = gst_vaapipostproc_set_video_context;
+}
#define GstVideoContextClass GstVideoContextInterface
G_DEFINE_TYPE_WITH_CODE(
return GST_VAAPIPOSTPROC(gst_pad_get_parent_element(pad));
}
-/* GstImplementsInterface interface */
-
-static gboolean
-gst_vaapipostproc_implements_interface_supported(
- GstImplementsInterface *iface,
- GType type
-)
-{
- return (type == GST_TYPE_VIDEO_CONTEXT);
-}
-
-static void
-gst_vaapipostproc_implements_iface_init(GstImplementsInterfaceClass *iface)
-{
- iface->supported = gst_vaapipostproc_implements_interface_supported;
-}
-
-/* GstVideoContext interface */
-
-static void
-gst_vaapipostproc_set_video_context(
- GstVideoContext *context,
- const gchar *type,
- const GValue *value
-)
-{
- GstVaapiPostproc * const postproc = GST_VAAPIPOSTPROC(context);
-
- gst_vaapi_set_display(type, value, &postproc->display);
-}
-
-static void
-gst_video_context_interface_init(GstVideoContextInterface *iface)
-{
- iface->set_context = gst_vaapipostproc_set_video_context;
-}
-
static inline gboolean
gst_vaapipostproc_ensure_display(GstVaapiPostproc *postproc)
{
GST_PAD_ALWAYS,
GST_STATIC_CAPS(gst_vaapisink_sink_caps_str));
-static void
-gst_vaapisink_implements_iface_init(GstImplementsInterfaceClass *iface);
-
-static void
-gst_vaapisink_video_context_iface_init(GstVideoContextInterface *iface);
-
-static void
-gst_vaapisink_xoverlay_iface_init(GstXOverlayClass *iface);
-
-G_DEFINE_TYPE_WITH_CODE(
- GstVaapiSink,
- gst_vaapisink,
- GST_TYPE_VIDEO_SINK,
- G_IMPLEMENT_INTERFACE(GST_TYPE_IMPLEMENTS_INTERFACE,
- gst_vaapisink_implements_iface_init);
- G_IMPLEMENT_INTERFACE(GST_TYPE_VIDEO_CONTEXT,
- gst_vaapisink_video_context_iface_init);
- G_IMPLEMENT_INTERFACE(GST_TYPE_X_OVERLAY,
- gst_vaapisink_xoverlay_iface_init))
-
-enum {
- PROP_0,
-
- PROP_DISPLAY_TYPE,
- PROP_FULLSCREEN,
- PROP_SYNCHRONOUS,
- PROP_USE_REFLECTION,
- PROP_ROTATION,
-};
-
-#define DEFAULT_DISPLAY_TYPE GST_VAAPI_DISPLAY_TYPE_ANY
-#define DEFAULT_ROTATION GST_VAAPI_ROTATION_0
-
/* GstImplementsInterface interface */
-
static gboolean
gst_vaapisink_implements_interface_supported(
GstImplementsInterface *iface,
}
/* GstVideoContext interface */
-
static void
gst_vaapisink_set_video_context(GstVideoContext *context, const gchar *type,
const GValue *value)
iface->set_context = gst_vaapisink_set_video_context;
}
+static void
+gst_vaapisink_xoverlay_iface_init(GstXOverlayClass *iface);
+
+G_DEFINE_TYPE_WITH_CODE(
+ GstVaapiSink,
+ gst_vaapisink,
+ GST_TYPE_VIDEO_SINK,
+ G_IMPLEMENT_INTERFACE(GST_TYPE_IMPLEMENTS_INTERFACE,
+ gst_vaapisink_implements_iface_init);
+ G_IMPLEMENT_INTERFACE(GST_TYPE_VIDEO_CONTEXT,
+ gst_vaapisink_video_context_iface_init);
+ G_IMPLEMENT_INTERFACE(GST_TYPE_X_OVERLAY,
+ gst_vaapisink_xoverlay_iface_init))
+
+enum {
+ PROP_0,
+
+ PROP_DISPLAY_TYPE,
+ PROP_FULLSCREEN,
+ PROP_SYNCHRONOUS,
+ PROP_USE_REFLECTION,
+ PROP_ROTATION,
+};
+
+#define DEFAULT_DISPLAY_TYPE GST_VAAPI_DISPLAY_TYPE_ANY
+#define DEFAULT_ROTATION GST_VAAPI_ROTATION_0
+
/* GstXOverlay interface */
#if USE_X11
GST_PAD_ALWAYS,
GST_STATIC_CAPS(gst_vaapiupload_vaapi_caps_str));
+
+/* GstImplementsInterface interface */
+static gboolean
+gst_vaapiupload_implements_interface_supported(
+ GstImplementsInterface *iface,
+ GType type
+)
+{
+ return (type == GST_TYPE_VIDEO_CONTEXT);
+}
+
static void
-gst_vaapiupload_implements_iface_init(GstImplementsInterfaceClass *iface);
+gst_vaapiupload_implements_iface_init(GstImplementsInterfaceClass *iface)
+{
+ iface->supported = gst_vaapiupload_implements_interface_supported;
+}
+/* GstVideoContext interface */
static void
-gst_video_context_interface_init(GstVideoContextInterface *iface);
+gst_vaapiupload_set_video_context(GstVideoContext *context, const gchar *type,
+ const GValue *value)
+{
+ GstVaapiUpload * const upload = GST_VAAPIUPLOAD(context);
+
+ gst_vaapi_set_display(type, value, &upload->display);
+
+ if (upload->uploader)
+ gst_vaapi_uploader_ensure_display(upload->uploader, upload->display);
+}
+
+static void
+gst_video_context_interface_init(GstVideoContextInterface *iface)
+{
+ iface->set_context = gst_vaapiupload_set_video_context;
+}
#define GstVideoContextClass GstVideoContextInterface
G_DEFINE_TYPE_WITH_CODE(
GstQuery *query
);
-/* GstImplementsInterface interface */
-
-static gboolean
-gst_vaapiupload_implements_interface_supported(
- GstImplementsInterface *iface,
- GType type
-)
-{
- return (type == GST_TYPE_VIDEO_CONTEXT);
-}
-
-static void
-gst_vaapiupload_implements_iface_init(GstImplementsInterfaceClass *iface)
-{
- iface->supported = gst_vaapiupload_implements_interface_supported;
-}
-
-/* GstVideoContext interface */
-
-static void
-gst_vaapiupload_set_video_context(GstVideoContext *context, const gchar *type,
- const GValue *value)
-{
- GstVaapiUpload * const upload = GST_VAAPIUPLOAD(context);
-
- gst_vaapi_set_display(type, value, &upload->display);
-
- if (upload->uploader)
- gst_vaapi_uploader_ensure_display(upload->uploader, upload->display);
-}
-
-static void
-gst_video_context_interface_init(GstVideoContextInterface *iface)
-{
- iface->set_context = gst_vaapiupload_set_video_context;
-}
-
static void
gst_vaapiupload_destroy(GstVaapiUpload *upload)
{