Loop video in gst-rtsp-server
Mohamed JRIBI
mohamed.jribi at actia-engineering.tn
Thu May 5 16:05:59 UTC 2022
Hello,
I tried to restream the same video (.mp4 file) infinetely using a factory_uri gst_rtsp_media_factory_uri_new ().
I used the media_configure (or media_constructed) callback to get the pipeline from the media and connect to the "message" signal.
GstElement *pipeline = gst_rtsp_media_get_pipeline (media);
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
gst_bus_add_signal_watch (bus);
g_signal_connect (bus, "message", G_CALLBACK (message_cb), loop);
But an error occurs.
As a second try, I edited the rtsp-media.c file, eventually default_handle_message().
When the stream goes to the end, I seek to the beginning then I play the media again:
case GST_MESSAGE_EOS:
gst_element_seek(priv->pipeline, 1.0, GST_FORMAT_TIME,
GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE
);
gst_rtsp_media_set_pipeline_state (media, GST_STATE_PLAYING);
But it dosen't work when the video ends in VLC.
Could you help me, please, to restream a uri file infinetely using gst-rtsp-server?
Best Regards / Veuillez agréer mes salutations les plus distinguées,
--
Mohamed JRIBI
Technical Leader
Office : (+216) 70 68 79 17 (ext. 718)
Voip : (+33) 5 35 54 25 18 (ext. 718)
GSM : (+216) 98 790 448
[logo_ACTIA_mail_2017]
ACTIA Engineering Services (Site SFAX)
Parc Technologique "El-Ons" SFAX
Hotel d’entreprise 2eme Etage - 3021 Sakiet Ezzit (Tunisie)
http://www.actia.com<http://www.actia.com/>
[icon_mail_youtube]<http://www.youtube.com/ActiaOfficialCom> [icon_mail_linkedin] <http://www.linkedin.com/company/actia> [icon_mail_web] <http://www.actia.com/>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ce courrier et toutes ses pièces jointes sont destinés exclusivement aux personnes ou institutions dont le nom figure ci-dessus et peuvent contenir des informations protégées par le secret professionnel, dont la divulgation est strictement prohibée.
Tout message électronique est susceptible d'altération. ACTIA Engineering Services décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire, nous vous avisons que sa lecture, sa reproduction
ou sa distribution sont strictement interdites. Nous vous prions en conséquence de nous aviser immédiatement par retour de ce courrier.
This mail and any attachments are intended solely for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220505/63e8a768/attachment-0001.htm>
More information about the gstreamer-devel
mailing list