Commit d904d638 authored by's avatar

Fixed issue with g_signal_connect() call for "message" which should have been...

Fixed issue with g_signal_connect() call for "message" which should have been using the pipeline's bus instead of the pipeline object itself.
parent 9e51c7a6
......@@ -97,7 +97,7 @@ typedef struct _CustomData {
static gboolean process_cmd_line_args(int argc, char*argv[]);
static GstElement* create_playbin_pipeline();
static GstElement* create_playbin_pipeline(CustomData* data);
static GstElement* create_manual_pipeline(gchar* pipeline_name, gboolean use_bin);
static gboolean create_manual_bin_pipeline(GstElement* pipeline);
static gboolean create_manual_elements_pipeline(GstElement* pipeline);
......@@ -190,14 +190,14 @@ int main(int argc, char *argv[])
else if (g_use_two_pipelines)
g_print("Creating first of two pipelines\n");
data.pipeline = create_playbin_pipeline();
data.pipeline = create_playbin_pipeline(&data);
g_print("Creating second of two pipelines\n");
data.pipeline_2 = create_playbin_pipeline();
data.pipeline_2 = create_playbin_pipeline(&data);
g_print("Creating pipeline using playbin\n");
data.pipeline = create_playbin_pipeline();
data.pipeline = create_playbin_pipeline(&data);
// Check that pipeline was properly created
......@@ -576,9 +576,10 @@ static gboolean process_cmd_line_args(int argc, char *argv[])
* Create playbin pipeline
static GstElement* create_playbin_pipeline()
static GstElement* create_playbin_pipeline(CustomData* data)
GstElement* pipeline = NULL;
GstBus* bus = NULL;
char launchLine[256];
char* line1 = "playbin flags=0x3 uri=";
if (!g_use_file)
......@@ -602,10 +603,11 @@ static GstElement* create_playbin_pipeline()
g_print("Starting up playbin using line: %s\n", launchLine);
pipeline = gst_parse_launch(launchLine, NULL);
// Register to receive playbin source signal & call get property on sourc
// Register to receive playbin source signal & call get property on source
// to get supported playspeeds just like webkit would do
g_signal_connect(pipeline, "notify::source", G_CALLBACK(on_source_changed), pipeline);
g_signal_connect(pipeline, "message", G_CALLBACK(handle_message), pipeline);
bus = gst_element_get_bus (pipeline);
g_signal_connect(bus, "message", G_CALLBACK(handle_message), data);
// Uncomment this line to limit the amount of downloaded data
// NOTE: Can't set ring buffer to anything besides zero otherwise queue will not forward events
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment