mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
rtspsrc: create and push stream-start in TCP mode
This commit is contained in:
parent
4fc1f3088b
commit
80850df711
1 changed files with 16 additions and 0 deletions
|
@ -3871,6 +3871,22 @@ gst_rtspsrc_loop_interleaved (GstRTSPSrc * src)
|
|||
channel);
|
||||
|
||||
if (src->need_activate) {
|
||||
gchar *stream_id;
|
||||
GstEvent *event;
|
||||
GChecksum *cs;
|
||||
gchar *uri;
|
||||
|
||||
/* generate an SHA256 sum of the URI */
|
||||
cs = g_checksum_new (G_CHECKSUM_SHA256);
|
||||
uri = src->conninfo.location;
|
||||
g_checksum_update (cs, (const guchar *) uri, strlen (uri));
|
||||
stream_id =
|
||||
g_strdup_printf ("%s/%d", g_checksum_get_string (cs), stream->id);
|
||||
g_checksum_free (cs);
|
||||
event = gst_event_new_stream_start (stream_id);
|
||||
g_free (stream_id);
|
||||
gst_rtspsrc_push_event (src, event);
|
||||
|
||||
gst_rtspsrc_activate_streams (src);
|
||||
src->need_activate = FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue