pushing appsrc with user data

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

pushing appsrc with user data

venkata.subbarao
Hello,

We are developing an application using gstreamer where the source of the
gstreamer pipeline is from a video decoder. As a proof of concept we are
trying out simple program. We have used appsrc and successfully fed the
pipeline with yuv420p buffer and displayed using xvideo.

Our next requirement is to send the timestamp of the frame along with raw
yuv420p. We would like to get this back at the end of the pipeline. As a
proof of concept we are using fakesink and a callback as follows.

"appsrc is-live=true name=source caps=\"%s\" ! videoconvert ! myplugin !
fakesink sync=1"

  element = gst_bin_get_by_name (GST_BIN (g_app.pipeline), "fakesink0");
  g_object_set (G_OBJECT (element), "signal-handoffs", TRUE, NULL);
  g_signal_connect (element, "handoff", G_CALLBACK (on_gst_buffer), NULL);
  gst_object_unref (element);


Now inside on_gst_buffer(), we would like to get the timestamp sent along
with appsrc. Any suggestions how to do this ?

Thanks,
Venkata Subbarao



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: pushing appsrc with user data

venkata.subbarao
I have resolved this by adding the following in the function which sends the
raw frames.

GST_BUFFER_PTS (buffer) = timestamp;



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: pushing appsrc with user data

surprised
Hi,venkata.subbarao.

Recently,I met some problem which is as same as yours.It's about timestamps.

I set timestamp in appsrc like this:GST_BUFFER_PTS(buffer)=100;

And I get timestamp in appsrc like this: timestamp=GST_BUFFER(buffer);

But the gotten timestamp doesn't equal to 100 which I set in appsrc.

Do you know why?Looking forward to your early reply.Thank you all the same.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel