[rygel-gst-0-10-fullscreen-renderer] Some cleanup



commit 9d66a927e841e4a48cea3bffe231b4389ddc29b6
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Jan 22 13:22:39 2013 +0100

    Some cleanup

 src/Makefile.am              |    1 +
 src/rygel-playbin-player.c   |   34 ----------------
 src/rygel-playbin-renderer.c |   89 +-----------------------------------------
 3 files changed, 2 insertions(+), 122 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 983e585..750a84a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,6 +3,7 @@ bin_PROGRAMS = fullscreen-renderer
 fullscreen_renderer_SOURCES = \
 	fullscreen-renderer.c \
 	rygel-playbin-player.c \
+	rygel-playbin-player.h \
 	rygel-playbin-renderer.c \
 	rygel-playbin-renderer.h
 
diff --git a/src/rygel-playbin-player.c b/src/rygel-playbin-player.c
index b503213..702045c 100644
--- a/src/rygel-playbin-player.c
+++ b/src/rygel-playbin-player.c
@@ -64,7 +64,6 @@ static RygelPlaybinPlayer* rygel_playbin_player_player;
 static RygelPlaybinPlayer* rygel_playbin_player_player = NULL;
 static RygelMediaPlayerIface* rygel_playbin_player_rygel_media_player_parent_iface = NULL;
 
-GType rygel_playbin_player_get_type (void) G_GNUC_CONST;
 #define RYGEL_PLAYBIN_PLAYER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_PLAYBIN_PLAYER, RygelPlaybinPlayerPrivate))
 enum  {
 	RYGEL_PLAYBIN_PLAYER_DUMMY_PROPERTY,
@@ -88,11 +87,7 @@ static RygelPlaybinPlayer* rygel_playbin_player_new (void);
 static RygelPlaybinPlayer* rygel_playbin_player_construct (GType object_type);
 static void rygel_playbin_player_set_playbin (RygelPlaybinPlayer* self, GstElement* value);
 static void rygel_playbin_player_setup_playbin (RygelPlaybinPlayer* self);
-RygelPlaybinPlayer* rygel_playbin_player_new_wrap (GstElement* playbin);
-RygelPlaybinPlayer* rygel_playbin_player_construct_wrap (GType object_type, GstElement* playbin);
-RygelPlaybinPlayer* rygel_playbin_player_get_default (void);
 static gboolean rygel_playbin_player_real_seek (RygelMediaPlayer* base, gint64 time);
-GstElement* rygel_playbin_player_get_playbin (RygelPlaybinPlayer* self);
 static gchar** rygel_playbin_player_real_get_protocols (RygelMediaPlayer* base, int* result_length1);
 static gchar** _vala_array_dup1 (gchar** self, int length);
 static gchar** rygel_playbin_player_real_get_mime_types (RygelMediaPlayer* base, int* result_length1);
@@ -145,35 +140,6 @@ static RygelPlaybinPlayer* rygel_playbin_player_new (void) {
 	return rygel_playbin_player_construct (RYGEL_TYPE_PLAYBIN_PLAYER);
 }
 
-
-RygelPlaybinPlayer* rygel_playbin_player_construct_wrap (GType object_type, GstElement* playbin) {
-	RygelPlaybinPlayer * self = NULL;
-	GstElement* _tmp0_;
-	GstElement* _tmp1_;
-	GType _tmp2_ = 0UL;
-	const gchar* _tmp3_ = NULL;
-	GstElement* _tmp4_;
-	g_return_val_if_fail (playbin != NULL, NULL);
-	self = (RygelPlaybinPlayer*) g_object_new (object_type, NULL);
-	_tmp0_ = playbin;
-	g_return_if_fail (_tmp0_ != NULL);
-	_tmp1_ = playbin;
-	_tmp2_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp1_);
-	_tmp3_ = g_type_name (_tmp2_);
-	g_return_if_fail (g_strcmp0 (_tmp3_, "GstPlayBin2") == 0);
-	_tmp4_ = playbin;
-	rygel_playbin_player_set_playbin (self, _tmp4_);
-	self->priv->foreign = TRUE;
-	rygel_playbin_player_setup_playbin (self);
-	return self;
-}
-
-
-RygelPlaybinPlayer* rygel_playbin_player_new_wrap (GstElement* playbin) {
-	return rygel_playbin_player_construct_wrap (RYGEL_TYPE_PLAYBIN_PLAYER, playbin);
-}
-
-
 static gpointer _g_object_ref0 (gpointer self) {
 	return self ? g_object_ref (self) : NULL;
 }
