Error happend when run runtime_source_add_delete

I have successd run runtime_source_add_add_delete from github. when I use local file for test, it is all OK, it can add and delete source correctly. However when I change input from local file to rtsp, some errors happend. It can add source, but when call stop function, it shows error like this:

Calling Stop 3


ERROR from element source: Unhandled error
Error details: gstrtspsrc.c(6161): gst_rtspsrc_send (): /GstPipeline:dstest-pipeline/GstURIDecodeBin:source-bin-03/GstRTSPSrc:source:
Option not supported (551)
Returned, stopping playback
Deleting pipeline

Please tell me what should I do to fix this problem. Thanks!

Not sure but probably certain issue is your RTSP source. Please set up RTSP server through test-launch and try:

sudo apt-get install libgstrtspserver-1.0 libgstreamer1.0-dev
gcc test-launch.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)
[test-launch.c download from:]
./test-launch "filesrc location=sample_1080p_h264.mp4 ! qtdemux ! rtph264pay name=pay0 pt=96 "

My rtsp source is from hikvision camera which has format of rtsp://admin:password@192.168..:554/h264/ch1/main/av_stream. I don’t think it has problem because I can add it correctly and do other job. Can you have a try of hikvision rtsp rather than from file? Thanks.

The default sample only read URI once and duplicate it. This should work for file source. However, for RTSP source, you should connect to different IP cameras in each adding source. You may need to customize the logic at

  uri = g_strdup (argv[1]);
  for (i = 0; i < /*num_sources */ 1; i++) {
    GstElement *source_bin = create_uridecode_bin (i, argv[i + 1]);
    if (!source_bin) {
      g_printerr ("Failed to create source bin. Exiting.\n");
      return -1;
    g_source_bin_list[i] = source_bin;
    gst_bin_add (GST_BIN (pipeline), source_bin);