1. 16 Oct, 2019 2 commits
    • Kristofer's avatar
      rtsp-client: Lock shared media · 1a01d20e
      Kristofer authored
      For shared media we got race conditions. Concurrently rtsp clients might
      suspend or unsuspend the shared media and thus change the state without
      the clients expecting that.
      By introducing a lock that can be taken by callers such as rtsp_client
      one can force rtsp clients calling, eg. PLAY, SETUP and that uses shared media,
      to handle the media sequentially thus allowing one client to finish its
      rtsp call before another client calls on the same media.
      Fixes #86
    • Göran Jönsson's avatar
      rtsp-session: add property extra-timeout · 74b19b37
      Göran Jönsson authored
      Extra time to add to the timeout, in seconds. This only
      affects the time until a session is considered timed out
      and is not signalled in the RTSP request responses.
      Only the value of the timeout property is signalled in the
      request responses.
  2. 14 Oct, 2019 1 commit
    • Adam x Nilsson's avatar
      rtsp-stream : fix race condition in send_tcp_message · 0b1b6670
      Adam x Nilsson authored
      If one thread is inside the send_tcp_message function and are done
      sending rtp or rtcp messages so the n_outstanding variable is zero
      however have not exit the loop sending the messages. While sending its
      messages, transports have been added or removed to the transport list,
      so the cache should be updated. If now an additional thread comes to
      the function send_tcp_message and trying to send rtp messages it will
      first destroy the rtp cache that is still being iterated trough by the
      first thread.
      Fixes #81
  3. 13 Oct, 2019 1 commit
  4. 07 Oct, 2019 3 commits
  5. 04 Oct, 2019 1 commit
  6. 03 Oct, 2019 1 commit
    • David Svensson Fors's avatar
      rtsp-media: Unblock all streams · e16867b1
      David Svensson Fors authored
      When unsuspending and going to PLAYING, unblock all streams instead of
      only those that are linked (the linked streams are the ones for which
      SETUP has been called). GST_FLOW_NOT_LINKED will be returned when
      pushing buffers on unlinked streams.
      This change is because playback using single-threaded demuxers like
      matroska-demux could be blocked if SETUP was not called for all media.
      Demuxers that use GstFlowCombiner (including gstoggdemux, gstavidemux,
      gstflvdemux, qtdemux, and matroska-demux) will handle
      GST_FLOW_NOT_LINKED automatically.
      Fixes #39
  7. 02 Oct, 2019 1 commit
    • Göran Jönsson's avatar
      rtsp-media: Wait on async when needed. · 18f4f4e5
      Göran Jönsson authored
      Wait on asyn-done when needed in gst_rtsp_media_seek_trickmode.
      In the unit test the pause from adjust_play_mode will cause a preroll
      and after that async-done will be produced.
      Without this patch there are no one consuming this async-done and when
      later when seek fluch is done in gst_rtsp_media_seek_trickmode then it
      wait for async-done. But then it wrongly find the async-done prodused by
      adjus_play_mode and continue executing without waiting for the preroll
      to finish.
  8. 01 Oct, 2019 1 commit
    • Kristofer Bjorkstrom's avatar
      rtsp-client: RTP Info when completed_sender · 7e1edcf1
      Kristofer Bjorkstrom authored
      Change condition that should be fulfilled regarding RTPInfo.
      Replace !gst_rtsp_media_is_receive_only with
      gst_rtsp_media_has_completed_sender. It is more correct to actually look
      for a sender pipeline that is complete. Only then a RTPInfo should
      gst_rtsp_media_is_receive_only gives different answears depending on
      state of server.
      If Describe is called wth URL+options for backchannel SDP will give only
      audio and only backchannel a=sendonly
      If Describe is called on URL+options that gives both audio and video
      direction from server to client, pipelines are created. Thus
      receive_only will return false, even though Setup only would setup
      RTP-Info is only for outgoing streams. Thus one should look if outgoing
      streams are complete.
  9. 25 Sep, 2019 1 commit
    • Kristofer's avatar
      rtsp-client: RTP Info exists conditionally in PLAY · d7ae3965
      Kristofer authored
      If RTP Info is missing and it is not a receiver only, eg. audio
      backchannel. Then return GST_RTSP_STS_INTERNAL_SERVER_ERROR.
      In rfc2326 it says RTP-info is req. but in RFC7826 it is conditional.
      Since 1.14 there is audio backchannel support. Thus RTP-info is
      conditional now. When audio backchannel only mode, there is no RTP-info.
      Fixes #82
  10. 05 Sep, 2019 1 commit
  11. 04 Sep, 2019 1 commit
  12. 29 Aug, 2019 2 commits
    • Mathieu Duponchelle's avatar
      test-onvif-client: perform accurate seeks · 513c0fcb
      Mathieu Duponchelle authored
      See gst-plugins-good!336
      Also, modify how we compute the position: position queries in
      PAUSED mode fail to account for the newly-prerolled frame, leading
      to frame skips when performing seeks in that state. Instead,
      compute the current position from the last sample.
    • Göran Jönsson's avatar
      Use complete streams for scale and speed. · 16bc937e
      Göran Jönsson authored
      Without this patch it's always stream0 that is used to get segment event
      that is used to set scale and speed. This even if client not doing SETUP
      for stream0. At least in suspend mode reset this not working since then
      it's just random if send_rtp_sink have got any segment event. There are
      no check if send_rtp_sink for stream0 got any data before media is
      prerolled after PLAY request.
  13. 26 Aug, 2019 1 commit
    • Matthew Waters's avatar
      examples/onvif-server: fix werror build with clang · 4319e17b
      Matthew Waters authored
      ../subprojects/gst-rtsp-server/examples/test-onvif-server.c:346:65: warning: implicit conversion from enumeration type 'const GstSegmentFlags' to different enumeration type 'GstSeekFlags' [-Wenum-conversion]
              self->incoming_segment->format, self->incoming_segment->flags,
      ../subprojects/gst-rtsp-server/examples/test-onvif-server.c:53:1: warning: unused function 'REPLAY_IS_BIN' [-Wunused-function]
      G_DECLARE_FINAL_TYPE (ReplayBin, replay_bin, REPLAY, BIN, GstBin);
      /usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
        static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
      <scratch space>:77:1: note: expanded from here
      ../subprojects/gst-rtsp-server/examples/test-onvif-server.c:525:1: warning: unused function 'ONVIF_FACTORY' [-Wunused-function]
      G_DECLARE_FINAL_TYPE (OnvifFactory, onvif_factory, ONVIF, FACTORY,
      /usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
        static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
      <scratch space>:9:1: note: expanded from here
      ../subprojects/gst-rtsp-server/examples/test-onvif-server.c:525:1: warning: unused function 'ONVIF_IS_FACTORY' [-Wunused-function]
      /usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
        static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
      <scratch space>:12:1: note: expanded from here
  14. 23 Aug, 2019 1 commit
  15. 16 Aug, 2019 1 commit
  16. 12 Aug, 2019 1 commit
  17. 08 Aug, 2019 1 commit
  18. 07 Aug, 2019 3 commits
  19. 22 Jul, 2019 1 commit
    • Sebastian Dröge's avatar
      rtsp-media: Try to get dynamic payloaders by name from their bin first · 446315b3
      Sebastian Dröge authored
      First try "pay", then "pay_%s" (where %s == pad name). And only then
      fall back to the code that simply takes the first payloader that is
      The current code usually works (but is racy) because it will always take
      the payloader that was last added (due to g_list_prepend() when adding
      elements) in pad-added and that's usually the correct one. But if a new
      payloader is added between pad-added and us trying to get it, we would
      get the wrong payloader.
  20. 20 Jul, 2019 1 commit
  21. 17 Jul, 2019 1 commit
  22. 28 Jun, 2019 1 commit
    • Göran Jönsson's avatar
      rtsp-stream: Not wait on receiver streams when pre-rolling · d1d40491
      Göran Jönsson authored
      Without this patch there are problem pre-rolling when using audio back
      Without this patch a probe will be created for all streams including
      the stream for audio backchannel. To pre-roll all this pads have to
      receive data. Since the stream for audio backchannel is a receiver this
      will never happen.
      The solution is to never create any probes for streams that are for
      incomming data and instead set them as blocking already from beginning.
  23. 25 Jun, 2019 1 commit
  24. 12 Jun, 2019 1 commit
    • Mathieu Duponchelle's avatar
      rtsp-media: make sure streams are blocked when sending seek · ab372863
      Mathieu Duponchelle authored
      The recent ONVIF work exposed a race condition when dealing with
      multiple streams: one of the sinks may preroll before other streams
      have started flushing. This led to the pipeline posting async-done
      prematurely, when some streams were actually still in the middle
      of performing a flushing seek. The newly-added code looks up a
      sticky segment event on the first stream in order to respond to
      the PLAY request with accurate Scale and Speed headers. In the
      failure condition, the first stream was flushing, and thus had
      no sticky segment event, leading to the PLAY request failing,
      and in turn the test.
  25. 07 Jun, 2019 1 commit
  26. 06 Jun, 2019 2 commits
  27. 04 Jun, 2019 6 commits
  28. 02 Jun, 2019 1 commit
    • Niels De Graef's avatar
      meson: Bump minimal GLib version to 2.44 · e788fc4e
      Niels De Graef authored
      This means we can use some newer features and get rid of some
      boilerplate code using the G_DECLARE_* macros.
      As discussed on IRC, 2.44 is old enough by now to start depending on it.