Gst.PadProbeCallback?

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

Gst.PadProbeCallback?

pisymbol .
I am adding a probe to my src to do per frame timetamping/gps tagging. Adding the pad is easy, but what are the arguments to this callback?

Line of code:

self.nvcam0_pad.add_probe(Gst.PadProbeType.BUFFER, self.on_probe, None, None)

Doc (to show I care!):


...says there are three. But the interpreter claims there are five? What are the five and does the doc need updating?

Thanks!
-
aps

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

Re: Gst.PadProbeCallback?

pisymbol .


On Thu, Jun 13, 2019 at 6:10 PM pisymbol . <[hidden email]> wrote:
I am adding a probe to my src to do per frame timetamping/gps tagging. Adding the pad is easy, but what are the arguments to this callback?

Line of code:

self.nvcam0_pad.add_probe(Gst.PadProbeType.BUFFER, self.on_probe, None, None)

Doc (to show I care!):


...says there are three. But the interpreter claims there are five? What are the five and does the doc need updating?


Sorry, I think I mean four (self doesn't count). But anyway, the doc seems incorrect?

-aps

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

Re: Gst.PadProbeCallback?

Antonio Ospite-2
In reply to this post by pisymbol .
On Thu, 13 Jun 2019 18:10:17 -0400
"pisymbol ." <[hidden email]> wrote:

> I am adding a probe to my src to do per frame timetamping/gps tagging.
> Adding the pad is easy, but what are the arguments to this callback?
>
> Line of code:
>
> self.nvcam0_pad.add_probe(Gst.PadProbeType.BUFFER, self.on_probe, None,
> None)
>
> Doc (to show I care!):
>
> https://gstreamer.freedesktop.org/documentation/gstreamer/gstpad.html?gi-language=python#GstPadProbeCallback
>
> ...says there are three. But the interpreter claims there are five? What
> are the five and does the doc need updating?
>

How do you define self.on_probe()?

Ciao,
   Antonio

--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: Gst.PadProbeCallback?

Thornton, Keith
As far as I can see the C interface
typedef GstPadProbeReturn   (*GstPadProbeCallback)   (GstPad *pad, GstPadProbeInfo *info,
                                                      gpointer user_data);
only has three parameters.
And
gulong                  gst_pad_add_probe                       (GstPad *pad,
                                                                 GstPadProbeType mask,
                                                                 GstPadProbeCallback callback,
                                                                 gpointer user_data,
                                                                 GDestroyNotify destroy_data);
Has five.
I think if the documentation claims differently then the documentation is wrong

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel <[hidden email]> Im Auftrag von Antonio Ospite
Gesendet: Freitag, 14. Juni 2019 08:55
An: [hidden email]
Cc: pisymbol . <[hidden email]>
Betreff: Re: Gst.PadProbeCallback?

On Thu, 13 Jun 2019 18:10:17 -0400
"pisymbol ." <[hidden email]> wrote:

> I am adding a probe to my src to do per frame timetamping/gps tagging.
> Adding the pad is easy, but what are the arguments to this callback?
>
> Line of code:
>
> self.nvcam0_pad.add_probe(Gst.PadProbeType.BUFFER, self.on_probe,
> None,
> None)
>
> Doc (to show I care!):
>
> https://gstreamer.freedesktop.org/documentation/gstreamer/gstpad.html?
> gi-language=python#GstPadProbeCallback
>
> ...says there are three. But the interpreter claims there are five?
> What are the five and does the doc need updating?
>

How do you define self.on_probe()?

Ciao,
   Antonio

--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gst.PadProbeCallback?

pisymbol .


On Fri, Jun 14, 2019 at 3:36 AM Thornton, Keith <[hidden email]> wrote:
As far as I can see the C interface
typedef GstPadProbeReturn   (*GstPadProbeCallback)   (GstPad *pad, GstPadProbeInfo *info,
                                                      gpointer user_data);
only has three parameters.


It seems the add_probe command in Python drops the destroy_data. That's the issue. Mea culpa.

-aps

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

Re: Gst.PadProbeCallback?

Mathieu Duponchelle
In reply to this post by pisymbol .
The documentation was wrong indeed, fixed now:

https://gstreamer.freedesktop.org/documentation/gstreamer/gstpad.html?gi-language=python#gst_pad_add_probe
https://gstreamer.freedesktop.org/documentation/gstreamer/gstpad.html?gi-language=python#GstPadProbeCallback

For future reference you can also find a pad probe example in gst-python:

https://gitlab.freedesktop.org/gstreamer/gst-python/blob/master/examples/dynamic_src.py

Cheers!

On 6/14/19 12:10 AM, pisymbol . wrote:
I am adding a probe to my src to do per frame timetamping/gps tagging. Adding the pad is easy, but what are the arguments to this callback?

Line of code:

self.nvcam0_pad.add_probe(Gst.PadProbeType.BUFFER, self.on_probe, None, None)

Doc (to show I care!):


...says there are three. But the interpreter claims there are five? What are the five and does the doc need updating?

Thanks!
-
aps

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: Gst.PadProbeCallback?

pisymbol .


On Fri, Jun 14, 2019 at 12:38 PM Mathieu Duponchelle <[hidden email]> wrote:

Thanks Mathieu! Really appreciated.

-aps

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel