diff options
author | Robert Bragg <robert@linux.intel.com> | 2013-03-19 18:41:14 +0000 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2013-06-21 18:59:09 +0100 |
commit | 595a06e415b6936245b5dc8d95830b57f6501689 (patch) | |
tree | 3d44a94ad9c07024982edf597a4b2cb29f9628f3 /cogl-gst | |
parent | 1eca1631a74f866095b0fc85f2b8b20d82ce2894 (diff) | |
download | cogl-595a06e415b6936245b5dc8d95830b57f6501689.tar.gz |
cogl-gst: remove experimental "HW Decode" code
The experimental HW decode path was adapted from clutter-gst based on
some experimental gstreamer api. This path was disabled by upstream
gstreamer developers back in september last year due to instabilities.
Without understanding how the experimental api is implemented it seems
rather strange to be plucking out the GL handle of a cogl texture and
passing that to some unknown gstreamer code which would presumably
somehow have to use the same GL context as Cogl to be able to do
something with that texture. For now we can strip all of this unused
code and it would be easy enough to re-instate later if it's useful.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 2a24cb9f2a283af87bb685b3e9c7e3af1ffeab6e)
Diffstat (limited to 'cogl-gst')
-rw-r--r-- | cogl-gst/cogl-gst-video-sink.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/cogl-gst/cogl-gst-video-sink.c b/cogl-gst/cogl-gst-video-sink.c index a0786f03..bc41f608 100644 --- a/cogl-gst/cogl-gst-video-sink.c +++ b/cogl-gst/cogl-gst-video-sink.c @@ -48,10 +48,6 @@ #define COGL_GST_TEXTURE_FLAGS \ (COGL_TEXTURE_NO_SLICING | COGL_TEXTURE_NO_ATLAS) #define COGL_GST_DEFAULT_PRIORITY (G_PRIORITY_HIGH_IDLE) -#ifdef HAVE_HW_DECODER_SUPPORT -#define GST_USE_UNSTABLE_API 1 -#include <gst/video/gstsurfacemeta.h> -#endif #define BASE_SINK_CAPS "{ AYUV," \ "YV12," \ @@ -143,9 +139,6 @@ struct _CoglGstVideoSinkPrivate GstFlowReturn flow_return; int free_layer; GstVideoInfo info; - #ifdef HAVE_HW_DECODER_SUPPORT - GstSurfaceConverter *converter; - #endif }; static void @@ -570,67 +563,6 @@ static CoglGstRenderer ayuv_glsl_renderer = cogl_gst_ayuv_upload, }; -#ifdef HAVE_HW_DECODER_SUPPORT - -static void -cogl_gst_hw_init (CoglGstVideoSink *sink) -{ - create_template_pipeline (sink, NULL, NULL, 1); -} - -static void -cogl_gst_hw_deinit (CoglGstVideoSink* sink) -{ - if (sink->priv->converter != NULL) - g_object_unref (sink->priv->converter); - sink->priv->converter = NULL; -} - -static CoglBool -cogl_gst_hw_upload (CoglGstVideoSink *sink, - GstBuffer *buffer) -{ - CoglGstVideoSinkPrivate *priv = sink->priv; - GstSurfaceMeta* surface = gst_buffer_get_surface_meta (buffer); - - if (G_UNLIKELY (priv->converter == NULL)) - { - unsigned int gl_tex; - unsigned int gl_tar; - GValue value = {0}; - - clear_frame_textures (sink); - - priv->frame[0] = cogl_texture_new_with_size (priv->ctx, priv->info.width, - priv->info.height, - COGL_GST_TEXTURE_FLAGS, - COGL_PIXEL_FORMAT_BGRA_8888); - - cogl_texture_get_gl_texture (priv->frame[0], &gl_tex, &gl_tar); - - g_value_init (&value, G_TYPE_UINT); - g_value_set_uint (&value, gl_tex); - - priv->converter = gst_surface_meta_create_converter (surface, "opengl", - &value); - } - gst_surface_converter_upload (priv->converter, buffer); - - return TRUE; -} - -static CoglGstRenderer hw_renderer = { - "HW surface", - COGL_GST_SURFACE, - 0, - GST_STATIC_CAPS ("x-video/surface, opengl=true"), - cogl_gst_hw_init, - cogl_gst_hw_deinit, - cogl_gst_hw_upload, -}; - -#endif - static GSList* cogl_gst_build_renderers_list (CoglContext *ctx) { @@ -644,9 +576,6 @@ cogl_gst_build_renderers_list (CoglContext *ctx) &yv12_glsl_renderer, &i420_glsl_renderer, &ayuv_glsl_renderer, - #ifdef HAVE_HW_DECODER_SUPPORT - &hw_renderer, - #endif NULL }; |