After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 523397 - Implement a cairo video sink
Implement a cairo video sink
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-19 16:45 UTC by Sebastian Dröge (slomo)
Modified: 2011-05-19 07:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2008-03-19 16:45:54 UTC
Hi,
it'd be nice to have a good cairo video sink for GStreamer. Currently one exists in WebKit but it has some issues still.

http://trac.webkit.org/projects/webkit/browser/trunk/WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp

- it doesn't support upstream negotiation
- doesn't use GstVideoSink as base class
- probably fails for BGR (see TODO in 110)
- copies the data twice (see TODO in 113)


Also it would be nice if it could support more formats and if possible a GstCairoBuffer would be nice to have so upstream elements can write their data directly into a cairo buffer. Not sure if cairo offers something for this.
Comment 1 Sebastian Dröge (slomo) 2008-04-09 09:44:53 UTC
Another problem that popped up after some more thoughts on this is, that cairo doesn't seem to be thread-safe. So we need a way to give surfaces to the app and tell the app to draw them in it's main loop.

For this we could use signals and I don't see another solution yet as the drawing should happen ASAP.

Also we probably have to do some more magic with the surfaces, maybe ask the app to set a surface and then we create "similar" ones to that surface and give them to the app and the app can blit it on it's surface and has to free it afterwards.
Comment 2 David Schleef 2008-04-10 01:23:04 UTC
Cairo is thread-safe, just not reentrant on the same object.  So just associate a lock with the surface.  This is the same as an Xlib Display object.
Comment 3 Sebastian Dröge (slomo) 2008-04-10 05:43:47 UTC
So I can do stuff on a surface from different threads, even if it's a win32 surface for example?
Comment 4 Sebastian Dröge (slomo) 2011-05-19 07:03:14 UTC
I'll close this as obsolete now. To make real use of cairo the sink has to be integrated into the application, which was done by webkit and others already. And others are just using clutter now, which has it's own video sink ;)
I don't plan to work on this and apparently nobody else