gstreamer-1.0 appsrc sample example
Biswajit Panigrahi
biswajit.p at mistralsolutions.com
Wed May 11 08:01:53 UTC 2016
Hi Sebastian,
Thanks for figuring out the issue.
I have modified the code completely.As of now instead of streaming over udp
i am testing it with fakesink.
Now the Start Feed and Stop Feed Function get called once.
The Error Log:
**************************************start
feeding******************************************8
inside read_data
inside read_data
inside read_data
*********************stop feeding*********************
ERROR from element mysource: Internal data flow error.
Debugging info: gstbasesrc.c(2865): gst_base_src_loop ():
/GstPipeline:pipeline0/GstAppSrc:mysource:
streaming task paused, reason not-negotiated (-4)
Currently appsrc looks like:
gst_parse_launch("appsrc name=mysource ! vpe num-input-buffers=8 !
ducatimpeg4enc bitrate=4000 ! fakesink dump=1 ", NULL);
caps = gst_caps_new_simple ("video/x-raw",
"format",G_TYPE_STRING,"RGB",
"bpp",G_TYPE_INT,24,
"depth",G_TYPE_INT,24,
"width", G_TYPE_INT, 640,
"height", G_TYPE_INT, 480,
"framerate", GST_TYPE_FRACTION, 30, 1,
NULL);
gst_app_src_set_caps(GST_APP_SRC(app->appsrc), caps);
Can you please check what could be the issue.I have attached the complete
code .Please review it and figure out the root couse.
Regards,
Biswajit
On Wed, May 11, 2016 at 11:17 AM, Sebastian Dröge <sebastian at centricular.com
> wrote:
> 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
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160511/4d1f50fa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GST_Final.c
Type: text/x-csrc
Size: 4766 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160511/4d1f50fa/attachment-0001.c>
More information about the gstreamer-devel
mailing list