I am trying to stream a user's webcam over the network to a C-based server. I have used Janus gateway.
I created a small plugin which is heavily based on the echotest demo example : I have my browser connecting to my janus server via WebRTC technology and I have it stream the user's webcam.
On the server side, I have janus_incomming_rtp function which gives me a char * buffer and int length. Upon inspection, the buffer of data that's incomming is about the length of the MTU : each frame of my video is sent upon several RTP packets.
I have inspected a bit the header by following this wikipedia page but I don't know how to reconstruct the image from that stream of UDP RTP packets. Ideally, I'd like to pass the stream to openCV to do realtime image processing.
I have heard of gstreamer, but I don't undertstand what it is nor how it could help me ; besides I don't know if openCV has any built in functions to "reconstruct" the images ? And I don't know in which format the video frames are being encoded : the PT (Payload Type) seems to be 116 which is defined as "dynamic" but I have no idea what it means.
Any help ?
Here are some guiding steps for handling the SRTP packets to decode them.
SDP:
a=rtcp-mux
and you will see that the port in a=rtcp:50111 IN IP4
<address>
and the candidate media ports will be the same.a=group:BUNDLE
audio video
SRTP:
GStreamer: