How to implement videooverlay interface in kmssink

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

How to implement videooverlay interface in kmssink

jared Hu
I’m trying to implement videooverlay interface in kmssink.

My solution is like ximagesink. In set_render_rectangle, I record this user input size and position. In expose, I send a renconfigure event upstream to strat a negotiation. In get_caps, return the fix size caps to peer plugin. This can work when playing. But in pause state, I can not show the resize frame immediately because the caps renegotiate will not start until next buffer push down.

Does anyone has some advice for me to solve this problem.
Reply | Threaded
Open this post in threaded view
|

Re: How to implement videooverlay interface in kmssink

Nicolas Dufresne-5
This interface only make sense for DRM driver that can scale. Then it's just a matter of implementing a refresh independent of upstream caps. Set_render_rectangle is not expected to depend on renegotiation.

Le 23 juin 2017 1:59 AM, "jared Hu" <[hidden email]> a écrit :
I’m trying to implement videooverlay interface in kmssink.

My solution is like ximagesink. In set_render_rectangle, I record this user
input size and position. In expose, I send a renconfigure event upstream to
strat a negotiation. In get_caps, return the fix size caps to peer plugin.
This can work when playing. But in pause state, I can not show the resize
frame immediately because the caps renegotiate will not start until next
buffer push down.

Does anyone has some advice for me to solve this problem.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-implement-videooverlay-interface-in-kmssink-tp4683510.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
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: How to implement videooverlay interface in kmssink

Victor Jaquez
On 06/25/17 at 02:57pm, Nicolas Dufresne wrote:
> This interface only make sense for DRM driver that can scale. Then it's
> just a matter of implementing a refresh independent of upstream caps.
> Set_render_rectangle is not expected to depend on renegotiation.

A bit off-topic: I wonder if there is DRM capability to query if the driver
supports scaling, rather than the trial-and-error we have now.

>
> Le 23 juin 2017 1:59 AM, "jared Hu" <[hidden email]> a écrit :
>
> > I’m trying to implement videooverlay interface in kmssink.
> >
> > My solution is like ximagesink. In set_render_rectangle, I record this user
> > input size and position. In expose, I send a renconfigure event upstream to
> > strat a negotiation. In get_caps, return the fix size caps to peer plugin.
> > This can work when playing. But in pause state, I can not show the resize
> > frame immediately because the caps renegotiate will not start until next
> > buffer push down.
> >
> > Does anyone has some advice for me to solve this problem.
> >
> >
> >
> > --
> > View this message in context: http://gstreamer-devel.966125.
> > n4.nabble.com/How-to-implement-videooverlay-interface-in-kmssink-
> > tp4683510.html
> > Sent from the GStreamer-devel mailing list archive at Nabble.com.
> > _______________________________________________
> > 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

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

Re: How to implement videooverlay interface in kmssink

Nicolas Dufresne-5
Hi Daniel,

is there a clean way to ask a DRM driver if it scales or not ?

regards,
Nicolas

Le lundi 26 juin 2017 à 09:44 +0200, Víctor M. Jáquez L. a écrit :

> On 06/25/17 at 02:57pm, Nicolas Dufresne wrote:
> > This interface only make sense for DRM driver that can scale. Then
> > it's
> > just a matter of implementing a refresh independent of upstream
> > caps.
> > Set_render_rectangle is not expected to depend on renegotiation.
>
> A bit off-topic: I wonder if there is DRM capability to query if the
> driver
> supports scaling, rather than the trial-and-error we have now.

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

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to implement videooverlay interface in kmssink

Jacob Chen
Hi, 

2017-06-26 22:13 GMT+08:00 Nicolas Dufresne <[hidden email]>:
Hi Daniel,

is there a clean way to ask a DRM driver if it scales or not ?

regards,
Nicolas

Le lundi 26 juin 2017 à 09:44 +0200, Víctor M. Jáquez L. a écrit :
> On 06/25/17 at 02:57pm, Nicolas Dufresne wrote:
> > This interface only make sense for DRM driver that can scale. Then
> > it's
> > just a matter of implementing a refresh independent of upstream
> > caps.
> > Set_render_rectangle is not expected to depend on renegotiation.
>
> A bit off-topic: I wonder if there is DRM capability to query if the
> driver
> supports scaling, rather than the trial-and-error we have now.

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


We have write a kmssink in x11, maybe it could help you.

We also have been writing a videooverlay support kmssink  for none-x11 use.



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

Re: How to implement videooverlay interface in kmssink

jared Hu
Hi Jacob,

Thanks for you advice, I notice that the plugin you propose is the combination of ximagesink and kmssink. I have checked ximagesink, when in pause state, resize only can show cropped frame. I'm afraid that this cannot solve my problem.

Thanks a lot again.
Reply | Threaded
Open this post in threaded view
|

Re: How to implement videooverlay interface in kmssink

jared Hu
In reply to this post by Nicolas Dufresne-5
Hi Nicolas,

ximagesink also use this method to implement video overlay interface. And I have tried ximagesink. It cannot show right size frame but cropped when in pause state if I resize the xwindow.
Reply | Threaded
Open this post in threaded view
|

Re: How to implement videooverlay interface in kmssink

Nicolas Dufresne-5
Le mercredi 28 juin 2017 à 19:42 -0700, jared Hu a écrit :
> ximagesink also use this method to implement video overlay interface. And I
> have tried ximagesink. It cannot show right size frame but cropped when in
> pause state if I resize the xwindow.

ximagesink does not support scaling, xvimagesink does. for kmssink it
depends on the driver.

I'm not sure why X is relevant in this thread, maybe I missed something
?

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

signature.asc (188 bytes) Download Attachment