Attempting to stream text over RTSP using Gstreamer
I am trying to develop an application that transmits processed data over RTSP so that another application can receive the data and do other things with it. The trouble is, few people seem to be using RTSP or / or Gstreamer to stream text (XML) data, so I am having difficulty finding the resources I need.
So on the server side (my application) I have this:
gst_rtsp_media_factory_set_launch(m_Factory, "( appsrc name=mysrc ! application/x-rtp,pt=98 ! rtpgstpay name=pay0 pt=98 )");
And I am testing the connection by executing the following pipeline:
gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test use-pipeline-clock=true debug=true ! application/x-rtp,payload=98 ! fakesink dump=true
When I ran both of them, I confirmed that the server side callback for the "demand-data" signal is being called continuously and the debug output of rtspsrc gave me a 200 OK response entirely from the OPTIONS request to the PLAY request, except that fakesink dumped nothing and I can't see any data packet in Wireshark other than requests and ACKs. So it seems like a connection can be made between the two, except there is no actual data being passed between them.
And a few seconds after connecting I get this output from gstreamer on the server side (GST_DEBUG = 3)
0:00:13.646758533 4844 0x7f3508003940 WARN rtspmedia rtsp-media.c:3068:gst_rtsp_media_set_state: media 0x1f4ada0 was not prepared
0:00:13.676328927 4844 0x7f34d8004590 FIXME default gstutils.c:3643:gst_pad_create_stream_id_internal:<mysrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:13.676967874 4844 0x7f34b8001540 FIXME default gstutils.c:3643:gst_pad_create_stream_id_internal:<appsrc3:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:13.677498868 4844 0x7f34b8001680 FIXME default gstutils.c:3643:gst_pad_create_stream_id_internal:<appsrc4:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
and after exactly 20 seconds I get this:
0:00:33.676438806 4844 0x7f34c0001f70 WARN rtspmedia rtsp-media.c:2127:wait_preroll: failed to preroll pipeline
0:00:33.676619321 4844 0x7f34c0001f70 WARN rtspmedia rtsp-media.c:2384:gst_rtsp_media_prepare: failed to preroll pipeline
0:00:33.681136801 4844 0x7f34c0001f70 ERROR rtspclient rtsp-client.c:678:find_media: client 0x1ec83b0: can't prepare media
0:00:33.684604205 4844 0x7f34c0001f70 ERROR rtspclient rtsp-client.c:2210:handle_describe_request: client 0x1ec83b0: no media
There seems to be only one tiny step missing to get the data packets actually transferred from my application, but so far I have been unable to identify it. Any help is appreciated.
source to share
No one has answered this question yet
Check out similar questions: