summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2011-02-16 23:44:34 (GMT)
committerChristian Pointner <equinox@helsinki.at>2011-02-16 23:44:34 (GMT)
commit28a240fa9728287c835ef475e0d8e4cafa05c36e (patch)
tree1b09b248e5651fae1fe2472af60bd4aa233200cc /src
parentdb20dcf04d70d525d2a8e055e1ada0a7338cda98 (diff)
small cleanup
added info and warning at bus_call
Diffstat (limited to 'src')
-rw-r--r--src/rharchive.c21
-rw-r--r--src/sig_handler.c2
2 files changed, 18 insertions, 5 deletions
diff --git a/src/rharchive.c b/src/rharchive.c
index dc3c552..5893c37 100644
--- a/src/rharchive.c
+++ b/src/rharchive.c
@@ -51,12 +51,23 @@ static gboolean bus_call(GstBus *bus, GstMessage *msg, gpointer data)
g_main_loop_quit(loop);
break;
}
+ case GST_MESSAGE_INFO: {
+ GError *info;
+ gst_message_parse_info(msg, &info, NULL);
+ log_printf(INFO, "%s", info->message);
+ g_error_free(info);
+ break;
+ }
+ case GST_MESSAGE_WARNING: {
+ GError *warning;
+ gst_message_parse_warning(msg, &warning, NULL);
+ log_printf(WARNING, "%s", warning->message);
+ g_error_free(warning);
+ break;
+ }
case GST_MESSAGE_ERROR: {
- gchar *debug;
GError *error;
-
- gst_message_parse_error(msg, &error, &debug);
- g_free(debug);
+ gst_message_parse_error(msg, &error, NULL);
log_printf(ERROR, "%s", error->message);
g_error_free(error);
g_main_loop_quit(loop);
@@ -98,6 +109,8 @@ int main_loop(options_t* opt)
gst_bin_add_many(GST_BIN(pipeline), source, encoder, muxer, sink, NULL);
gst_element_link_many(source, encoder, muxer, sink, NULL);
+ log_printf(INFO, "Set State: Paused");
+ gst_element_set_state(pipeline, GST_STATE_PAUSED);
log_printf(INFO, "Set State: Playing");
gst_element_set_state(pipeline, GST_STATE_PLAYING);
diff --git a/src/sig_handler.c b/src/sig_handler.c
index e2afb17..1c49e57 100644
--- a/src/sig_handler.c
+++ b/src/sig_handler.c
@@ -98,7 +98,7 @@ int signal_start(GMainLoop *loop)
{
g_assert(!signal_thread);
- signal_thread = g_thread_create_full(signal_thread_func, loop, 8192,TRUE, TRUE, G_THREAD_PRIORITY_HIGH, NULL);
+ signal_thread = g_thread_create_full(signal_thread_func, loop, 8192, TRUE, TRUE, G_THREAD_PRIORITY_HIGH, NULL);
if(!signal_thread)
return -1;