• Hardware Platform (Jetson / GPU): dPU A40.
• DeepStream Version: 6.4-triton-multiarch.
• TensorRT Version: 8.6.1.6.
• NVIDIA GPU Driver Version (valid for GPU only): 535.146.02.
• Issue Type( questions, new requirements, bugs): questions .
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
There python binding for gst_nvmessage_parse_stream_eos and gst_nvmessage_is_stream_eos ?
How i can detect if RTSP stream stops via python code?
You can refer this sample.
Thank you for your faster answer, When message structure message.get_structure() can hold stream-eos message? @junshengy
Yes, of course. This line of code should be what you need
elif t==Gst.MessageType.WARNING:
err, debug = message.parse_warning()
sys.stderr.write("Warning: %s: %s\n" % (err, debug))
elif t == Gst.MessageType.ERROR:
err, debug = message.parse_error()
sys.stderr.write("Error: %s: %s\n" % (err, debug))
loop.quit()
elif t == Gst.MessageType.ELEMENT:
struct = message.get_structure()
#Check for stream-eos message
if struct is not None and struct.has_name("stream-eos"):
parsed, stream_id = struct.get_uint("stream-id")
if parsed:
#Set eos status of stream to True, to be deleted in delete-sources
print("Got EOS from stream %d" % stream_id)
g_eos_list[stream_id] = True
return True
def main(args):
global g_num_sources
global g_source_bin_list
If I add this condition in deepstream_test3 can receive stream-eos structure?
junshengy:
elif t == Gst.MessageType.ELEMENT:
struct = message.get_structure()
#Check for stream-eos message
if struct is not None and struct.has_name("stream-eos"):
parsed, stream_id = struct.get_uint("stream-id")
if parsed:
#Set eos status of stream to True, to be deleted in delete-sources
print("Got EOS from stream %d" % stream_id)
when i handle Gst.MessageType.ELEMENT in both deepstream_test3 and runtime_source_add_delete
junshengy:
elif t == Gst.MessageType.ELEMENT:
struct = message.get_structure()
sys.stderr.write("struct: %s: \n" % (struct))
#Check for stream-eos message
if struct is not None and struct.has_name("stream-eos"):
parsed, stream_id = struct.get_uint("stream-id")
if parsed:
#Set eos status of stream to True, to be deleted in delete-sources
print("Got EOS from stream %d" % stream_id)
the Gst.MessageType.ELEMENT called twice before/after streammux log for handling eos in runtime_source_add_delete example
but the Gst.MessageType.ELEMENT called once before streammux log for handling eos in deepstream_test3 example, where not hold stream-eos in message structure
why message structure not hold stream-eos in deepstream_test3 ?
What make stream-eos being in message structure ?
@junshengy
system
Closed
May 13, 2024, 9:34am
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.