[cogl/wip/cogl-gst-1.x: 34/41] cogl-gst: remove experimental "HW Decode" code



commit 1dfb60bfe488a87306cbf92040b230cb7d7d78eb
Author: Robert Bragg <robert linux intel com>
Date:   Tue Mar 19 18:41:14 2013 +0000

    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>

 cogl-gst/cogl-gst-video-sink.c |   71 ----------------------------------------
 configure.ac                   |    7 ----
 2 files changed, 0 insertions(+), 78 deletions(-)
---
diff --git a/cogl-gst/cogl-gst-video-sink.c b/cogl-gst/cogl-gst-video-sink.c
index 55aef3a..cae04dd 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
@@ -573,67 +566,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)
 {
@@ -647,9 +579,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
   };
 
diff --git a/configure.ac b/configure.ac
index ea5c2bb..765c082 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1177,12 +1177,6 @@ AS_IF([test "x$enable_cogl_gst" = "xyes"],
 )
 AM_CONDITIONAL([BUILD_COGL_GST], [test "x$enable_cogl_gst" = "xyes"])
 
-have_hw_decoder_support=no
-#PKG_CHECK_MODULES(HW, [$COGL_GST_PKG_REQUIRES], [have_hw_decoder_support=yes
-#                  AC_DEFINE([HAVE_HW_DECODER_SUPPORT], [1],
-#                  ["Defined if building Cogl-Gst with HW decoder support"])
-#                  ],[ have_hw_decoder_support=no ])
-
 
 
 dnl ================================================================
@@ -1384,7 +1378,6 @@ echo "        Image backend: ${COGL_IMAGE_BACKEND}"
 echo "        Cogl Pango: ${enable_cogl_pango}"
 echo "        Profiling: ${enable_profile}"
 echo "        CoglGst: ${enable_cogl_gst}"
-echo "        CoglGst has HW suppport: ${have_hw_decoder_support}"
 
 # Compiler/Debug related flags
 echo ""


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]