PDA

View Full Version : Qt 4.8.5 & gstreamer overlay



woutervh
10th July 2015, 14:42
Hello all,
To give a bit of background. I'm developing an application which has the ability to show multiple rtp-streams from many camera's.
The platform is an Intel Baytrail E38xx, with QT 4.8.5 and gstreamer 1.0.

To be able to start a stream immediately when selected, I created a "camerasrcbin" for every camera at startup. This contains the rtspsrc, rtph264depay,h264parse and a queue. I put this bin to playing state and on the pad_added signal, I connect the created pad to the depay and put this bin to pause. I attach this bin as a public property to a cameraobject.

Now, when I select a camera in my GUI, I "attach" the rest of the pipeline to the selected camera. (rest of the pipeline is vaapidecode, queue, cvideocrop, videoscale, vaapipostproc and vaapisink) and put it to playing state. When selecting another camera, I remove this inputbin again from the pipeline and put it to pause (ref it first so it doesn't get removed while removing it from the pipeline). Afterwards, I put the pipeline to NULL and unref it and so on... To put it in the correct widget, I do a _bus_callback and listen to the "prepare-window-handle". There I set the window handle to the requested winid.

Now, I still have a few issues:
- When I put this camerasrcbin to GST_STATE_PAUSED state, will it keep the rtsp-connection itself open like forever without really streaming? Or will it stop after a while. I want to keep it open so I don't have to re-initialize it afterwards.
- Sometimes, I don't see all video's coming, or even video which pops up in a seperate window in stead of the requested widget.

I've putted my relevant code in:
http://pastebin.com/dvdv3zjG

thanks!

woutervh
5th August 2015, 10:37
Can nobody answer any of these questions?