Cross-platform video sink on top of SDL

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

Cross-platform video sink on top of SDL

Yuriy Volkov
Hi,

I want to build a cross-platform video sink on top of SDL. Are there any guides/best practices to follow so that the resulting plugin would be considered of "good" quality? I thought about using GstVideoSink as a base class and implementing GstNavigation and GstVideoOverlay interfaces.

Best,
Yuri

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

Re: Cross-platform video sink on top of SDL

Nicolas Dufresne-5
Le samedi 11 mars 2017 à 12:45 +0200, Yuriy Volkov a écrit :
> Hi,
>
> I want to build a cross-platform video sink on top of SDL. Are there
> any guides/best practices to follow so that the resulting plugin
> would be considered of "good" quality? I thought about using
> GstVideoSink as a base class and implementing GstNavigation and
> GstVideoOverlay interfaces.

Refer to existing sync. Ideally, your sink should:

- Best effort to reduce memory copies
- Support GstVideoMeta
- If scaling, maintain proper aspect ratio / add black bars
- Integrate well in existing application

SDL though has multiple rendering method. I'd be extra careful in the
naming, I believe you could easily consider having multiple sinks,
sdlsink (for RGB), sdloverlaysink (for YCbCr) and sdlglsink when using
GL overlays.

regards,
Nicolas

>
> Best,
> Yuri
> _______________________________________________
> 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

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

Re: Cross-platform video sink on top of SDL

Yuriy Volkov
Thank you for your reply, Nicolas.

What would it take to integrate well in an existing app from the GStreamer perspective? Are there any standard approach which applications tend to follow?

Isn't it possible to abstract away SDL rendering method and match colorspace with https://wiki.libsdl.org/SDL_CreateTexture ?

Best,
Yuri


Best,
Yuri

2017-03-11 18:15 GMT+02:00 Nicolas Dufresne <[hidden email]>:
Le samedi 11 mars 2017 à 12:45 +0200, Yuriy Volkov a écrit :
> Hi,
>
> I want to build a cross-platform video sink on top of SDL. Are there
> any guides/best practices to follow so that the resulting plugin
> would be considered of "good" quality? I thought about using
> GstVideoSink as a base class and implementing GstNavigation and
> GstVideoOverlay interfaces.

Refer to existing sync. Ideally, your sink should:

- Best effort to reduce memory copies
- Support GstVideoMeta
- If scaling, maintain proper aspect ratio / add black bars
- Integrate well in existing application

SDL though has multiple rendering method. I'd be extra careful in the
naming, I believe you could easily consider having multiple sinks,
sdlsink (for RGB), sdloverlaysink (for YCbCr) and sdlglsink when using
GL overlays.

regards,
Nicolas

>
> Best,
> Yuri
> _______________________________________________
> 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: Cross-platform video sink on top of SDL

Nicolas Dufresne-5
Le lundi 13 mars 2017 à 18:24 +0200, Yuriy Volkov a écrit :
> What would it take to integrate well in an existing app from the
> GStreamer perspective? Are there any standard approach which
> applications tend to follow?

This question is not specific enough, hence I cannot really give an
answer.

>
> Isn't it possible to abstract away SDL rendering method and match
> colorspace with https://wiki.libsdl.org/SDL_CreateTexture ?

I don't think so, there is semantic differences on the SDL side. But
you propose something, and we'll see.

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

signature.asc (188 bytes) Download Attachment