diff --git a/src/rygel-playbin-renderer.c b/src/rygel-playbin-renderer.c
index c43e671..4d02340 100644
--- a/src/rygel-playbin-renderer.c
+++ b/src/rygel-playbin-renderer.c
@@ -20,65 +20,18 @@
  */
 
 #include "rygel-playbin-renderer.h"
-#include <gst/gst.h>
-#include <rygel-core.h>
+#include "rygel-playbin-player.h"
 #include <stdlib.h>
 #include <string.h>
 #include <glib/gi18n.h>
 
 
-#define RYGEL_PLAYBIN_TYPE_WRAPPING_PLUGIN (rygel_playbin_wrapping_plugin_get_type ())
-#define RYGEL_PLAYBIN_WRAPPING_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_PLAYBIN_TYPE_WRAPPING_PLUGIN, RygelPlaybinWrappingPlugin))
-#define RYGEL_PLAYBIN_WRAPPING_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_PLAYBIN_TYPE_WRAPPING_PLUGIN, RygelPlaybinWrappingPluginClass))
-#define RYGEL_PLAYBIN_IS_WRAPPING_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_PLAYBIN_TYPE_WRAPPING_PLUGIN))
-#define RYGEL_PLAYBIN_IS_WRAPPING_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_PLAYBIN_TYPE_WRAPPING_PLUGIN))
-#define RYGEL_PLAYBIN_WRAPPING_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_PLAYBIN_TYPE_WRAPPING_PLUGIN, RygelPlaybinWrappingPluginClass))
-
-typedef struct _RygelPlaybinWrappingPlugin RygelPlaybinWrappingPlugin;
-typedef struct _RygelPlaybinWrappingPluginClass RygelPlaybinWrappingPluginClass;
-typedef struct _RygelPlaybinWrappingPluginPrivate RygelPlaybinWrappingPluginPrivate;
 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
-#define RYGEL_PLAYBIN_TYPE_PLAYER (rygel_playbin_player_get_type ())
-#define RYGEL_PLAYBIN_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_PLAYBIN_TYPE_PLAYER, RygelPlaybinPlayer))
-#define RYGEL_PLAYBIN_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_PLAYBIN_TYPE_PLAYER, RygelPlaybinPlayerClass))
-#define RYGEL_PLAYBIN_IS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_PLAYBIN_TYPE_PLAYER))
-#define RYGEL_PLAYBIN_IS_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_PLAYBIN_TYPE_PLAYER))
-#define RYGEL_PLAYBIN_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_PLAYBIN_TYPE_PLAYER, RygelPlaybinPlayerClass))
-
-typedef struct _RygelPlaybinPlayer RygelPlaybinPlayer;
-typedef struct _RygelPlaybinPlayerClass RygelPlaybinPlayerClass;
-
-#define RYGEL_PLAYBIN_TYPE_PLAYER (rygel_playbin_player_get_type ())
-#define RYGEL_PLAYBIN_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_PLAYBIN_TYPE_PLAYER, RygelPlaybinPlayer))
-#define RYGEL_PLAYBIN_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_PLAYBIN_TYPE_PLAYER, RygelPlaybinPlayerClass))
-#define RYGEL_PLAYBIN_IS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_PLAYBIN_TYPE_PLAYER))
-#define RYGEL_PLAYBIN_IS_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_PLAYBIN_TYPE_PLAYER))
-#define RYGEL_PLAYBIN_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_PLAYBIN_TYPE_PLAYER, RygelPlaybinPlayerClass))
-
-typedef struct _RygelPlaybinPlayer RygelPlaybinPlayer;
-typedef struct _RygelPlaybinPlayerClass RygelPlaybinPlayerClass;
 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
 static gpointer rygel_playbin_renderer_parent_class = NULL;
 
