/* rygel-gst-launch-root-container.c generated by valac 0.14.0, the Vala compiler
 * generated from rygel-gst-launch-root-container.vala, do not modify */

/*
 * Copyright (C) 2009 Thijs Vermeir <thijsvermeir@gmail.com>
 *
 * Author: Thijs Vermeir <thijsvermeir@gmail.com>
 *
 * This file is part of Rygel.
 *
 * Rygel 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.
 *
 * Rygel 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 program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#include <glib.h>
#include <glib-object.h>
#include <rygel.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>


#define RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER (rygel_gst_launch_root_container_get_type ())
#define RYGEL_GST_LAUNCH_ROOT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER, RygelGstLaunchRootContainer))
#define RYGEL_GST_LAUNCH_ROOT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER, RygelGstLaunchRootContainerClass))
#define RYGEL_GST_LAUNCH_IS_ROOT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER))
#define RYGEL_GST_LAUNCH_IS_ROOT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER))
#define RYGEL_GST_LAUNCH_ROOT_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER, RygelGstLaunchRootContainerClass))

typedef struct _RygelGstLaunchRootContainer RygelGstLaunchRootContainer;
typedef struct _RygelGstLaunchRootContainerClass RygelGstLaunchRootContainerClass;
typedef struct _RygelGstLaunchRootContainerPrivate RygelGstLaunchRootContainerPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define RYGEL_GST_LAUNCH_TYPE_AUDIO_ITEM (rygel_gst_launch_audio_item_get_type ())
#define RYGEL_GST_LAUNCH_AUDIO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_GST_LAUNCH_TYPE_AUDIO_ITEM, RygelGstLaunchAudioItem))
#define RYGEL_GST_LAUNCH_AUDIO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_GST_LAUNCH_TYPE_AUDIO_ITEM, RygelGstLaunchAudioItemClass))
#define RYGEL_GST_LAUNCH_IS_AUDIO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_GST_LAUNCH_TYPE_AUDIO_ITEM))
#define RYGEL_GST_LAUNCH_IS_AUDIO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_GST_LAUNCH_TYPE_AUDIO_ITEM))
#define RYGEL_GST_LAUNCH_AUDIO_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_GST_LAUNCH_TYPE_AUDIO_ITEM, RygelGstLaunchAudioItemClass))

typedef struct _RygelGstLaunchAudioItem RygelGstLaunchAudioItem;
typedef struct _RygelGstLaunchAudioItemClass RygelGstLaunchAudioItemClass;

#define RYGEL_GST_LAUNCH_TYPE_VIDEO_ITEM (rygel_gst_launch_video_item_get_type ())
#define RYGEL_GST_LAUNCH_VIDEO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_GST_LAUNCH_TYPE_VIDEO_ITEM, RygelGstLaunchVideoItem))
#define RYGEL_GST_LAUNCH_VIDEO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_GST_LAUNCH_TYPE_VIDEO_ITEM, RygelGstLaunchVideoItemClass))
#define RYGEL_GST_LAUNCH_IS_VIDEO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_GST_LAUNCH_TYPE_VIDEO_ITEM))
#define RYGEL_GST_LAUNCH_IS_VIDEO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_GST_LAUNCH_TYPE_VIDEO_ITEM))
#define RYGEL_GST_LAUNCH_VIDEO_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_GST_LAUNCH_TYPE_VIDEO_ITEM, RygelGstLaunchVideoItemClass))

typedef struct _RygelGstLaunchVideoItem RygelGstLaunchVideoItem;
typedef struct _RygelGstLaunchVideoItemClass RygelGstLaunchVideoItemClass;

struct _RygelGstLaunchRootContainer {
	RygelSimpleContainer parent_instance;
	RygelGstLaunchRootContainerPrivate * priv;
};

struct _RygelGstLaunchRootContainerClass {
	RygelSimpleContainerClass parent_class;
};

struct _RygelGstLaunchRootContainerPrivate {
	RygelMetaConfig* config;
};


static gpointer rygel_gst_launch_root_container_parent_class = NULL;

GType rygel_gst_launch_root_container_get_type (void) G_GNUC_CONST;
#define RYGEL_GST_LAUNCH_ROOT_CONTAINER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER, RygelGstLaunchRootContainerPrivate))
enum  {
	RYGEL_GST_LAUNCH_ROOT_CONTAINER_DUMMY_PROPERTY
};
#define RYGEL_GST_LAUNCH_ROOT_CONTAINER_CONFIG_GROUP "GstLaunch"
#define RYGEL_GST_LAUNCH_ROOT_CONTAINER_ITEM_NAMES "launch-items"
RygelGstLaunchRootContainer* rygel_gst_launch_root_container_new (const gchar* title);
RygelGstLaunchRootContainer* rygel_gst_launch_root_container_construct (GType object_type, const gchar* title);
static void rygel_gst_launch_root_container_add_launch_item (RygelGstLaunchRootContainer* self, const gchar* name);
RygelGstLaunchAudioItem* rygel_gst_launch_audio_item_new (const gchar* id, RygelMediaContainer* parent, const gchar* title, const gchar* mime_type, const gchar* launch_line);
RygelGstLaunchAudioItem* rygel_gst_launch_audio_item_construct (GType object_type, const gchar* id, RygelMediaContainer* parent, const gchar* title, const gchar* mime_type, const gchar* launch_line);
GType rygel_gst_launch_audio_item_get_type (void) G_GNUC_CONST;
RygelGstLaunchVideoItem* rygel_gst_launch_video_item_new (const gchar* id, RygelMediaContainer* parent, const gchar* title, const gchar* mime_type, const gchar* launch_line);
RygelGstLaunchVideoItem* rygel_gst_launch_video_item_construct (GType object_type, const gchar* id, RygelMediaContainer* parent, const gchar* title, const gchar* mime_type, const gchar* launch_line);
GType rygel_gst_launch_video_item_get_type (void) G_GNUC_CONST;
static void rygel_gst_launch_root_container_finalize (GObject* obj);


static gpointer _g_object_ref0 (gpointer self) {
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	return self ? g_object_ref (self) : NULL;
#line 107 "rygel-gst-launch-root-container.c"
}


RygelGstLaunchRootContainer* rygel_gst_launch_root_container_construct (GType object_type, const gchar* title) {
	RygelGstLaunchRootContainer * self = NULL;
	const gchar* _tmp0_;
	GError * _inner_error_ = NULL;
#line 37 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	g_return_val_if_fail (title != NULL, NULL);
#line 38 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	_tmp0_ = title;
#line 38 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	self = (RygelGstLaunchRootContainer*) rygel_simple_container_construct_root (object_type, _tmp0_);
#line 121 "rygel-gst-launch-root-container.c"
	{
		RygelMetaConfig* _tmp1_ = NULL;
		RygelMetaConfig* _tmp2_;
		GeeArrayList* _tmp3_ = NULL;
		GeeArrayList* item_names;
#line 41 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp1_ = rygel_meta_config_get_default ();
#line 41 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_object_unref0 (self->priv->config);
#line 41 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		self->priv->config = _tmp1_;
#line 43 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp2_ = self->priv->config;
#line 43 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp3_ = rygel_configuration_get_string_list ((RygelConfiguration*) _tmp2_, RYGEL_GST_LAUNCH_ROOT_CONTAINER_CONFIG_GROUP, RYGEL_GST_LAUNCH_ROOT_CONTAINER_ITEM_NAMES, &_inner_error_);
#line 43 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		item_names = _tmp3_;
#line 43 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		if (_inner_error_ != NULL) {
#line 141 "rygel-gst-launch-root-container.c"
			goto __catch0_g_error;
		}
		{
			GeeArrayList* _tmp4_;
			GeeArrayList* _tmp5_;
			GeeArrayList* _name_list;
			GeeArrayList* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			gint _name_size;
			gint _name_index;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp4_ = item_names;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp5_ = _g_object_ref0 (_tmp4_);
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_name_list = _tmp5_;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp6_ = _name_list;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp7_ = gee_collection_get_size ((GeeCollection*) _tmp6_);
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp8_ = _tmp7_;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_name_size = _tmp8_;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_name_index = -1;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			while (TRUE) {
#line 171 "rygel-gst-launch-root-container.c"
				gint _tmp9_;
				gint _tmp10_;
				gint _tmp11_;
				GeeArrayList* _tmp12_;
				gint _tmp13_;
				gpointer _tmp14_ = NULL;
				gchar* name;
				const gchar* _tmp15_;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_tmp9_ = _name_index;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_name_index = _tmp9_ + 1;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_tmp10_ = _name_index;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_tmp11_ = _name_size;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				if (!(_tmp10_ < _tmp11_)) {
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
					break;
#line 192 "rygel-gst-launch-root-container.c"
				}
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_tmp12_ = _name_list;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_tmp13_ = _name_index;
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _tmp13_);
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				name = (gchar*) _tmp14_;
#line 45 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_tmp15_ = name;
#line 45 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				rygel_gst_launch_root_container_add_launch_item (self, _tmp15_);
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
				_g_free0 (name);
#line 208 "rygel-gst-launch-root-container.c"
			}
#line 44 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_g_object_unref0 (_name_list);
#line 212 "rygel-gst-launch-root-container.c"
		}
#line 40 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_object_unref0 (item_names);
#line 216 "rygel-gst-launch-root-container.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		GError* _tmp16_;
		const gchar* _tmp17_;
#line 40 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		err = _inner_error_;
#line 40 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_inner_error_ = NULL;
#line 48 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp16_ = err;
#line 48 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp17_ = _tmp16_->message;
#line 48 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		g_debug ("rygel-gst-launch-root-container.vala:48: GstLaunch init failed: %s", _tmp17_);
#line 40 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_error_free0 (err);
#line 236 "rygel-gst-launch-root-container.c"
	}
	__finally0:
#line 40 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	if (_inner_error_ != NULL) {
#line 40 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 40 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		g_clear_error (&_inner_error_);
#line 40 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		return NULL;
#line 247 "rygel-gst-launch-root-container.c"
	}
#line 37 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	return self;
#line 251 "rygel-gst-launch-root-container.c"
}


RygelGstLaunchRootContainer* rygel_gst_launch_root_container_new (const gchar* title) {
#line 37 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	return rygel_gst_launch_root_container_construct (RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER, title);
#line 258 "rygel-gst-launch-root-container.c"
}


static void rygel_gst_launch_root_container_add_launch_item (RygelGstLaunchRootContainer* self, const gchar* name) {
	GError * _inner_error_ = NULL;
#line 52 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	g_return_if_fail (self != NULL);
#line 52 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	g_return_if_fail (name != NULL);
#line 268 "rygel-gst-launch-root-container.c"
	{
		RygelMetaConfig* _tmp0_;
		const gchar* _tmp1_;
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_;
		gchar* title;
		RygelMetaConfig* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_;
		gchar* mime_type;
		RygelMetaConfig* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_;
		gchar* launch_line;
		const gchar* _tmp18_;
		gboolean _tmp19_ = FALSE;
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp0_ = self->priv->config;
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp1_ = name;
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp2_ = g_strdup_printf ("%s-title", _tmp1_);
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp3_ = _tmp2_;
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp4_ = rygel_configuration_get_string ((RygelConfiguration*) _tmp0_, RYGEL_GST_LAUNCH_ROOT_CONTAINER_CONFIG_GROUP, _tmp3_, &_inner_error_);
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp5_ = _tmp4_;
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_free0 (_tmp3_);
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		title = _tmp5_;
#line 54 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		if (_inner_error_ != NULL) {
#line 311 "rygel-gst-launch-root-container.c"
			goto __catch1_g_error;
		}
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp6_ = self->priv->config;
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp7_ = name;
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp8_ = g_strdup_printf ("%s-mime", _tmp7_);
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp9_ = _tmp8_;
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp10_ = rygel_configuration_get_string ((RygelConfiguration*) _tmp6_, RYGEL_GST_LAUNCH_ROOT_CONTAINER_CONFIG_GROUP, _tmp9_, &_inner_error_);
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp11_ = _tmp10_;
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_free0 (_tmp9_);
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		mime_type = _tmp11_;
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		if (_inner_error_ != NULL) {
#line 56 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_g_free0 (title);
#line 334 "rygel-gst-launch-root-container.c"
			goto __catch1_g_error;
		}
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp12_ = self->priv->config;
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp13_ = name;
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp14_ = g_strdup_printf ("%s-launch", _tmp13_);
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp15_ = _tmp14_;
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp16_ = rygel_configuration_get_string ((RygelConfiguration*) _tmp12_, RYGEL_GST_LAUNCH_ROOT_CONTAINER_CONFIG_GROUP, _tmp15_, &_inner_error_);
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp17_ = _tmp16_;
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_free0 (_tmp15_);
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		launch_line = _tmp17_;
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		if (_inner_error_ != NULL) {
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_g_free0 (mime_type);
#line 58 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_g_free0 (title);
#line 359 "rygel-gst-launch-root-container.c"
			goto __catch1_g_error;
		}
#line 61 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp18_ = mime_type;
#line 61 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp19_ = g_str_has_prefix (_tmp18_, "audio");
#line 61 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		if (_tmp19_) {
#line 368 "rygel-gst-launch-root-container.c"
			const gchar* _tmp20_;
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			const gchar* _tmp23_;
			RygelGstLaunchAudioItem* _tmp24_;
			RygelGstLaunchAudioItem* _tmp25_;
#line 62 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp20_ = name;
#line 62 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp21_ = title;
#line 62 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp22_ = mime_type;
#line 62 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp23_ = launch_line;
#line 62 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp24_ = rygel_gst_launch_audio_item_new (_tmp20_, (RygelMediaContainer*) self, _tmp21_, _tmp22_, _tmp23_);
#line 62 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp25_ = _tmp24_;
#line 62 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			rygel_simple_container_add_child_item ((RygelSimpleContainer*) self, (RygelMediaItem*) _tmp25_);
#line 62 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_g_object_unref0 (_tmp25_);
#line 391 "rygel-gst-launch-root-container.c"
		} else {
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			RygelGstLaunchVideoItem* _tmp30_;
			RygelGstLaunchVideoItem* _tmp31_;
#line 68 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp26_ = name;
#line 68 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp27_ = title;
#line 68 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp28_ = mime_type;
#line 68 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp29_ = launch_line;
#line 68 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp30_ = rygel_gst_launch_video_item_new (_tmp26_, (RygelMediaContainer*) self, _tmp27_, _tmp28_, _tmp29_);
#line 68 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_tmp31_ = _tmp30_;
#line 68 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			rygel_simple_container_add_child_item ((RygelSimpleContainer*) self, (RygelMediaItem*) _tmp31_);
#line 68 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
			_g_object_unref0 (_tmp31_);
#line 415 "rygel-gst-launch-root-container.c"
		}
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_free0 (launch_line);
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_free0 (mime_type);
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_free0 (title);
#line 423 "rygel-gst-launch-root-container.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* err = NULL;
		const gchar* _tmp32_;
		GError* _tmp33_;
		const gchar* _tmp34_;
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		err = _inner_error_;
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_inner_error_ = NULL;
#line 75 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp32_ = name;
#line 75 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp33_ = err;
#line 75 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_tmp34_ = _tmp33_->message;
#line 75 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		g_debug ("rygel-gst-launch-root-container.vala:75: GstLaunch failed item '%s': %" \
"s", _tmp32_, _tmp34_);
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		_g_error_free0 (err);
#line 446 "rygel-gst-launch-root-container.c"
	}
	__finally1:
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	if (_inner_error_ != NULL) {
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		g_clear_error (&_inner_error_);
#line 53 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
		return;
#line 457 "rygel-gst-launch-root-container.c"
	}
}


static void rygel_gst_launch_root_container_class_init (RygelGstLaunchRootContainerClass * klass) {
#line 31 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	rygel_gst_launch_root_container_parent_class = g_type_class_peek_parent (klass);
#line 31 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	g_type_class_add_private (klass, sizeof (RygelGstLaunchRootContainerPrivate));
#line 31 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	G_OBJECT_CLASS (klass)->finalize = rygel_gst_launch_root_container_finalize;
#line 469 "rygel-gst-launch-root-container.c"
}


static void rygel_gst_launch_root_container_instance_init (RygelGstLaunchRootContainer * self) {
#line 31 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	self->priv = RYGEL_GST_LAUNCH_ROOT_CONTAINER_GET_PRIVATE (self);
#line 476 "rygel-gst-launch-root-container.c"
}


static void rygel_gst_launch_root_container_finalize (GObject* obj) {
	RygelGstLaunchRootContainer * self;
#line 31 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	self = RYGEL_GST_LAUNCH_ROOT_CONTAINER (obj);
#line 35 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	_g_object_unref0 (self->priv->config);
#line 31 "/home/jens/Source/rygel/src/plugins/gst-launch/rygel-gst-launch-root-container.vala"
	G_OBJECT_CLASS (rygel_gst_launch_root_container_parent_class)->finalize (obj);
#line 488 "rygel-gst-launch-root-container.c"
}


/**
 * Represents the root container for GstLaunch content hierarchy.
 */
GType rygel_gst_launch_root_container_get_type (void) {
	static volatile gsize rygel_gst_launch_root_container_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_gst_launch_root_container_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelGstLaunchRootContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_gst_launch_root_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelGstLaunchRootContainer), 0, (GInstanceInitFunc) rygel_gst_launch_root_container_instance_init, NULL };
		GType rygel_gst_launch_root_container_type_id;
		rygel_gst_launch_root_container_type_id = g_type_register_static (RYGEL_TYPE_SIMPLE_CONTAINER, "RygelGstLaunchRootContainer", &g_define_type_info, 0);
		g_once_init_leave (&rygel_gst_launch_root_container_type_id__volatile, rygel_gst_launch_root_container_type_id);
	}
	return rygel_gst_launch_root_container_type_id__volatile;
}



