When I get a new data I call decodeStream but this function is returning an error :
dsBitstreamError = 0x04, ///< error bitstreams(maybe broken internal frame) the decoder cared
dsNoParamSets = 0x10, ///< no parameter set NALs involved
I don't know what I'm doing wrong... Should I change some parameters on the raspberry sending ? Or do I have a problem with the way I'm initializing the decoder or my decoding.. ?
It looks like a keyframe I frame is not being sent ... or the receiver (your program) doesn't know where to look for one. You can tell raspivid to send one using -g 25 ( I frame every 25 frames)
would like to decode a stream sent by my my raspberry camera over network on my C++/Qt Program which will display the image.
I'm using gstreamer on Raspberry Side to send the stream with this command line :
raspivid -n -t 0 -w 1280 -h 720 -fps 25 -b 2500000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=my_ip port=5000
On desktop side when I execute :gst-launch-1.0 -v tcpclientsrc host=raspberry_ip port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
I'm able to see the stream of the camera correctly.
Okay, so now. I would like to make my own decoder using QT/C++ & OpenH264 decoder.
Here is my code :
When I get a new data I call decodeStream but this function is returning an error :
I don't know what I'm doing wrong... Should I change some parameters on the raspberry sending ? Or do I have a problem with the way I'm initializing the decoder or my decoding.. ?
Thanks for helping.