Problems with getting framerate when streaming

Weavel weavel37 at yahoo.fr
Thu Feb 21 03:03:39 PST 2013


Hi !
I'm working on Gstreamer since few months
I'm trying to get the framerate when i'm streaming to send it throught an
url with curl, but i met several problems. I tried different ways to reach
that goal.
I'm using Gstreamer version 0.10.

I've read that identity could help me : 
http://gstreamer-devel.966125.n4.nabble.com/Real-framerate-display-td971967.html

So i made a little code.

In my main

str = g_strdup_printf(" 
 /* ... */
 " ! identity name=id datarate=1"
 /* ... */
pipeline = gst_parse_launch (str,NULL);
/* ... */
id = gst_bin_get_by_name (GST_BIN (pipeline), "id");
/* playing etc... */
g_signal_connect (id, "handoff", G_CALLBACK (to), &data);

and then the "to" function
to (GstElement *toelem, GstBuffer arg0, CustomData *data)
{
cpt = cpt +1;
}


cpt is a global variable. I did a g_timeout_add to reset it every second, so
i could get frame average measurement, but it seems to overflood and doesn't
work...

The second issue was to use fpsdisplaysink : 
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-fpsdisplaysink.html
http://lists.freedesktop.org/archives/gstreamer-devel/2013-February/039521.html
To not have Internal Error, i decided to put tee in my pipeline but then i
had :

0:00:09.641764967 25766      0x170f8c0 ERROR           decklinksink
gstdecklinksink.cpp:1080:ScheduledPlaybackHasStopped:
ScheduledPlaybackHasStopped

I also tried to put !queue before and rtpjitterbuffer between src and sink
but unsuccessful

The third issue was to add a probe with gst_pad_add_probe :
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-dataaccess.html#section-using-probes

In main function

pad = gst_element_get_static_pad (src, "src");
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, cb_have_data, NULL,
NULL);

with in the pipeline :

"rtspsrc protocols=GST_RTSP_LOWER_TRANS_TCP latency=5000 timeout=1 
buffer-mode=1 location=%s name=src"

But it seems that in 0.10 gst_pad_add_probe is undefined :

test.c:(.text+0x14ea): undefined reference to `gst_pad_add_probe'



And the last issue was to use QoS :
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-qos.txt
but i had storage size problems.

I know i made mistakes but if you can give me some hints I would be
grateful. Any help is welcome.
Thanks in advance.
Weavel



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problems-with-getting-framerate-when-streaming-tp4658686.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list