/* rygel-http-response.c generated by valac 0.17.4.16-52707, the Vala compiler
 * generated from rygel-http-response.vala, do not modify */

/*
 * Copyright (C) 2008 Nokia Corporation.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *                               <zeeshan.ali@nokia.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 <gio/gio.h>
#include <libsoup/soup.h>
#include <gst/gst.h>
#include <stdlib.h>
#include <string.h>
#include <gst/base/gstbasesink.h>
#include <glib/gi18n-lib.h>


#define RYGEL_TYPE_STATE_MACHINE (rygel_state_machine_get_type ())
#define RYGEL_STATE_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_STATE_MACHINE, RygelStateMachine))
#define RYGEL_IS_STATE_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_STATE_MACHINE))
#define RYGEL_STATE_MACHINE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_TYPE_STATE_MACHINE, RygelStateMachineIface))

typedef struct _RygelStateMachine RygelStateMachine;
typedef struct _RygelStateMachineIface RygelStateMachineIface;

#define RYGEL_TYPE_HTTP_RESPONSE (rygel_http_response_get_type ())
#define RYGEL_HTTP_RESPONSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponse))
#define RYGEL_HTTP_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponseClass))
#define RYGEL_IS_HTTP_RESPONSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_RESPONSE))
#define RYGEL_IS_HTTP_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_RESPONSE))
#define RYGEL_HTTP_RESPONSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponseClass))

typedef struct _RygelHTTPResponse RygelHTTPResponse;
typedef struct _RygelHTTPResponseClass RygelHTTPResponseClass;
typedef struct _RygelHTTPResponsePrivate RygelHTTPResponsePrivate;

#define RYGEL_TYPE_HTTP_SEEK (rygel_http_seek_get_type ())
#define RYGEL_HTTP_SEEK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_SEEK, RygelHTTPSeek))
#define RYGEL_HTTP_SEEK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_SEEK, RygelHTTPSeekClass))
#define RYGEL_IS_HTTP_SEEK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_SEEK))
#define RYGEL_IS_HTTP_SEEK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_SEEK))
#define RYGEL_HTTP_SEEK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_SEEK, RygelHTTPSeekClass))

typedef struct _RygelHTTPSeek RygelHTTPSeek;
typedef struct _RygelHTTPSeekClass RygelHTTPSeekClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL)))

#define RYGEL_TYPE_HTTP_GET (rygel_http_get_get_type ())
#define RYGEL_HTTP_GET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_GET, RygelHTTPGet))
#define RYGEL_HTTP_GET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_GET, RygelHTTPGetClass))
#define RYGEL_IS_HTTP_GET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_GET))
#define RYGEL_IS_HTTP_GET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_GET))
#define RYGEL_HTTP_GET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_GET, RygelHTTPGetClass))

typedef struct _RygelHTTPGet RygelHTTPGet;
typedef struct _RygelHTTPGetClass RygelHTTPGetClass;

#define RYGEL_TYPE_HTTP_GET_HANDLER (rygel_http_get_handler_get_type ())
#define RYGEL_HTTP_GET_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_GET_HANDLER, RygelHTTPGetHandler))
#define RYGEL_HTTP_GET_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_GET_HANDLER, RygelHTTPGetHandlerClass))
#define RYGEL_IS_HTTP_GET_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_GET_HANDLER))
#define RYGEL_IS_HTTP_GET_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_GET_HANDLER))
#define RYGEL_HTTP_GET_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_GET_HANDLER, RygelHTTPGetHandlerClass))

typedef struct _RygelHTTPGetHandler RygelHTTPGetHandler;
typedef struct _RygelHTTPGetHandlerClass RygelHTTPGetHandlerClass;
typedef struct _RygelHTTPGetPrivate RygelHTTPGetPrivate;

#define RYGEL_TYPE_MEDIA_ITEM (rygel_media_item_get_type ())
#define RYGEL_MEDIA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MEDIA_ITEM, RygelMediaItem))
#define RYGEL_MEDIA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_MEDIA_ITEM, RygelMediaItemClass))
#define RYGEL_IS_MEDIA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MEDIA_ITEM))
#define RYGEL_IS_MEDIA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_MEDIA_ITEM))
#define RYGEL_MEDIA_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_MEDIA_ITEM, RygelMediaItemClass))

typedef struct _RygelMediaItem RygelMediaItem;
typedef struct _RygelMediaItemClass RygelMediaItemClass;
typedef struct _RygelHTTPGetHandlerPrivate RygelHTTPGetHandlerPrivate;
typedef struct _RygelHttpResponseRunData RygelHttpResponseRunData;

#define RYGEL_TYPE_HTTP_GST_SINK (rygel_http_gst_sink_get_type ())
#define RYGEL_HTTP_GST_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_GST_SINK, RygelHTTPGstSink))
#define RYGEL_HTTP_GST_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_GST_SINK, RygelHTTPGstSinkClass))
#define RYGEL_IS_HTTP_GST_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_GST_SINK))
#define RYGEL_IS_HTTP_GST_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_GST_SINK))
#define RYGEL_HTTP_GST_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_GST_SINK, RygelHTTPGstSinkClass))

typedef struct _RygelHTTPGstSink RygelHTTPGstSink;
typedef struct _RygelHTTPGstSinkClass RygelHTTPGstSinkClass;
typedef struct _RygelHTTPGstSinkPrivate RygelHTTPGstSinkPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _gst_caps_unref0(var) ((var == NULL) ? NULL : (var = (gst_caps_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define RYGEL_TYPE_HTTP_TIME_SEEK (rygel_http_time_seek_get_type ())
#define RYGEL_HTTP_TIME_SEEK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_TIME_SEEK, RygelHTTPTimeSeek))
#define RYGEL_HTTP_TIME_SEEK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_TIME_SEEK, RygelHTTPTimeSeekClass))
#define RYGEL_IS_HTTP_TIME_SEEK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_TIME_SEEK))
#define RYGEL_IS_HTTP_TIME_SEEK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_TIME_SEEK))
#define RYGEL_HTTP_TIME_SEEK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_TIME_SEEK, RygelHTTPTimeSeekClass))

typedef struct _RygelHTTPTimeSeek RygelHTTPTimeSeek;
typedef struct _RygelHTTPTimeSeekClass RygelHTTPTimeSeekClass;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _RygelStateMachineIface {
	GTypeInterface parent_iface;
	void (*run) (RygelStateMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*run_finish) (RygelStateMachine* self, GAsyncResult* _res_);
	GCancellable* (*get_cancellable) (RygelStateMachine* self);
	void (*set_cancellable) (RygelStateMachine* self, GCancellable* value);
};

struct _RygelHTTPResponse {
	GObject parent_instance;
	RygelHTTPResponsePrivate * priv;
	SoupMessage* msg;
	RygelHTTPSeek* seek;
};

struct _RygelHTTPResponseClass {
	GObjectClass parent_class;
	void (*end) (RygelHTTPResponse* self, gboolean aborted, guint status);
};

struct _RygelHTTPResponsePrivate {
	SoupServer* _server;
	GCancellable* _cancellable;
	GSourceFunc run_continue;
	gpointer run_continue_target;
	GDestroyNotify run_continue_target_destroy_notify;
	gint _priority;
	GstPipeline* pipeline;
	guint bus_watch_id;
	gboolean unref_soup_server;
};

struct _RygelHTTPGet {
	GObject parent_instance;
	RygelHTTPGetPrivate * priv;
	SoupServer* server;
	SoupMessage* msg;
	GCancellable* cancellable;
	RygelMediaItem* item;
	RygelHTTPSeek* seek;
};

struct _RygelHTTPGetClass {
	GObjectClass parent_class;
};

struct _RygelHTTPGetHandler {
	GObject parent_instance;
	RygelHTTPGetHandlerPrivate * priv;
	GCancellable* cancellable;
};

struct _RygelHTTPGetHandlerClass {
	GObjectClass parent_class;
};

struct _RygelHttpResponseRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelHTTPResponse* self;
	gboolean _tmp0_;
	RygelHTTPSeek* _tmp1_;
	RygelHTTPSeek* _tmp2_;
	gint64 _tmp3_;
	gint64 _tmp4_;
	gboolean _tmp5_;
	GstPipeline* _tmp6_;
	GstPipeline* _tmp7_;
};

struct _RygelHTTPGstSink {
	GstBaseSink parent_instance;
	RygelHTTPGstSinkPrivate * priv;
	GCancellable* cancellable;
};

struct _RygelHTTPGstSinkClass {
	GstBaseSinkClass parent_class;
};

typedef enum  {
	RYGEL_GST_ERROR_MISSING_PLUGIN,
	RYGEL_GST_ERROR_LINK
} RygelGstError;
#define RYGEL_GST_ERROR rygel_gst_error_quark ()

static gpointer rygel_http_response_parent_class = NULL;
static RygelStateMachineIface* rygel_http_response_rygel_state_machine_parent_iface = NULL;

GType rygel_state_machine_get_type (void) G_GNUC_CONST;
GType rygel_http_response_get_type (void) G_GNUC_CONST;
GType rygel_http_seek_get_type (void) G_GNUC_CONST;
#define RYGEL_HTTP_RESPONSE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponsePrivate))
enum  {
	RYGEL_HTTP_RESPONSE_DUMMY_PROPERTY,
	RYGEL_HTTP_RESPONSE_SERVER,
	RYGEL_HTTP_RESPONSE_CANCELLABLE,
	RYGEL_HTTP_RESPONSE_PRIORITY
};
SoupServer* rygel_http_response_get_server (RygelHTTPResponse* self);
static void rygel_http_response_on_server_weak_ref (RygelHTTPResponse* self, GObject* object);
static void _rygel_http_response_on_server_weak_ref_gweak_notify (gpointer self, GObject* object);
GType rygel_http_get_get_type (void) G_GNUC_CONST;
GType rygel_http_get_handler_get_type (void) G_GNUC_CONST;
RygelHTTPResponse* rygel_http_response_new (RygelHTTPGet* request, RygelHTTPGetHandler* request_handler, GstElement* src, GError** error);
RygelHTTPResponse* rygel_http_response_construct (GType object_type, RygelHTTPGet* request, RygelHTTPGetHandler* request_handler, GstElement* src, GError** error);
gpointer rygel_media_item_ref (gpointer instance);
void rygel_media_item_unref (gpointer instance);
GParamSpec* rygel_param_spec_media_item (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_value_set_media_item (GValue* value, gpointer v_object);
void rygel_value_take_media_item (GValue* value, gpointer v_object);
gpointer rygel_value_get_media_item (const GValue* value);
GType rygel_media_item_get_type (void) G_GNUC_CONST;
static void rygel_http_response_set_server (RygelHTTPResponse* self, SoupServer* value);
void rygel_state_machine_set_cancellable (RygelStateMachine* self, GCancellable* value);
GCancellable* rygel_state_machine_get_cancellable (RygelStateMachine* self);
static void rygel_http_response_on_cancelled (RygelHTTPResponse* self, GCancellable* cancellable);
static void _rygel_http_response_on_cancelled_g_cancellable_cancelled (GCancellable* _sender, gpointer self);
static void rygel_http_response_prepare_pipeline (RygelHTTPResponse* self, const gchar* name, GstElement* src, GError** error);
static void rygel_http_response_real_run_data_free (gpointer _data);
static void rygel_http_response_real_run (RygelStateMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_http_response_real_run_co (RygelHttpResponseRunData* _data_);
gint64 rygel_http_seek_get_start (RygelHTTPSeek* self);
void rygel_state_machine_run (RygelStateMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void rygel_state_machine_run_finish (RygelStateMachine* self, GAsyncResult* _res_);
static gboolean _rygel_http_response_real_run_co_gsource_func (gpointer self);
void rygel_http_response_push_data (RygelHTTPResponse* self, guint8* data, int data_length1);
void rygel_http_response_end (RygelHTTPResponse* self, gboolean aborted, guint status);
static void rygel_http_response_real_end (RygelHTTPResponse* self, gboolean aborted, guint status);
#define RYGEL_HTTP_GST_SINK_NAME "http-gst-sink"
GType rygel_http_gst_sink_get_type (void) G_GNUC_CONST;
RygelHTTPGstSink* rygel_http_gst_sink_new (RygelHTTPResponse* response);
RygelHTTPGstSink* rygel_http_gst_sink_construct (GType object_type, RygelHTTPResponse* response);
static void rygel_http_response_src_pad_added (RygelHTTPResponse* self, GstElement* src, GstPad* src_pad);
static void _rygel_http_response_src_pad_added_gst_element_pad_added (GstElement* _sender, GstPad* pad, gpointer self);
GQuark rygel_gst_error_quark (void);
static gboolean rygel_http_response_bus_handler (RygelHTTPResponse* self, GstBus* bus, GstMessage* message);
static gboolean _rygel_http_response_bus_handler_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self);
GstElement* rygel_gst_utils_get_rtp_depayloader (GstCaps* caps);
static inline void _dynamic_set_streamable5 (GstElement* obj, gboolean value);
static inline void _dynamic_set_fragment_duration6 (GstElement* obj, gint value);
static gboolean rygel_http_response_perform_seek (RygelHTTPResponse* self);
gint rygel_http_response_get_priority (RygelHTTPResponse* self);
static gboolean ___lambda5_ (RygelHTTPResponse* self);
static gboolean ____lambda5__gsource_func (gpointer self);
GType rygel_http_time_seek_get_type (void) G_GNUC_CONST;
gint64 rygel_http_seek_get_stop (RygelHTTPSeek* self);
static void rygel_http_response_finalize (GObject* obj);
static void _vala_rygel_http_response_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rygel_http_response_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static void _rygel_http_response_on_server_weak_ref_gweak_notify (gpointer self, GObject* object) {
#line 85 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_on_server_weak_ref (self, object);
#line 285 "rygel-http-response.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return self ? g_object_ref (self) : NULL;
#line 292 "rygel-http-response.c"
}


static void _rygel_http_response_on_cancelled_g_cancellable_cancelled (GCancellable* _sender, gpointer self) {
#line 73 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_on_cancelled (self, _sender);
#line 299 "rygel-http-response.c"
}


RygelHTTPResponse* rygel_http_response_construct (GType object_type, RygelHTTPGet* request, RygelHTTPGetHandler* request_handler, GstElement* src, GError** error) {
	RygelHTTPResponse * self = NULL;
	RygelHTTPGet* _tmp0_;
	SoupServer* _tmp1_;
	RygelHTTPGet* _tmp2_;
	SoupMessage* _tmp3_;
	SoupMessage* _tmp4_;
	RygelHTTPGetHandler* _tmp5_;
	GCancellable* _tmp6_;
	RygelHTTPGet* _tmp7_;
	RygelHTTPSeek* _tmp8_;
	RygelHTTPSeek* _tmp9_;
	GCancellable* _tmp10_;
	GCancellable* _tmp11_;
	SoupMessage* _tmp14_;
	SoupMessageBody* _tmp15_;
	GstElement* _tmp16_;
	SoupServer* _tmp17_;
	GError * _inner_error_ = NULL;
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (request != NULL, NULL);
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (request_handler != NULL, NULL);
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (src != NULL, NULL);
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = (RygelHTTPResponse*) g_object_new (object_type, NULL);
#line 67 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = request;
#line 67 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_->server;
#line 67 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_set_server (self, _tmp1_);
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = request;
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = _tmp2_->msg;
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->msg);
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->msg = _tmp4_;
#line 69 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = request_handler;
#line 69 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = _tmp5_->cancellable;
#line 69 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_state_machine_set_cancellable ((RygelStateMachine*) self, _tmp6_);
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = request;
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp8_ = _tmp7_->seek;
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp9_ = _g_object_ref0 (_tmp8_);
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->seek);
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->seek = _tmp9_;
#line 72 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp10_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) self);
#line 72 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp11_ = _tmp10_;
#line 72 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp11_ != NULL) {
#line 368 "rygel-http-response.c"
		GCancellable* _tmp12_;
		GCancellable* _tmp13_;
#line 73 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp12_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) self);
#line 73 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp13_ = _tmp12_;
#line 73 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_signal_connect_object (_tmp13_, "cancelled", (GCallback) _rygel_http_response_on_cancelled_g_cancellable_cancelled, self, 0);
#line 377 "rygel-http-response.c"
	}
#line 76 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp14_ = self->msg;
#line 76 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp15_ = _tmp14_->response_body;
#line 76 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	soup_message_body_set_accumulate (_tmp15_, FALSE);
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp16_ = src;
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_prepare_pipeline (self, "RygelHTTPGstResponse", _tmp16_, &_inner_error_);
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_inner_error_ != NULL) {
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_propagate_error (error, _inner_error_);
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_g_object_unref0 (self);
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		return NULL;
#line 397 "rygel-http-response.c"
	}
#line 79 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp17_ = self->priv->_server;
#line 79 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_weak_ref ((GObject*) _tmp17_, _rygel_http_response_on_server_weak_ref_gweak_notify, self);
#line 80 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->unref_soup_server = TRUE;
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return self;
#line 407 "rygel-http-response.c"
}


RygelHTTPResponse* rygel_http_response_new (RygelHTTPGet* request, RygelHTTPGetHandler* request_handler, GstElement* src, GError** error) {
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return rygel_http_response_construct (RYGEL_TYPE_HTTP_RESPONSE, request, request_handler, src, error);
#line 414 "rygel-http-response.c"
}


static void rygel_http_response_real_run_data_free (gpointer _data) {
	RygelHttpResponseRunData* _data_;
	_data_ = _data;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (_data_->self);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_slice_free (RygelHttpResponseRunData, _data_);
#line 425 "rygel-http-response.c"
}


static void rygel_http_response_real_run (RygelStateMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelHTTPResponse * self;
	RygelHttpResponseRunData* _data_;
	RygelHTTPResponse* _tmp0_;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = (RygelHTTPResponse*) base;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_ = g_slice_new0 (RygelHttpResponseRunData);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_http_response_real_run);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_http_response_real_run_data_free);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self = _tmp0_;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_real_run_co (_data_);
#line 447 "rygel-http-response.c"
}


static void rygel_http_response_real_run_finish (RygelStateMachine* base, GAsyncResult* _res_) {
	RygelHttpResponseRunData* _data_;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 455 "rygel-http-response.c"
}


static gboolean _rygel_http_response_real_run_co_gsource_func (gpointer self) {
	gboolean result;
	result = rygel_http_response_real_run_co (self);
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 464 "rygel-http-response.c"
}


static gboolean rygel_http_response_real_run_co (RygelHttpResponseRunData* _data_) {
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	switch (_data_->_state_) {
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case 0:
#line 473 "rygel-http-response.c"
		goto _state_0;
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case 1:
#line 477 "rygel-http-response.c"
		goto _state_1;
		default:
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_assert_not_reached ();
#line 482 "rygel-http-response.c"
	}
	_state_0:
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->_tmp1_ = _data_->self->seek;
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_data_->_tmp1_ != NULL) {
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp2_ = _data_->self->seek;
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp3_ = rygel_http_seek_get_start (_data_->_tmp2_);
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp4_ = _data_->_tmp3_;
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp0_ = _data_->_tmp4_ > ((gint64) 0);
#line 497 "rygel-http-response.c"
	} else {
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp0_ = FALSE;
#line 501 "rygel-http-response.c"
	}
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->_tmp5_ = _data_->_tmp0_;
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_data_->_tmp5_) {
#line 92 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp6_ = _data_->self->priv->pipeline;
#line 92 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		gst_element_set_state ((GstElement*) _data_->_tmp6_, GST_STATE_PAUSED);
#line 511 "rygel-http-response.c"
	} else {
#line 94 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp7_ = _data_->self->priv->pipeline;
#line 94 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		gst_element_set_state ((GstElement*) _data_->_tmp7_, GST_STATE_PLAYING);
#line 517 "rygel-http-response.c"
	}
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	(_data_->self->priv->run_continue_target_destroy_notify == NULL) ? NULL : (_data_->self->priv->run_continue_target_destroy_notify (_data_->self->priv->run_continue_target), NULL);
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue = NULL;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue_target = NULL;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue_target_destroy_notify = NULL;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue = _rygel_http_response_real_run_co_gsource_func;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue_target = _data_;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue_target_destroy_notify = NULL;
#line 99 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->_state_ = 1;
#line 99 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return FALSE;
#line 537 "rygel-http-response.c"
	_state_1:
	;
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_data_->_state_ == 0) {
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 544 "rygel-http-response.c"
	} else {
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 548 "rygel-http-response.c"
	}
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_unref (_data_->_async_result);
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return FALSE;
#line 554 "rygel-http-response.c"
}


void rygel_http_response_push_data (RygelHTTPResponse* self, guint8* data, int data_length1) {
	SoupMessage* _tmp0_;
	SoupMessageBody* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	SoupServer* _tmp3_;
	SoupMessage* _tmp4_;
#line 102 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->msg;
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_->response_body;
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = data;
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2__length1 = data_length1;
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	soup_message_body_append (_tmp1_, SOUP_MEMORY_COPY, _tmp2_, (gsize) _tmp2__length1);
#line 105 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = self->priv->_server;
#line 105 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = self->msg;
#line 105 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	soup_server_unpause_message (_tmp3_, _tmp4_);
#line 583 "rygel-http-response.c"
}


static void rygel_http_response_real_end (RygelHTTPResponse* self, gboolean aborted, guint status) {
	GstPipeline* _tmp0_;
	GstElement* _tmp1_ = NULL;
	RygelHTTPGstSink* sink;
	RygelHTTPGstSink* _tmp2_;
	GCancellable* _tmp3_;
	GstPipeline* _tmp4_;
	guint _tmp5_;
	SoupMessage* _tmp6_;
	SoupMessageHeaders* _tmp7_;
	SoupEncoding _tmp8_ = 0;
	SoupEncoding encoding;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_;
	gboolean _tmp12_;
	GSourceFunc _tmp17_;
	void* _tmp17__target;
	guint _tmp19_;
#line 109 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->pipeline;
#line 109 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = gst_bin_get_by_name ((GstBin*) _tmp0_, RYGEL_HTTP_GST_SINK_NAME);
#line 109 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	sink = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, RYGEL_TYPE_HTTP_GST_SINK) ? ((RygelHTTPGstSink*) _tmp1_) : NULL;
#line 110 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = sink;
#line 110 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = _tmp2_->cancellable;
#line 110 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_cancellable_cancel (_tmp3_);
#line 112 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = self->priv->pipeline;
#line 112 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	gst_element_set_state ((GstElement*) _tmp4_, GST_STATE_NULL);
#line 113 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = self->priv->bus_watch_id;
#line 113 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_source_remove (_tmp5_);
#line 115 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = self->msg;
#line 115 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = _tmp6_->response_headers;
#line 115 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp8_ = soup_message_headers_get_encoding (_tmp7_);
#line 115 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	encoding = _tmp8_;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp10_ = aborted;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (!_tmp10_) {
#line 637 "rygel-http-response.c"
		SoupEncoding _tmp11_;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp11_ = encoding;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp9_ = _tmp11_ != SOUP_ENCODING_CONTENT_LENGTH;
#line 643 "rygel-http-response.c"
	} else {
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp9_ = FALSE;
#line 647 "rygel-http-response.c"
	}
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp12_ = _tmp9_;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp12_) {
#line 653 "rygel-http-response.c"
		SoupMessage* _tmp13_;
		SoupMessageBody* _tmp14_;
		SoupServer* _tmp15_;
		SoupMessage* _tmp16_;
#line 118 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp13_ = self->msg;
#line 118 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp14_ = _tmp13_->response_body;
#line 118 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		soup_message_body_complete (_tmp14_);
#line 119 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp15_ = self->priv->_server;
#line 119 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp16_ = self->msg;
#line 119 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		soup_server_unpause_message (_tmp15_, _tmp16_);
#line 670 "rygel-http-response.c"
	}
#line 122 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp17_ = self->priv->run_continue;
#line 122 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp17__target = self->priv->run_continue_target;
#line 122 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp17_ != NULL) {
#line 678 "rygel-http-response.c"
		GSourceFunc _tmp18_;
		void* _tmp18__target;
#line 123 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp18_ = self->priv->run_continue;
#line 123 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp18__target = self->priv->run_continue_target;
#line 123 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp18_ (_tmp18__target);
#line 687 "rygel-http-response.c"
	}
#line 126 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp19_ = status;
#line 126 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp19_ != ((guint) SOUP_STATUS_NONE)) {
#line 693 "rygel-http-response.c"
		SoupMessage* _tmp20_;
		guint _tmp21_;
#line 127 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp20_ = self->msg;
#line 127 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp21_ = status;
#line 127 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		soup_message_set_status (_tmp20_, _tmp21_);
#line 702 "rygel-http-response.c"
	}
#line 130 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_signal_emit_by_name ((RygelStateMachine*) self, "completed");
#line 108 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (sink);
#line 708 "rygel-http-response.c"
}


void rygel_http_response_end (RygelHTTPResponse* self, gboolean aborted, guint status) {
#line 108 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 108 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	RYGEL_HTTP_RESPONSE_GET_CLASS (self)->end (self, aborted, status);
#line 717 "rygel-http-response.c"
}


static void rygel_http_response_on_cancelled (RygelHTTPResponse* self, GCancellable* cancellable) {
#line 133 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 133 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (cancellable != NULL);
#line 134 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_end (self, TRUE, (guint) SOUP_STATUS_CANCELLED);
#line 728 "rygel-http-response.c"
}


static void rygel_http_response_on_server_weak_ref (RygelHTTPResponse* self, GObject* object) {
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
#line 137 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 137 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (object != NULL);
#line 138 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->unref_soup_server = FALSE;
#line 139 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) self);
#line 139 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_;
#line 139 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_cancellable_cancel (_tmp1_);
#line 747 "rygel-http-response.c"
}


static void _rygel_http_response_src_pad_added_gst_element_pad_added (GstElement* _sender, GstPad* pad, gpointer self) {
#line 152 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_src_pad_added (self, _sender, pad);
#line 754 "rygel-http-response.c"
}


static gboolean _rygel_http_response_bus_handler_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self) {
	gboolean result;
	result = rygel_http_response_bus_handler (self, bus, message);
#line 164 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 763 "rygel-http-response.c"
}


static void rygel_http_response_prepare_pipeline (RygelHTTPResponse* self, const gchar* name, GstElement* src, GError** error) {
	RygelHTTPGstSink* _tmp0_;
	RygelHTTPGstSink* sink;
	const gchar* _tmp1_;
	GstPipeline* _tmp2_;
	GstPipeline* _tmp3_;
	GstPipeline* _tmp4_;
	GstElement* _tmp5_;
	RygelHTTPGstSink* _tmp6_;
	GstElement* _tmp7_;
	guint16 _tmp8_;
	GstPipeline* _tmp24_;
	GstBus* _tmp25_ = NULL;
	GstBus* bus;
	GstBus* _tmp26_;
	guint _tmp27_ = 0U;
	GError * _inner_error_ = NULL;
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (name != NULL);
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (src != NULL);
#line 143 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = rygel_http_gst_sink_new (self);
#line 143 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	gst_object_ref_sink (_tmp0_);
#line 143 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	sink = _tmp0_;
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = name;
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = (GstPipeline*) gst_pipeline_new (_tmp1_);
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	gst_object_ref_sink (_tmp2_);
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (self->priv->pipeline);
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->pipeline = _tmp2_;
#line 146 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = self->priv->pipeline;
#line 146 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_vala_assert (_tmp3_ != NULL, "this.pipeline != null");
#line 148 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = self->priv->pipeline;
#line 148 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = src;
#line 148 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = sink;
#line 148 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	gst_bin_add_many ((GstBin*) _tmp4_, _tmp5_, (GstElement*) _tmp6_, NULL);
#line 150 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = src;
#line 150 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp8_ = _tmp7_->numsrcpads;
#line 150 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (((gint) _tmp8_) == 0) {
#line 824 "rygel-http-response.c"
		GstElement* _tmp9_;
#line 152 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp9_ = src;
#line 152 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_signal_connect_object (_tmp9_, "pad-added", (GCallback) _rygel_http_response_src_pad_added_gst_element_pad_added, self, 0);
#line 830 "rygel-http-response.c"
	} else {
		GstElement* _tmp10_;
		RygelHTTPGstSink* _tmp11_;
		gboolean _tmp12_ = FALSE;
#line 155 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp10_ = src;
#line 155 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp11_ = sink;
#line 155 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp12_ = gst_element_link (_tmp10_, (GstElement*) _tmp11_);
#line 155 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		if (!_tmp12_) {
#line 843 "rygel-http-response.c"
			const gchar* _tmp13_ = NULL;
			GstElement* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			RygelHTTPGstSink* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			GError* _tmp22_;
			GError* _tmp23_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp13_ = _ ("Failed to link %s to %s");
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp14_ = src;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp15_ = gst_object_get_name ((GstObject*) _tmp14_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp16_ = _tmp15_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp17_ = _tmp16_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp18_ = sink;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp19_ = gst_object_get_name ((GstObject*) _tmp18_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp20_ = _tmp19_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp21_ = _tmp20_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp22_ = g_error_new (RYGEL_GST_ERROR, RYGEL_GST_ERROR_LINK, _tmp13_, _tmp17_, _tmp21_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp23_ = _tmp22_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (_tmp21_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (_tmp17_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_inner_error_ = _tmp23_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			g_propagate_error (error, _inner_error_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_object_unref0 (sink);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			return;
#line 889 "rygel-http-response.c"
		}
	}
#line 163 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp24_ = self->priv->pipeline;
#line 163 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp25_ = gst_pipeline_get_bus (_tmp24_);
#line 163 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	bus = _tmp25_;
#line 164 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp26_ = bus;
#line 164 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp27_ = gst_bus_add_watch_full (_tmp26_, G_PRIORITY_DEFAULT, _rygel_http_response_bus_handler_gst_bus_func, g_object_ref (self), g_object_unref);
#line 164 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->bus_watch_id = _tmp27_;
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (bus);
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (sink);
#line 908 "rygel-http-response.c"
}


static void rygel_http_response_src_pad_added (RygelHTTPResponse* self, GstElement* src, GstPad* src_pad) {
	GstPad* _tmp0_;
	GstCaps* _tmp1_ = NULL;
	GstCaps* caps;
	GstPipeline* _tmp2_;
	GstElement* _tmp3_ = NULL;
	GstElement* sink;
	GstPad* sink_pad = NULL;
	GstCaps* _tmp4_;
	GstElement* _tmp5_ = NULL;
	GstElement* depay;
	GstElement* _tmp6_;
	GstPad* _tmp29_;
	GstPad* _tmp30_;
	GstPadLinkReturn _tmp31_ = 0;
	GstElement* _tmp41_;
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (src != NULL);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (src_pad != NULL);
#line 168 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = src_pad;
#line 168 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = gst_pad_get_caps_reffed (_tmp0_);
#line 168 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	caps = _tmp1_;
#line 170 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = self->priv->pipeline;
#line 170 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = gst_bin_get_by_name ((GstBin*) _tmp2_, RYGEL_HTTP_GST_SINK_NAME);
#line 170 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	sink = _tmp3_;
#line 173 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = caps;
#line 173 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = rygel_gst_utils_get_rtp_depayloader (_tmp4_);
#line 173 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	depay = _tmp5_;
#line 174 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = depay;
#line 174 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp6_ != NULL) {
#line 956 "rygel-http-response.c"
		GstPipeline* _tmp7_;
		GstElement* _tmp8_;
		GstElement* _tmp9_;
		GstElement* _tmp10_;
		gboolean _tmp11_ = FALSE;
		GstElement* _tmp21_;
		GstPad* _tmp22_;
		GstCaps* _tmp23_;
		GstPad* _tmp24_ = NULL;
#line 175 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp7_ = self->priv->pipeline;
#line 175 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp8_ = depay;
#line 175 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		gst_bin_add ((GstBin*) _tmp7_, _tmp8_);
#line 176 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp9_ = depay;
#line 176 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp10_ = sink;
#line 176 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp11_ = gst_element_link (_tmp9_, _tmp10_);
#line 176 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		if (!_tmp11_) {
#line 980 "rygel-http-response.c"
			const gchar* _tmp12_ = NULL;
			GstElement* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			GstElement* _tmp17_;
			gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp12_ = _ ("Failed to link %s to %s");
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp13_ = depay;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp14_ = gst_object_get_name ((GstObject*) _tmp13_);
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp15_ = _tmp14_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp16_ = _tmp15_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp17_ = sink;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp18_ = gst_object_get_name ((GstObject*) _tmp17_);
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp19_ = _tmp18_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp20_ = _tmp19_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			g_critical (_tmp12_, _tmp16_, _tmp20_);
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (_tmp20_);
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (_tmp16_);
#line 181 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			rygel_http_response_end (self, FALSE, (guint) SOUP_STATUS_NONE);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_object_unref0 (depay);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_object_unref0 (sink_pad);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_object_unref0 (sink);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_caps_unref0 (caps);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			return;
#line 1026 "rygel-http-response.c"
		}
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp21_ = depay;
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp22_ = src_pad;
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp23_ = caps;
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp24_ = gst_element_get_compatible_pad (_tmp21_, _tmp22_, _tmp23_);
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (sink_pad);
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		sink_pad = _tmp24_;
#line 1040 "rygel-http-response.c"
	} else {
		GstElement* _tmp25_;
		GstPad* _tmp26_;
		GstCaps* _tmp27_;
		GstPad* _tmp28_ = NULL;
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp25_ = sink;
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp26_ = src_pad;
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp27_ = caps;
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp28_ = gst_element_get_compatible_pad (_tmp25_, _tmp26_, _tmp27_);
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (sink_pad);
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		sink_pad = _tmp28_;
#line 1058 "rygel-http-response.c"
	}
#line 191 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp29_ = src_pad;
#line 191 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp30_ = sink_pad;
#line 191 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp31_ = gst_pad_link (_tmp29_, _tmp30_);
#line 191 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp31_ != GST_PAD_LINK_OK) {
#line 1068 "rygel-http-response.c"
		const gchar* _tmp32_ = NULL;
		GstPad* _tmp33_;
		gchar* _tmp34_;
		gchar* _tmp35_;
		gchar* _tmp36_;
		GstPad* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp39_;
		gchar* _tmp40_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp32_ = _ ("Failed to link pad %s to %s");
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp33_ = src_pad;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp34_ = gst_object_get_name ((GstObject*) _tmp33_);
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp35_ = _tmp34_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp36_ = _tmp35_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp37_ = sink_pad;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp38_ = gst_object_get_name ((GstObject*) _tmp37_);
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp39_ = _tmp38_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp40_ = _tmp39_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_critical (_tmp32_, _tmp36_, _tmp40_);
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_g_free0 (_tmp40_);
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_g_free0 (_tmp36_);
#line 195 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_http_response_end (self, FALSE, (guint) SOUP_STATUS_NONE);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (depay);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (sink_pad);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (sink);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_caps_unref0 (caps);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		return;
#line 1114 "rygel-http-response.c"
	}
#line 200 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp41_ = depay;
#line 200 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp41_ != NULL) {
#line 1120 "rygel-http-response.c"
		GstElement* _tmp42_;
#line 201 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp42_ = depay;
#line 201 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		gst_element_sync_state_with_parent (_tmp42_);
#line 1126 "rygel-http-response.c"
	}
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (depay);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (sink_pad);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (sink);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_caps_unref0 (caps);
#line 1136 "rygel-http-response.c"
}


static inline void _dynamic_set_streamable5 (GstElement* obj, gboolean value) {
#line 226 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_set (obj, "streamable", value, NULL);
#line 1143 "rygel-http-response.c"
}


static inline void _dynamic_set_fragment_duration6 (GstElement* obj, gint value) {
#line 227 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_set (obj, "fragment-duration", value, NULL);
#line 1150 "rygel-http-response.c"
}


static gboolean ___lambda5_ (RygelHTTPResponse* self) {
	gboolean result = FALSE;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	gboolean _tmp2_ = FALSE;
#line 262 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) self);
#line 262 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_;
#line 262 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = g_cancellable_is_cancelled (_tmp1_);
#line 262 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (!_tmp2_) {
#line 263 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_http_response_end (self, FALSE, (guint) SOUP_STATUS_NONE);
#line 1169 "rygel-http-response.c"
	}
#line 266 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = FALSE;
#line 266 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1175 "rygel-http-response.c"
}


static gboolean ____lambda5__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda5_ (self);
#line 261 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1184 "rygel-http-response.c"
}


static gboolean rygel_http_response_bus_handler (RygelHTTPResponse* self, GstBus* bus, GstMessage* message) {
	gboolean result = FALSE;
	gboolean ret;
	GstMessage* _tmp0_;
	GstMessageType _tmp1_;
	gboolean _tmp58_;
#line 205 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 205 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (bus != NULL, FALSE);
#line 205 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (message != NULL, FALSE);
#line 206 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	ret = TRUE;
#line 208 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = message;
#line 208 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_->type;
#line 208 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp1_ == GST_MESSAGE_EOS) {
#line 209 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		ret = FALSE;
#line 1210 "rygel-http-response.c"
	} else {
		GstMessage* _tmp2_;
		GstMessageType _tmp3_;
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp2_ = message;
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp3_ = _tmp2_->type;
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		if (_tmp3_ == GST_MESSAGE_STATE_CHANGED) {
#line 1220 "rygel-http-response.c"
			GstMessage* _tmp4_;
			GstObject* _tmp5_;
			GstPipeline* _tmp6_;
			GstState old_state = 0;
			GstState new_state = 0;
			GstMessage* _tmp7_;
			GstState _tmp8_ = 0;
			GstState _tmp9_ = 0;
			gboolean _tmp10_ = FALSE;
			GstState _tmp11_;
			gboolean _tmp13_;
			gboolean _tmp24_ = FALSE;
			RygelHTTPSeek* _tmp25_;
			gboolean _tmp29_;
#line 211 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp4_ = message;
#line 211 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp5_ = _tmp4_->src;
#line 211 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp6_ = self->priv->pipeline;
#line 211 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp5_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GST_TYPE_OBJECT, GstObject)) {
#line 212 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				result = TRUE;
#line 212 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				return result;
#line 1247 "rygel-http-response.c"
			}
#line 217 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp7_ = message;
#line 217 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			gst_message_parse_state_changed (_tmp7_, &_tmp8_, &_tmp9_, NULL);
#line 217 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			old_state = _tmp8_;
#line 217 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			new_state = _tmp9_;
#line 220 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp11_ = old_state;
#line 220 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp11_ == GST_STATE_NULL) {
#line 1261 "rygel-http-response.c"
				GstState _tmp12_;
#line 220 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp12_ = new_state;
#line 220 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp10_ = _tmp12_ == GST_STATE_READY;
#line 1267 "rygel-http-response.c"
			} else {
#line 220 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp10_ = FALSE;
#line 1271 "rygel-http-response.c"
			}
#line 220 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp13_ = _tmp10_;
#line 220 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp13_) {
#line 1277 "rygel-http-response.c"
				GstPipeline* _tmp14_;
				GstElement* _tmp15_ = NULL;
				GstElement* element;
				GstElement* _tmp16_;
#line 221 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp14_ = self->priv->pipeline;
#line 221 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp15_ = gst_bin_get_by_name ((GstBin*) _tmp14_, "muxer");
#line 221 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				element = _tmp15_;
#line 222 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp16_ = element;
#line 222 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				if (_tmp16_ != NULL) {
#line 1292 "rygel-http-response.c"
					GstElement* _tmp17_;
					GstElementFactory* _tmp18_ = NULL;
					const gchar* _tmp19_ = NULL;
					gchar* _tmp20_;
					gchar* name;
					const gchar* _tmp21_;
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp17_ = element;
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp18_ = gst_element_get_factory (_tmp17_);
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp19_ = gst_plugin_feature_get_name ((GstPluginFeature*) _tmp18_);
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp20_ = g_strdup (_tmp19_);
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					name = _tmp20_;
#line 225 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp21_ = name;
#line 225 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					if (g_strcmp0 (_tmp21_, "mp4mux") == 0) {
#line 1313 "rygel-http-response.c"
						GstElement* _tmp22_;
						GstElement* _tmp23_;
#line 226 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
						_tmp22_ = element;
#line 226 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
						_dynamic_set_streamable5 (_tmp22_, TRUE);
#line 227 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
						_tmp23_ = element;
#line 227 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
						_dynamic_set_fragment_duration6 (_tmp23_, 1000);
#line 1324 "rygel-http-response.c"
					}
#line 222 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_g_free0 (name);
#line 1328 "rygel-http-response.c"
				}
#line 220 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_gst_object_unref0 (element);
#line 1332 "rygel-http-response.c"
			}
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp25_ = self->seek;
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp25_ != NULL) {
#line 1338 "rygel-http-response.c"
				RygelHTTPSeek* _tmp26_;
				gint64 _tmp27_;
				gint64 _tmp28_;
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp26_ = self->seek;
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp27_ = rygel_http_seek_get_start (_tmp26_);
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp28_ = _tmp27_;
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp24_ = _tmp28_ > ((gint64) 0);
#line 1350 "rygel-http-response.c"
			} else {
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp24_ = FALSE;
#line 1354 "rygel-http-response.c"
			}
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp29_ = _tmp24_;
#line 232 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp29_) {
#line 1360 "rygel-http-response.c"
				gboolean _tmp30_ = FALSE;
				GstState _tmp31_;
				gboolean _tmp33_;
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp31_ = old_state;
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				if (_tmp31_ == GST_STATE_READY) {
#line 1368 "rygel-http-response.c"
					GstState _tmp32_;
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp32_ = new_state;
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp30_ = _tmp32_ == GST_STATE_PAUSED;
#line 1374 "rygel-http-response.c"
				} else {
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp30_ = FALSE;
#line 1378 "rygel-http-response.c"
				}
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp33_ = _tmp30_;
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				if (_tmp33_) {
#line 1384 "rygel-http-response.c"
					gboolean _tmp34_ = FALSE;
#line 234 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp34_ = rygel_http_response_perform_seek (self);
#line 234 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					if (_tmp34_) {
#line 1390 "rygel-http-response.c"
						GstPipeline* _tmp35_;
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
						_tmp35_ = self->priv->pipeline;
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
						gst_element_set_state ((GstElement*) _tmp35_, GST_STATE_PLAYING);
#line 1396 "rygel-http-response.c"
					}
				}
			}
		} else {
			GError* err = NULL;
			gchar* err_msg = NULL;
			GstMessage* _tmp36_;
			GstMessageType _tmp37_;
#line 243 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp36_ = message;
#line 243 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp37_ = _tmp36_->type;
#line 243 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp37_ == GST_MESSAGE_ERROR) {
#line 1411 "rygel-http-response.c"
				GstMessage* _tmp38_;
				GError* _tmp39_ = NULL;
				gchar* _tmp40_ = NULL;
				const gchar* _tmp41_ = NULL;
				GstPipeline* _tmp42_;
				gchar* _tmp43_;
				gchar* _tmp44_;
				gchar* _tmp45_;
				const gchar* _tmp46_;
#line 244 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp38_ = message;
#line 244 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				gst_message_parse_error (_tmp38_, &_tmp39_, &_tmp40_);
#line 244 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_g_error_free0 (err);
#line 244 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				err = _tmp39_;
#line 244 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_g_free0 (err_msg);
#line 244 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				err_msg = _tmp40_;
#line 245 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp41_ = _ ("Error from pipeline %s: %s");
#line 245 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp42_ = self->priv->pipeline;
#line 245 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp43_ = gst_object_get_name ((GstObject*) _tmp42_);
#line 245 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp44_ = _tmp43_;
#line 245 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp45_ = _tmp44_;
#line 245 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp46_ = err_msg;
#line 245 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				g_critical (_tmp41_, _tmp45_, _tmp46_);
#line 245 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_g_free0 (_tmp45_);
#line 249 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				ret = FALSE;
#line 1451 "rygel-http-response.c"
			} else {
				GstMessage* _tmp47_;
				GstMessageType _tmp48_;
#line 250 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp47_ = message;
#line 250 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp48_ = _tmp47_->type;
#line 250 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				if (_tmp48_ == GST_MESSAGE_WARNING) {
#line 1461 "rygel-http-response.c"
					GstMessage* _tmp49_;
					GError* _tmp50_ = NULL;
					gchar* _tmp51_ = NULL;
					const gchar* _tmp52_ = NULL;
					GstPipeline* _tmp53_;
					gchar* _tmp54_;
					gchar* _tmp55_;
					gchar* _tmp56_;
					const gchar* _tmp57_;
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp49_ = message;
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					gst_message_parse_warning (_tmp49_, &_tmp50_, &_tmp51_);
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_g_error_free0 (err);
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					err = _tmp50_;
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_g_free0 (err_msg);
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					err_msg = _tmp51_;
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp52_ = _ ("Warning from pipeline %s: %s");
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp53_ = self->priv->pipeline;
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp54_ = gst_object_get_name ((GstObject*) _tmp53_);
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp55_ = _tmp54_;
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp56_ = _tmp55_;
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp57_ = err_msg;
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					g_warning (_tmp52_, _tmp56_, _tmp57_);
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_g_free0 (_tmp56_);
#line 1499 "rygel-http-response.c"
				}
			}
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (err_msg);
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_error_free0 (err);
#line 1506 "rygel-http-response.c"
		}
	}
#line 260 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp58_ = ret;
#line 260 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (!_tmp58_) {
#line 1513 "rygel-http-response.c"
		gint _tmp59_;
		gint _tmp60_;
#line 261 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp59_ = rygel_http_response_get_priority (self);
#line 261 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp60_ = _tmp59_;
#line 261 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_idle_add_full (_tmp60_, ____lambda5__gsource_func, g_object_ref (self), g_object_unref);
#line 1522 "rygel-http-response.c"
	}
#line 270 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = ret;
#line 270 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1528 "rygel-http-response.c"
}


static gboolean rygel_http_response_perform_seek (RygelHTTPResponse* self) {
	gboolean result = FALSE;
	GstSeekType stop_type;
	GstFormat format = 0;
	RygelHTTPSeek* _tmp0_;
	RygelHTTPSeek* _tmp1_;
	gint64 _tmp2_;
	gint64 _tmp3_;
	GstPipeline* _tmp4_;
	GstFormat _tmp5_;
	RygelHTTPSeek* _tmp6_;
	gint64 _tmp7_;
	gint64 _tmp8_;
	GstSeekType _tmp9_;
	RygelHTTPSeek* _tmp10_;
	gint64 _tmp11_;
	gint64 _tmp12_;
	gboolean _tmp13_ = FALSE;
#line 273 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 274 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	stop_type = GST_SEEK_TYPE_NONE;
#line 277 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->seek;
#line 277 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, RYGEL_TYPE_HTTP_TIME_SEEK)) {
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		format = GST_FORMAT_TIME;
#line 1560 "rygel-http-response.c"
	} else {
#line 281 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		format = GST_FORMAT_BYTES;
#line 1564 "rygel-http-response.c"
	}
#line 284 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = self->seek;
#line 284 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = rygel_http_seek_get_stop (_tmp1_);
#line 284 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = _tmp2_;
#line 284 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp3_ > ((gint64) 0)) {
#line 285 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		stop_type = GST_SEEK_TYPE_SET;
#line 1576 "rygel-http-response.c"
	}
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = self->priv->pipeline;
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = format;
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = self->seek;
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = rygel_http_seek_get_start (_tmp6_);
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp8_ = _tmp7_;
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp9_ = stop_type;
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp10_ = self->seek;
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp11_ = rygel_http_seek_get_stop (_tmp10_);
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp12_ = _tmp11_;
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp13_ = gst_element_seek ((GstElement*) _tmp4_, 1.0, _tmp5_, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, _tmp8_, _tmp9_, _tmp12_ + 1);
#line 288 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (!_tmp13_) {
#line 1600 "rygel-http-response.c"
		const gchar* _tmp14_ = NULL;
		RygelHTTPSeek* _tmp15_;
		gint64 _tmp16_;
		gint64 _tmp17_;
#line 295 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp14_ = _ ("Failed to seek to offset %lld");
#line 295 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp15_ = self->seek;
#line 295 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp16_ = rygel_http_seek_get_start (_tmp15_);
#line 295 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp17_ = _tmp16_;
#line 295 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_warning (_tmp14_, _tmp17_);
#line 297 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_http_response_end (self, FALSE, (guint) SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE);
#line 299 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		result = FALSE;
#line 299 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		return result;
#line 1621 "rygel-http-response.c"
	}
#line 302 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = TRUE;
#line 302 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1627 "rygel-http-response.c"
}


SoupServer* rygel_http_response_get_server (RygelHTTPResponse* self) {
	SoupServer* result;
	SoupServer* _tmp0_;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->_server;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = _tmp0_;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1642 "rygel-http-response.c"
}


static void rygel_http_response_set_server (RygelHTTPResponse* self, SoupServer* value) {
	SoupServer* _tmp0_;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = value;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->_server = _tmp0_;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_notify ((GObject *) self, "server");
#line 1656 "rygel-http-response.c"
}


static GCancellable* rygel_http_response_real_get_cancellable (RygelStateMachine* base) {
	GCancellable* result;
	RygelHTTPResponse* self;
	GCancellable* _tmp0_;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = (RygelHTTPResponse*) base;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->_cancellable;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = _tmp0_;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1672 "rygel-http-response.c"
}


static void rygel_http_response_real_set_cancellable (RygelStateMachine* base, GCancellable* value) {
	RygelHTTPResponse* self;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = (RygelHTTPResponse*) base;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = value;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->priv->_cancellable);
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->_cancellable = _tmp1_;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_notify ((GObject *) self, "cancellable");
#line 1692 "rygel-http-response.c"
}


gint rygel_http_response_get_priority (RygelHTTPResponse* self) {
	gint result;
	gint _tmp0_;
	SoupMessage* _tmp2_;
	SoupMessageHeaders* _tmp3_;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar* mode;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_;
	gboolean _tmp9_;
	gint _tmp12_;
#line 38 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 39 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->_priority;
#line 39 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp0_ != (-1)) {
#line 1714 "rygel-http-response.c"
		gint _tmp1_;
#line 40 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp1_ = self->priv->_priority;
#line 40 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		result = _tmp1_;
#line 40 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		return result;
#line 1722 "rygel-http-response.c"
	}
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = self->msg;
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = _tmp2_->request_headers;
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = soup_message_headers_get_one (_tmp3_, "transferMode.dlna.org");
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	mode = _tmp5_;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = mode;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp7_ == NULL) {
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp6_ = TRUE;
#line 1740 "rygel-http-response.c"
	} else {
		const gchar* _tmp8_;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp8_ = mode;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp6_ = g_strcmp0 (_tmp8_, "Interactive") == 0;
#line 1747 "rygel-http-response.c"
	}
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp9_ = _tmp6_;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp9_) {
#line 47 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		self->priv->_priority = G_PRIORITY_DEFAULT;
#line 1755 "rygel-http-response.c"
	} else {
		const gchar* _tmp10_;
#line 48 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp10_ = mode;
#line 48 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		if (g_strcmp0 (_tmp10_, "Streaming") == 0) {
#line 49 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			self->priv->_priority = G_PRIORITY_HIGH;
#line 1764 "rygel-http-response.c"
		} else {
			const gchar* _tmp11_;
#line 50 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp11_ = mode;
#line 50 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (g_strcmp0 (_tmp11_, "Background") == 0) {
#line 51 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				self->priv->_priority = G_PRIORITY_LOW;
#line 1773 "rygel-http-response.c"
			} else {
#line 53 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				self->priv->_priority = G_PRIORITY_DEFAULT;
#line 1777 "rygel-http-response.c"
			}
		}
	}
#line 56 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp12_ = self->priv->_priority;
#line 56 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = _tmp12_;
#line 56 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_free0 (mode);
#line 56 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1789 "rygel-http-response.c"
}


static void rygel_http_response_class_init (RygelHTTPResponseClass * klass) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_parent_class = g_type_class_peek_parent (klass);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_type_class_add_private (klass, sizeof (RygelHTTPResponsePrivate));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	RYGEL_HTTP_RESPONSE_CLASS (klass)->end = rygel_http_response_real_end;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_http_response_get_property;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_http_response_set_property;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	G_OBJECT_CLASS (klass)->finalize = rygel_http_response_finalize;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_RESPONSE_SERVER, g_param_spec_object ("server", "server", "server", soup_server_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_RESPONSE_CANCELLABLE, g_param_spec_object ("cancellable", "cancellable", "cancellable", g_cancellable_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_RESPONSE_PRIORITY, g_param_spec_int ("priority", "priority", "priority", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 1812 "rygel-http-response.c"
}


static void rygel_http_response_rygel_state_machine_interface_init (RygelStateMachineIface * iface) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_rygel_state_machine_parent_iface = g_type_interface_peek_parent (iface);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	iface->run = (void (*)(RygelStateMachine*)) rygel_http_response_real_run;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	iface->run_finish = rygel_http_response_real_run_finish;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	iface->get_cancellable = rygel_http_response_real_get_cancellable;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	iface->set_cancellable = rygel_http_response_real_set_cancellable;
#line 1827 "rygel-http-response.c"
}


static void rygel_http_response_instance_init (RygelHTTPResponse * self) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv = RYGEL_HTTP_RESPONSE_GET_PRIVATE (self);
#line 36 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->_priority = -1;
#line 1836 "rygel-http-response.c"
}


static void rygel_http_response_finalize (GObject* obj) {
	RygelHTTPResponse * self;
	gboolean _tmp0_;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponse);
#line 84 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->unref_soup_server;
#line 84 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp0_) {
#line 1849 "rygel-http-response.c"
		SoupServer* _tmp1_;
#line 85 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp1_ = self->priv->_server;
#line 85 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_object_weak_unref ((GObject*) _tmp1_, _rygel_http_response_on_server_weak_ref_gweak_notify, self);
#line 1855 "rygel-http-response.c"
	}
#line 29 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->msg);
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->priv->_cancellable);
#line 33 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->seek);
#line 35 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	(self->priv->run_continue_target_destroy_notify == NULL) ? NULL : (self->priv->run_continue_target_destroy_notify (self->priv->run_continue_target), NULL);
#line 35 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->run_continue = NULL;
#line 35 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->run_continue_target = NULL;
#line 35 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->run_continue_target_destroy_notify = NULL;
#line 60 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (self->priv->pipeline);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	G_OBJECT_CLASS (rygel_http_response_parent_class)->finalize (obj);
#line 1875 "rygel-http-response.c"
}


GType rygel_http_response_get_type (void) {
	static volatile gsize rygel_http_response_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_http_response_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelHTTPResponseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_http_response_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelHTTPResponse), 0, (GInstanceInitFunc) rygel_http_response_instance_init, NULL };
		static const GInterfaceInfo rygel_state_machine_info = { (GInterfaceInitFunc) rygel_http_response_rygel_state_machine_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType rygel_http_response_type_id;
		rygel_http_response_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelHTTPResponse", &g_define_type_info, 0);
		g_type_add_interface_static (rygel_http_response_type_id, RYGEL_TYPE_STATE_MACHINE, &rygel_state_machine_info);
		g_once_init_leave (&rygel_http_response_type_id__volatile, rygel_http_response_type_id);
	}
	return rygel_http_response_type_id__volatile;
}


static void _vala_rygel_http_response_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelHTTPResponse * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponse);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	switch (property_id) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_SERVER:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_value_set_object (value, rygel_http_response_get_server (self));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_CANCELLABLE:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_value_set_object (value, rygel_state_machine_get_cancellable ((RygelStateMachine*) self));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_PRIORITY:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_value_set_int (value, rygel_http_response_get_priority (self));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 1916 "rygel-http-response.c"
		default:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 1922 "rygel-http-response.c"
	}
}


static void _vala_rygel_http_response_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelHTTPResponse * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponse);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	switch (property_id) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_SERVER:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_http_response_set_server (self, g_value_get_object (value));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_CANCELLABLE:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_state_machine_set_cancellable ((RygelStateMachine*) self, g_value_get_object (value));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 1944 "rygel-http-response.c"
		default:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 1950 "rygel-http-response.c"
	}
}