-GType rygel_playbin_renderer_get_type (void) G_GNUC_CONST;
-enum  {
-	RYGEL_PLAYBIN_RENDERER_DUMMY_PROPERTY
-};
-RygelPlaybinRenderer* rygel_playbin_renderer_new (const gchar* title);
-RygelPlaybinRenderer* rygel_playbin_renderer_construct (GType object_type, const gchar* title);
-RygelPlaybinPlayer* rygel_playbin_player_new_wrap (GstElement* playbin);
-RygelPlaybinPlayer* rygel_playbin_player_construct_wrap (GType object_type, GstElement* playbin);
-GType rygel_playbin_player_get_type (void) G_GNUC_CONST;
-RygelPlaybinPlayer* rygel_playbin_player_get_default (void);
-RygelPlaybinRenderer* rygel_playbin_renderer_new_wrap (GstElement* pipeline, const gchar* title);
-RygelPlaybinRenderer* rygel_playbin_renderer_construct_wrap (GType object_type, GstElement* pipeline, const gchar* title);
-GstElement* rygel_playbin_renderer_get_playbin (RygelPlaybinRenderer* self);
-RygelPlaybinPlayer* rygel_playbin_player_get_default (void);
-GstElement* rygel_playbin_player_get_playbin (RygelPlaybinPlayer* self);
-
-
 /**
      * Create a new instance of Renderer.
      *
@@ -108,46 +61,6 @@ RygelPlaybinRenderer* rygel_playbin_renderer_new (const gchar* title) {
 
 
 /**
-     * Create a new instance of Renderer, wrapping an existing GstPlayBin2
-     * instance.
-     *
-     * @param pipeline Instance of GstPlayBin2 to wrap.
-     * @param title Friendly name of the new UPnP renderer on the network.
-     */
-RygelPlaybinRenderer* rygel_playbin_renderer_construct_wrap (GType object_type, GstElement* pipeline, const gchar* title) {
-	RygelPlaybinRenderer * self = NULL;
-	GstElement* _tmp0_;
-	GstElement* _tmp1_;
-	GType _tmp2_ = 0UL;
-	const gchar* _tmp3_ = NULL;
-	const gchar* _tmp4_;
-	GstElement* _tmp5_;
-	RygelPlaybinPlayer* _tmp6_;
-	RygelPlaybinPlayer* _tmp7_;
-	g_return_val_if_fail (pipeline != NULL, NULL);
-	g_return_val_if_fail (title != NULL, NULL);
-	_tmp0_ = pipeline;
-	g_return_val_if_fail (_tmp0_ != NULL, NULL);
-	_tmp1_ = pipeline;
-	_tmp2_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp1_);
-	_tmp3_ = g_type_name (_tmp2_);
-	g_return_val_if_fail (g_strcmp0 (_tmp3_, "GstPlayBin2") == 0, NULL);
-	_tmp4_ = title;
-	_tmp5_ = pipeline;
-	_tmp6_ = rygel_playbin_player_new_wrap (_tmp5_);
-	_tmp7_ = _tmp6_;
-	self = (RygelPlaybinRenderer*) g_object_new (object_type, "title", _tmp4_, "player", _tmp7_, NULL);
-	_g_object_unref0 (_tmp7_);
-	return self;
-}
-
-
-RygelPlaybinRenderer* rygel_playbin_renderer_new_wrap (GstElement* pipeline, const gchar* title) {
-	return rygel_playbin_renderer_construct_wrap (RYGEL_TYPE_PLAYBIN_RENDERER, pipeline, title);
-}
-
-
-/**
      * Get the GstPlaybin2 used by this Renderer.
      */
 static gpointer _gst_object_ref0 (gpointer self) {



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