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
STATE CHANGE SUCCESS
STATE CHANGE SUCCESS 0x7e800221b0
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!
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.
Hi,
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);
}