Capturing rtspsrc headers in gstreamer

21 views Asked by At

I'm looking to get the Timestamp header from RTSP payloads using the python gstreamer bindings. Based on my understanding of the rtspsrc component, what I want is to attach a callback to the handle-request signal, such that when it arrives I can inspect the headers. This is well and good, I thought I knew how to attach a listener:

...

def callback(*args):
    """As dumb a callback as can be: just send to stdout whatever you see."""
    print(args)

...

rtspsrc = Gst.ElementFactory.make('rtspsrc', 'component')
print(f"Connecting callback: {rtspsrc.connect('handle-request', callback)}")

... 

print shows that I'm successfully attaching the signal (and I'd get a TypeError if the signal didn't exist). But I start the connection, I watch data stream through, and my callback never fires.

What am I missing?

0

There are 0 answers