Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Show Cases
IBC 2019
multistream-server
Commits
87dbc6c4
Commit
87dbc6c4
authored
Aug 29, 2019
by
Nicolas Dufresne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mss: Dump pipeline on errors
I had to debug a not link issue while reworking the pipeline.
parent
2abfc914
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
src/main.c
src/main.c
+9
-6
No files found.
src/main.c
View file @
87dbc6c4
...
...
@@ -32,12 +32,15 @@ sigint_handler (gpointer user_data)
static
gboolean
gst_bus_cb
(
GstBus
*
bus
,
GstMessage
*
message
,
gpointer
data
)
{
GstBin
*
pipeline
=
GST_BIN
(
data
);
switch
(
GST_MESSAGE_TYPE
(
message
))
{
case
GST_MESSAGE_ERROR
:
{
GError
*
gerr
;
gchar
*
debug_msg
;
gst_message_parse_error
(
message
,
&
gerr
,
&
debug_msg
);
GST_DEBUG_BIN_TO_DOT_FILE
(
pipeline
,
GST_DEBUG_GRAPH_SHOW_ALL
,
"mss-pipeline-ERROR"
);
g_error
(
"Error: %s (%s)"
,
gerr
->
message
,
debug_msg
);
g_error_free
(
gerr
);
g_free
(
debug_msg
);
...
...
@@ -160,7 +163,6 @@ webrtc_client_connected_cb (MssHttpServer *server, MssClientId client_id,
gst_caps_unref
(
caps
);
g_signal_emit_by_name
(
webrtcbin
,
"create-offer"
,
NULL
,
gst_promise_new_with_change_func
(
(
GstPromiseChangeFunc
)
on_offer_created
,
webrtcbin
,
NULL
));
...
...
@@ -258,18 +260,19 @@ static gboolean
restart_source
(
gpointer
user_data
)
{
struct
RestartData
*
rd
=
user_data
;
GstElement
*
tspars
e
;
GstElement
*
e
;
GstStateChangeReturn
ret
;
gst_element_set_state
(
rd
->
src
,
GST_STATE_NULL
);
gst_element_set_locked_state
(
rd
->
src
,
TRUE
);
tspars
e
=
gst_bin_get_by_name
(
GST_BIN
(
rd
->
pipeline
),
"
tspars
e"
);
e
=
gst_bin_get_by_name
(
GST_BIN
(
rd
->
pipeline
),
"
srtqueu
e"
);
gst_bin_add
(
GST_BIN
(
rd
->
pipeline
),
rd
->
src
);
gst_element_link
(
rd
->
src
,
tsparse
);
if
(
!
gst_element_link
(
rd
->
src
,
e
))
g_assert_not_reached
();
gst_element_set_locked_state
(
rd
->
src
,
FALSE
);
ret
=
gst_element_set_state
(
rd
->
src
,
GST_STATE_PLAYING
);
g_assert
(
ret
!=
GST_STATE_CHANGE_FAILURE
);
gst_object_unref
(
tspars
e
);
gst_object_unref
(
e
);
g_debug
(
"Restarted source after EOS"
);
...
...
@@ -360,7 +363,7 @@ int main (int argc, char *argv[])
g_free
(
pipeline_str
);
bus
=
gst_element_get_bus
(
pipeline
);
gst_bus_add_watch
(
bus
,
gst_bus_cb
,
NULL
);
gst_bus_add_watch
(
bus
,
gst_bus_cb
,
pipeline
);
gst_object_unref
(
bus
);
g_signal_connect
(
http_server
,
"ws-client-disconnected"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment