summaryrefslogtreecommitdiff
path: root/src/rharchive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rharchive.c')
-rw-r--r--src/rharchive.c21
1 files changed, 17 insertions, 4 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);