2013-07-18 20:53:46 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2013 Thibault Saunier <thibault.saunier@collabora.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2013-08-14 19:30:39 +00:00
|
|
|
#include <gst/validate/validate.h>
|
2013-07-18 20:53:46 +00:00
|
|
|
#include <gst/pbutils/encoding-profile.h>
|
|
|
|
|
2013-08-22 13:35:50 +00:00
|
|
|
#ifdef G_OS_UNIX
|
|
|
|
#include <glib-unix.h>
|
|
|
|
#endif
|
|
|
|
|
2013-08-27 14:56:33 +00:00
|
|
|
#include <gst/validate/gst-validate-scenario.h>
|
2013-08-16 10:50:51 +00:00
|
|
|
|
2013-08-19 18:13:10 +00:00
|
|
|
static gint ret = 0;
|
2013-07-18 20:53:46 +00:00
|
|
|
static GMainLoop *mainloop;
|
|
|
|
static GstElement *pipeline;
|
|
|
|
static GstEncodingProfile *encoding_profile = NULL;
|
2013-08-22 13:35:50 +00:00
|
|
|
static gboolean eos_on_shutdown = FALSE;
|
|
|
|
|
|
|
|
#ifdef G_OS_UNIX
|
|
|
|
static gboolean
|
|
|
|
intr_handler (gpointer user_data)
|
|
|
|
{
|
|
|
|
g_print ("interrupt received.\n");
|
|
|
|
|
|
|
|
if (eos_on_shutdown) {
|
|
|
|
g_print ("Sending EOS to the pipeline\n");
|
|
|
|
eos_on_shutdown = FALSE;
|
|
|
|
gst_element_send_event (GST_ELEMENT_CAST (user_data), gst_event_new_eos ());
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
g_main_loop_quit (mainloop);
|
|
|
|
|
|
|
|
/* remove signal handler */
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
#endif /* G_OS_UNIX */
|
2013-07-18 20:53:46 +00:00
|
|
|
|
|
|
|
static gboolean
|
|
|
|
bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
|
|
|
{
|
|
|
|
GMainLoop *loop = data;
|
|
|
|
switch (GST_MESSAGE_TYPE (message)) {
|
|
|
|
case GST_MESSAGE_STATE_CHANGED:
|
|
|
|
{
|
|
|
|
if (GST_MESSAGE_SRC (message) == GST_OBJECT_CAST (pipeline)) {
|
|
|
|
GstState old, new, pending;
|
|
|
|
|
|
|
|
gst_message_parse_state_changed (message, &old, &new, &pending);
|
|
|
|
|
|
|
|
if (new == GST_STATE_PLAYING) {
|
|
|
|
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
|
2013-08-14 19:30:39 +00:00
|
|
|
GST_DEBUG_GRAPH_SHOW_ALL, "gst-validate-transcode.playing");
|
2013-07-18 20:53:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_MESSAGE_ERROR:
|
|
|
|
{
|
|
|
|
GError *err;
|
|
|
|
gchar *debug;
|
2013-08-19 18:13:10 +00:00
|
|
|
ret = -1;
|
2013-07-18 20:53:46 +00:00
|
|
|
gst_message_parse_error (message, &err, &debug);
|
2013-08-19 18:13:10 +00:00
|
|
|
g_print ("Error: %s %s\n", GST_OBJECT_NAME (GST_MESSAGE_SRC (message)),
|
|
|
|
err->message);
|
2013-07-18 20:53:46 +00:00
|
|
|
g_error_free (err);
|
|
|
|
g_free (debug);
|
|
|
|
g_main_loop_quit (loop);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case GST_MESSAGE_EOS:
|
|
|
|
g_main_loop_quit (loop);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
pad_added_cb (GstElement * uridecodebin, GstPad * pad, GstElement * encodebin)
|
|
|
|
{
|
|
|
|
GstCaps *caps;
|
|
|
|
GstPad *sinkpad = NULL;
|
|
|
|
|
2013-08-15 04:46:27 +00:00
|
|
|
caps = gst_pad_get_current_caps (pad);
|
2013-07-18 20:53:46 +00:00
|
|
|
|
|
|
|
/* Ask encodebin for a compatible pad */
|
2013-08-15 04:46:27 +00:00
|
|
|
GST_DEBUG_OBJECT (uridecodebin, "Pad added, caps: %" GST_PTR_FORMAT, caps);
|
|
|
|
|
2013-07-18 20:53:46 +00:00
|
|
|
g_signal_emit_by_name (encodebin, "request-pad", caps, &sinkpad);
|
|
|
|
if (caps)
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
|
|
|
|
if (sinkpad == NULL) {
|
|
|
|
GST_WARNING ("Couldn't get an encoding pad for pad %s:%s\n",
|
|
|
|
GST_DEBUG_PAD_NAME (pad));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-08-15 04:46:27 +00:00
|
|
|
if (G_UNLIKELY (gst_pad_link (pad, sinkpad) != GST_PAD_LINK_OK)) {
|
|
|
|
GstCaps *othercaps = gst_pad_get_current_caps (sinkpad);
|
|
|
|
caps = gst_pad_get_current_caps (pad);
|
|
|
|
|
2013-07-18 20:53:46 +00:00
|
|
|
GST_ERROR ("Couldn't link pads \n\n%" GST_PTR_FORMAT "\n\n and \n\n %"
|
2013-08-15 04:46:27 +00:00
|
|
|
GST_PTR_FORMAT "\n\n", caps, othercaps);
|
|
|
|
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
gst_caps_unref (othercaps);
|
|
|
|
}
|
2013-07-18 20:53:46 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
create_transcoding_pipeline (gchar * uri, gchar * outuri)
|
|
|
|
{
|
|
|
|
GstElement *src, *ebin, *sink;
|
|
|
|
|
|
|
|
mainloop = g_main_loop_new (NULL, FALSE);
|
|
|
|
|
|
|
|
pipeline = gst_pipeline_new ("encoding-pipeline");
|
|
|
|
src = gst_element_factory_make ("uridecodebin", NULL);
|
|
|
|
|
|
|
|
ebin = gst_element_factory_make ("encodebin", NULL);
|
2013-08-15 04:46:27 +00:00
|
|
|
sink = gst_element_make_from_uri (GST_URI_SINK, outuri, "sink", NULL);
|
2013-07-18 20:53:46 +00:00
|
|
|
g_assert (sink);
|
|
|
|
|
|
|
|
g_object_set (src, "uri", uri, NULL);
|
|
|
|
g_object_set (ebin, "profile", encoding_profile, NULL);
|
|
|
|
|
|
|
|
g_signal_connect (src, "pad-added", G_CALLBACK (pad_added_cb), ebin);
|
|
|
|
|
|
|
|
gst_bin_add_many (GST_BIN (pipeline), src, ebin, sink, NULL);
|
|
|
|
gst_element_link (ebin, sink);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
_parse_encoding_profile (const gchar * option_name, const gchar * value,
|
|
|
|
gpointer udata, GError ** error)
|
|
|
|
{
|
|
|
|
GstCaps *caps;
|
|
|
|
char *preset_name = NULL;
|
|
|
|
gchar **restriction_format, **preset_v;
|
|
|
|
|
|
|
|
guint i, presence = 0;
|
|
|
|
GstCaps *restrictioncaps = NULL;
|
|
|
|
gchar **strpresence_v, **strcaps_v = g_strsplit (value, ":", 0);
|
|
|
|
|
|
|
|
if (strcaps_v[0] && *strcaps_v[0]) {
|
|
|
|
caps = gst_caps_from_string (strcaps_v[0]);
|
|
|
|
if (caps == NULL) {
|
|
|
|
g_printerr ("Could not parse caps %s", strcaps_v[0]);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
encoding_profile =
|
|
|
|
GST_ENCODING_PROFILE (gst_encoding_container_profile_new
|
|
|
|
("User profile", "User profile", caps, NULL));
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
} else {
|
|
|
|
encoding_profile = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 1; strcaps_v[i]; i++) {
|
|
|
|
GstEncodingProfile *profile = NULL;
|
|
|
|
gchar *strcaps, *strpresence;
|
|
|
|
|
|
|
|
restriction_format = g_strsplit (strcaps_v[i], "->", 0);
|
|
|
|
if (restriction_format[1]) {
|
|
|
|
restrictioncaps = gst_caps_from_string (restriction_format[0]);
|
|
|
|
strcaps = g_strdup (restriction_format[1]);
|
|
|
|
} else {
|
|
|
|
restrictioncaps = NULL;
|
|
|
|
strcaps = g_strdup (restriction_format[0]);
|
|
|
|
}
|
|
|
|
g_strfreev (restriction_format);
|
|
|
|
|
|
|
|
preset_v = g_strsplit (strcaps, "+", 0);
|
|
|
|
if (preset_v[1]) {
|
|
|
|
strpresence = preset_v[1];
|
|
|
|
g_free (strcaps);
|
|
|
|
strcaps = g_strdup (preset_v[0]);
|
|
|
|
} else {
|
|
|
|
strpresence = preset_v[0];
|
|
|
|
}
|
|
|
|
|
|
|
|
strpresence_v = g_strsplit (strpresence, "|", 0);
|
|
|
|
if (strpresence_v[1]) { /* We have a presence */
|
|
|
|
gchar *endptr;
|
|
|
|
|
|
|
|
if (preset_v[1]) { /* We have preset and presence */
|
|
|
|
preset_name = g_strdup (strpresence_v[0]);
|
|
|
|
} else { /* We have a presence but no preset */
|
|
|
|
g_free (strcaps);
|
|
|
|
strcaps = g_strdup (strpresence_v[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
presence = strtoll (strpresence_v[1], &endptr, 10);
|
|
|
|
if (endptr == strpresence_v[1]) {
|
|
|
|
g_printerr ("Wrong presence %s\n", strpresence_v[1]);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
} else { /* We have no presence */
|
|
|
|
if (preset_v[1]) { /* Not presence but preset */
|
|
|
|
preset_name = g_strdup (preset_v[1]);
|
|
|
|
g_free (strcaps);
|
|
|
|
strcaps = g_strdup (preset_v[0]);
|
|
|
|
} /* Else we have no presence nor preset */
|
|
|
|
}
|
|
|
|
g_strfreev (strpresence_v);
|
|
|
|
g_strfreev (preset_v);
|
|
|
|
|
|
|
|
GST_DEBUG ("Creating preset with restrictions: %" GST_PTR_FORMAT
|
|
|
|
", caps: %s, preset %s, presence %d", restrictioncaps, strcaps,
|
|
|
|
preset_name ? preset_name : "none", presence);
|
|
|
|
|
|
|
|
caps = gst_caps_from_string (strcaps);
|
|
|
|
g_free (strcaps);
|
|
|
|
if (caps == NULL) {
|
|
|
|
g_warning ("Could not create caps for %s", strcaps_v[i]);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (g_str_has_prefix (strcaps_v[i], "audio/")) {
|
|
|
|
profile = GST_ENCODING_PROFILE (gst_encoding_audio_profile_new (caps,
|
|
|
|
preset_name, restrictioncaps, presence));
|
|
|
|
} else if (g_str_has_prefix (strcaps_v[i], "video/") ||
|
|
|
|
g_str_has_prefix (strcaps_v[i], "image/")) {
|
|
|
|
profile = GST_ENCODING_PROFILE (gst_encoding_video_profile_new (caps,
|
|
|
|
preset_name, restrictioncaps, presence));
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free (preset_name);
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
if (restrictioncaps)
|
|
|
|
gst_caps_unref (restrictioncaps);
|
|
|
|
|
|
|
|
if (profile == NULL) {
|
|
|
|
g_warning ("No way to create a preset for caps: %s", strcaps_v[i]);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (encoding_profile) {
|
|
|
|
if (gst_encoding_container_profile_add_profile
|
|
|
|
(GST_ENCODING_CONTAINER_PROFILE (encoding_profile),
|
|
|
|
profile) == FALSE) {
|
|
|
|
g_warning ("Can not create a preset for caps: %s", strcaps_v[i]);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
encoding_profile = profile;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
g_strfreev (strcaps_v);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, gchar ** argv)
|
|
|
|
{
|
2013-08-16 14:41:50 +00:00
|
|
|
guint i;
|
2013-08-19 18:13:10 +00:00
|
|
|
GSList *tmp;
|
2013-07-18 20:53:46 +00:00
|
|
|
GstBus *bus;
|
2013-08-14 19:30:39 +00:00
|
|
|
GstValidateRunner *runner;
|
|
|
|
GstValidateMonitor *monitor;
|
2013-07-18 20:53:46 +00:00
|
|
|
GOptionContext *ctx;
|
2013-08-22 13:35:50 +00:00
|
|
|
#ifdef G_OS_UNIX
|
|
|
|
guint signal_watch_id;
|
|
|
|
#endif
|
2013-07-18 20:53:46 +00:00
|
|
|
|
|
|
|
GError *err = NULL;
|
2013-07-24 23:09:14 +00:00
|
|
|
const gchar *scenario = NULL;
|
2013-08-19 18:13:10 +00:00
|
|
|
guint count = 0;
|
2013-08-16 14:41:50 +00:00
|
|
|
gboolean want_help = FALSE;
|
2013-08-16 10:50:51 +00:00
|
|
|
gboolean list_scenarios = FALSE;
|
2013-07-24 23:09:14 +00:00
|
|
|
|
2013-07-18 20:53:46 +00:00
|
|
|
GOptionEntry options[] = {
|
|
|
|
{"output-format", 'o', 0, G_OPTION_ARG_CALLBACK, &_parse_encoding_profile,
|
|
|
|
"Set the properties to use for the encoding profile "
|
|
|
|
"(in case of transcoding.) For example:\n"
|
|
|
|
"video/mpegts:video/x-raw-yuv,width=1920,height=1080->video/x-h264:audio/x-ac3\n"
|
|
|
|
"A preset name can be used by adding +presetname, eg:\n"
|
|
|
|
"video/webm:video/x-vp8+mypreset:audio/x-vorbis\n"
|
|
|
|
"The presence property of the profile can be specified with |<presence>, eg:\n"
|
|
|
|
"video/webm:video/x-vp8|<presence>:audio/x-vorbis\n",
|
2013-07-24 23:09:14 +00:00
|
|
|
"properties-values"},
|
|
|
|
{"set-scenario", '\0', 0, G_OPTION_ARG_STRING, &scenario,
|
2013-08-14 19:30:39 +00:00
|
|
|
"Let you set a scenario, it will override the GST_VALIDATE_SCENARIO "
|
2013-07-24 23:09:14 +00:00
|
|
|
"environment variable", NULL},
|
2013-08-22 13:35:50 +00:00
|
|
|
{"eos-on-shutdown", 'e', 0, G_OPTION_ARG_NONE, &eos_on_shutdown,
|
|
|
|
"If an EOS event should be sent to the pipeline if an interrupt is "
|
|
|
|
"received, instead of forcing the pipeline to stop. Sending an EOS "
|
|
|
|
"will allow the transcoding to finish the files properly before "
|
|
|
|
"exiting.", NULL},
|
2013-08-16 10:50:51 +00:00
|
|
|
{"list-scenarios", 'l', 0, G_OPTION_ARG_NONE, &list_scenarios,
|
|
|
|
"List the avalaible scenarios that can be run", NULL},
|
2013-07-18 20:53:46 +00:00
|
|
|
{NULL}
|
|
|
|
};
|
|
|
|
|
2013-08-16 14:41:50 +00:00
|
|
|
/* There is a bug that make gst_init remove the help param when initializing,
|
|
|
|
* it is FIXED in 1.0 */
|
|
|
|
for (i = 1; i < argc; i++) {
|
|
|
|
if (!g_strcmp0 (argv[i], "--help") || !g_strcmp0 (argv[i], "-h"))
|
|
|
|
want_help = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!want_help)
|
|
|
|
gst_init (&argc, &argv);
|
|
|
|
|
2013-08-14 21:04:23 +00:00
|
|
|
g_set_prgname ("gst-validate-transcoding-" GST_API_VERSION);
|
2013-08-27 09:08:46 +00:00
|
|
|
ctx = g_option_context_new ("[input-uri] [output-uri]");
|
|
|
|
g_option_context_set_summary (ctx, "Transcodes input-uri to output-uri, "
|
2013-08-14 21:04:23 +00:00
|
|
|
"using the given encoding profile. The pipeline will be monitored for "
|
|
|
|
"possible issues detection using the gst-validate lib."
|
|
|
|
"\nCan also perform file conformance"
|
|
|
|
"tests after transcoding to make sure the result is correct");
|
2013-07-18 20:53:46 +00:00
|
|
|
g_option_context_add_main_entries (ctx, options, NULL);
|
2013-08-16 14:41:50 +00:00
|
|
|
if (want_help) {
|
|
|
|
g_option_context_add_group (ctx, gst_init_get_option_group ());
|
|
|
|
}
|
2013-07-18 20:53:46 +00:00
|
|
|
|
|
|
|
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
|
|
|
|
g_printerr ("Error initializing: %s\n", err->message);
|
|
|
|
g_option_context_free (ctx);
|
|
|
|
exit (1);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_option_context_free (ctx);
|
|
|
|
|
2013-07-24 23:09:14 +00:00
|
|
|
if (scenario)
|
2013-08-14 19:30:39 +00:00
|
|
|
g_setenv ("GST_VALIDATE_SCENARIO", scenario, TRUE);
|
2013-07-24 23:09:14 +00:00
|
|
|
|
2013-08-16 10:50:51 +00:00
|
|
|
if (list_scenarios)
|
|
|
|
gst_validate_list_scenarios ();
|
|
|
|
|
2013-08-14 22:14:18 +00:00
|
|
|
gst_validate_init ();
|
2013-07-18 20:53:46 +00:00
|
|
|
|
|
|
|
if (argc != 3) {
|
|
|
|
g_printerr ("%i arguments recived, 2 expected.\n"
|
|
|
|
"You should run the test using:\n"
|
2013-08-27 09:08:46 +00:00
|
|
|
" ./gst-validate-transcoding-0.10 <input-uri> <output-uri> [options]\n",
|
2013-07-18 20:53:46 +00:00
|
|
|
argc - 1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (encoding_profile == NULL) {
|
|
|
|
GST_INFO ("Creating default encoding profile");
|
|
|
|
|
|
|
|
_parse_encoding_profile ("encoding-profile",
|
|
|
|
"application/ogg:video/x-theora:audio/x-vorbis", NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create the pipeline */
|
|
|
|
create_transcoding_pipeline (argv[1], argv[2]);
|
|
|
|
|
2013-08-22 13:35:50 +00:00
|
|
|
#ifdef G_OS_UNIX
|
|
|
|
signal_watch_id =
|
|
|
|
g_unix_signal_add (SIGINT, (GSourceFunc) intr_handler, pipeline);
|
|
|
|
#endif
|
|
|
|
|
2013-08-14 19:30:39 +00:00
|
|
|
runner = gst_validate_runner_new ();
|
2013-08-07 19:10:57 +00:00
|
|
|
monitor =
|
2013-08-14 19:30:39 +00:00
|
|
|
gst_validate_monitor_factory_create (GST_OBJECT_CAST (pipeline), runner,
|
|
|
|
NULL);
|
2013-07-18 20:53:46 +00:00
|
|
|
mainloop = g_main_loop_new (NULL, FALSE);
|
|
|
|
|
2013-07-30 13:21:13 +00:00
|
|
|
if (!runner) {
|
2013-08-14 19:30:39 +00:00
|
|
|
g_printerr ("Failed to setup Validate Runner\n");
|
2013-07-18 20:53:46 +00:00
|
|
|
exit (1);
|
|
|
|
}
|
|
|
|
|
|
|
|
bus = gst_element_get_bus (pipeline);
|
2013-08-15 13:59:22 +00:00
|
|
|
gst_bus_add_signal_watch (bus);
|
|
|
|
g_signal_connect (bus, "message", (GCallback) bus_callback, mainloop);
|
2013-07-18 20:53:46 +00:00
|
|
|
gst_object_unref (bus);
|
|
|
|
|
|
|
|
g_print ("Starting pipeline\n");
|
|
|
|
if (gst_element_set_state (pipeline,
|
|
|
|
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE)
|
|
|
|
goto exit;
|
|
|
|
g_main_loop_run (mainloop);
|
|
|
|
|
2013-08-19 18:13:10 +00:00
|
|
|
for (tmp = gst_validate_runner_get_reports (runner); tmp; tmp = tmp->next) {
|
|
|
|
if (ret == 0 && ((GstValidateReport *) (tmp->data))->level ==
|
|
|
|
GST_VALIDATE_REPORT_LEVEL_CRITICAL) {
|
|
|
|
g_printerr ("Got critical error %s, setting return value to -1\n",
|
|
|
|
((GstValidateReport *) (tmp->data))->message);
|
|
|
|
ret = -1;
|
|
|
|
}
|
|
|
|
count++;
|
|
|
|
}
|
2013-07-30 19:20:49 +00:00
|
|
|
g_print ("Pipeline finished, total issues found: %u\n", count);
|
2013-08-22 13:35:50 +00:00
|
|
|
if (count) {
|
|
|
|
GSList *iter;
|
|
|
|
GSList *issues = gst_validate_runner_get_reports (runner);
|
|
|
|
|
|
|
|
for (iter = issues; iter; iter = g_slist_next (iter)) {
|
|
|
|
GstValidateReport *report = iter->data;
|
|
|
|
gst_validate_report_printf (report);
|
|
|
|
}
|
|
|
|
}
|
2013-07-18 20:53:46 +00:00
|
|
|
|
|
|
|
exit:
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
g_main_loop_unref (mainloop);
|
2013-08-07 19:10:57 +00:00
|
|
|
g_object_unref (monitor);
|
2013-07-18 20:53:46 +00:00
|
|
|
g_object_unref (runner);
|
|
|
|
g_object_unref (pipeline);
|
2013-08-05 17:16:06 +00:00
|
|
|
|
2013-08-22 13:35:50 +00:00
|
|
|
#ifdef G_OS_UNIX
|
|
|
|
g_source_remove (signal_watch_id);
|
|
|
|
#endif
|
2013-08-19 18:13:10 +00:00
|
|
|
|
|
|
|
return ret;
|
2013-07-18 20:53:46 +00:00
|
|
|
}
|