[Cogl] [PATCH 2/2] cogl-gst: removes cogl_gst_init

Robert Bragg robert at sixbynine.org
Fri Feb 22 08:19:38 PST 2013


From: Robert Bragg <robert at linux.intel.com>

We probably shouldn't ever need to depend on argument parsing to
initialize anything in cogl-gst so we can leave it up to applications
for call gst_init themselves.
---
 cogl-gst/Makefile.am               |  2 --
 cogl-gst/cogl-gst-util.c           | 51 --------------------------------------
 cogl-gst/cogl-gst-util.h           | 43 --------------------------------
 cogl-gst/cogl-gst.h                |  1 -
 examples/cogl-basic-video-player.c |  2 +-
 5 files changed, 1 insertion(+), 98 deletions(-)
 delete mode 100644 cogl-gst/cogl-gst-util.c
 delete mode 100644 cogl-gst/cogl-gst-util.h

diff --git a/cogl-gst/Makefile.am b/cogl-gst/Makefile.am
index c33dd98..316656e 100644
--- a/cogl-gst/Makefile.am
+++ b/cogl-gst/Makefile.am
@@ -9,14 +9,12 @@ EXTRA_DIST =
 
 source_c = \
 	cogl-gst-shader.c \
-	cogl-gst-util.c \
 	cogl-gst-video-player.c \
 	cogl-gst-video-sink.c \
 	$(NULL)
 
 source_h = \
 	cogl-gst.h \
-	cogl-gst-util.h \
 	cogl-gst-video-player.h \
 	cogl-gst-video-sink.h \
 	$(NULL)
diff --git a/cogl-gst/cogl-gst-util.c b/cogl-gst/cogl-gst-util.c
deleted file mode 100644
index fe15073..0000000
--- a/cogl-gst/cogl-gst-util.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Cogl-GStreamer.
- *
- * GStreamer integration library for Cogl.
- *
- * cogl-gst-util.h - Miscellaneous functions.
- *
- * Authored by Jonathan Matthew  <jonathan at kaolin.wh9.net>,
- *             Chris Lord        <chris at openedhand.com>
- *             Damien Lespiau    <damien.lespiau at intel.com>
- *             Matthew Allum     <mallum at openedhand.com>
- *             Plamena Manolova  <plamena.n.manolova at intel.com>
- *
- * Copyright (C) 2007, 2008 OpenedHand
- * Copyright (C) 2009, 2010, 2013 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <cogl-gst/cogl-gst-util.h>
-#include <gst/gst.h>
-
-void
-cogl_gst_init (int* argc,
-               char*** argv)
-{
-  GError *error = NULL;
-  CoglBool success;
-
-  success = gst_init_check (argc, argv, &error);
-
-  if (success == FALSE && error != NULL)
-    g_error ("COGL-GST: Failed to initialize GStreamer: %s\n", error->message);
-}
diff --git a/cogl-gst/cogl-gst-util.h b/cogl-gst/cogl-gst-util.h
deleted file mode 100644
index fe92004..0000000
--- a/cogl-gst/cogl-gst-util.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Cogl-GStreamer.
- *
- * GStreamer integration library for Cogl.
- *
- * cogl-gst-util.h - Miscellaneous functions.
- *
- * Authored by Jonathan Matthew  <jonathan at kaolin.wh9.net>,
- *             Chris Lord        <chris at openedhand.com>
- *             Damien Lespiau    <damien.lespiau at intel.com>
- *             Matthew Allum     <mallum at openedhand.com>
- *             Plamena Manolova  <plamena.n.manolova at intel.com>
- *
- * Copyright (C) 2007, 2008 OpenedHand
- * Copyright (C) 2009, 2010, 2013 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef __GOGL_GST_UTILS_H__
-#define __GOGL_GST_UTILS_H__
-
-#include <cogl/cogl.h>
-
-void
-cogl_gst_init (int* argc,
-               char*** argv);
-
-#endif
diff --git a/cogl-gst/cogl-gst.h b/cogl-gst/cogl-gst.h
index c9588d7..e2cab38 100644
--- a/cogl-gst/cogl-gst.h
+++ b/cogl-gst/cogl-gst.h
@@ -33,7 +33,6 @@
 #ifndef __COGL_GST_H__
 #define __COGL_GST_H__
 
-#include <cogl-gst/cogl-gst-util.h>
 #include <cogl-gst/cogl-gst-video-sink.h>
 #include <cogl-gst/cogl-gst-video-player.h>
 
diff --git a/examples/cogl-basic-video-player.c b/examples/cogl-basic-video-player.c
index 0de6430..2f72a74 100644
--- a/examples/cogl-basic-video-player.c
+++ b/examples/cogl-basic-video-player.c
@@ -141,7 +141,7 @@ main (int argc,
                                       640, 480);
   cogl_framebuffer_set_modelview_matrix (data.fb, &view);
 
-  cogl_gst_init (&argc, &argv);
+  gst_init (&argc, &argv);
 
   player = cogl_gst_video_player_new (ctx, TRUE,
                                       "http://docs.gstreamer.com/media/sintel_trailer-480p.webm");
-- 
1.8.1.1



More information about the Cogl mailing list