mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
avdtpsink: post error message when failing to start
Subclasses are supposed to report errors messages if their start implementation failed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1678>
This commit is contained in:
parent
0871d1edc4
commit
550a21ccbe
1 changed files with 11 additions and 1 deletions
|
@ -262,16 +262,24 @@ gst_avdtp_sink_start (GstBaseSink * basesink)
|
||||||
self->mp3_using_crc = -1;
|
self->mp3_using_crc = -1;
|
||||||
self->channel_mode = -1;
|
self->channel_mode = -1;
|
||||||
|
|
||||||
if (self->conn.transport == NULL)
|
if (self->conn.transport == NULL) {
|
||||||
|
GST_ERROR_OBJECT (self, "'transport' property not set");
|
||||||
|
GST_ELEMENT_ERROR (self, LIBRARY, SETTINGS,
|
||||||
|
("'transport' property not set"), (NULL));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gst_avdtp_connection_acquire (&self->conn, FALSE)) {
|
if (!gst_avdtp_connection_acquire (&self->conn, FALSE)) {
|
||||||
GST_ERROR_OBJECT (self, "Failed to acquire connection");
|
GST_ERROR_OBJECT (self, "Failed to acquire connection");
|
||||||
|
GST_ELEMENT_ERROR (self, LIBRARY, FAILED, ("Failed to acquire connection"),
|
||||||
|
(NULL));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_avdtp_connection_get_properties (&self->conn)) {
|
if (!gst_avdtp_connection_get_properties (&self->conn)) {
|
||||||
GST_ERROR_OBJECT (self, "Failed to get transport properties");
|
GST_ERROR_OBJECT (self, "Failed to get transport properties");
|
||||||
|
GST_ELEMENT_ERROR (self, LIBRARY, FAILED,
|
||||||
|
("Failed to get transport properties"), (NULL));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,6 +290,8 @@ gst_avdtp_sink_start (GstBaseSink * basesink)
|
||||||
|
|
||||||
if (!self->dev_caps) {
|
if (!self->dev_caps) {
|
||||||
GST_ERROR_OBJECT (self, "Failed to get device caps");
|
GST_ERROR_OBJECT (self, "Failed to get device caps");
|
||||||
|
GST_ELEMENT_ERROR (self, LIBRARY, FAILED, ("Failed to get device caps"),
|
||||||
|
(NULL));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue