gstreamer-1.0 appsrc sample example

Sebastian Dröge sebastian at centricular.com
Wed May 11 05:47:49 UTC 2016


On Di, 2016-05-10 at 14:17 +0530, Biswajit Panigrahi wrote:
> Hi Sebastian,
> Thanks a lot for your help.
> Basically I would like to stream a mpeg4  encoded data over udp. 
> If i execute a pipline on the command prompt like :
> 
> gst-launch-1.0 -e videotestsrc ! "video/x-raw, format=(string)YUY2,
> width=(int)640, height=(int)480, framerate=(fraction)30/1" ! vpe num-
> input-buffers=8 ! queue ! ducatimpeg4enc bitrate=4000 ! queue !
> mpeg4videoparse !  rtpmp4vpay config-interval= 10 pt=96 ! udpsink
> host=192.168.43.2 port=5000
> 
> and Play the same in Vlc player on 192.168.43.2 by "vlc test.sdp "
> then it works fine.
> 
> Contents of test.sdp:
> 
> v=0
> m=video 5000 RTP/AVP 96
> c=IN IP4 192.168.43.2
> a=rtpmap:96 MP4V-ES/90000
> 
> I would like to do similar kind of test using appsrc where instead of
> using videotestsrc like to stream our own data.
> So for that we are filling the gstbuffer.I have tried both with and
> without mpeg4videoparse but the result is same.
> cb_need_data function is not getting called for not even once.
> 
> Since i am new to gstreamer can you please help me in figuring out
> the issue.
> I am attaching the modified code.

Your pipeline still has the 3 problems from the previous mail. Fix
those first and then report what exactly is happening again.

Without fixing those your pipeline will never go to PAUSED or PLAYING
and the callback will never be called. Even more, you should get
various assertions at runtime.

Also I looked another time now and there's two more problems:
4) You're creating and assigning pipeline twice, the first one is
   just overwritten and not useful, you can remove it.
   Same goes for the appsrc.
5) On the appsrc you have to set emit-signals to TRUE, otherwise
   the signals are never emitted but only the callbacks.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160511/579ab612/attachment.sig>


More information about the gstreamer-devel mailing list