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 306292 - [PATCH] move some xshm code from ximagesrc.c to ximageutil.c and add xshm support to ximagesrc
[PATCH] move some xshm code from ximagesrc.c to ximageutil.c and add xshm sup...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-02 17:42 UTC by Luca Ognibene
Modified: 2005-12-18 21:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first not finished patch (38.25 KB, patch)
2005-06-02 17:42 UTC, Luca Ognibene
none Details | Review
second not finished patch (24.59 KB, patch)
2005-06-03 18:57 UTC, Luca Ognibene
none Details | Review
updated patch (26.48 KB, patch)
2005-06-14 20:09 UTC, Luca Ognibene
none Details | Review

Description Luca Ognibene 2005-06-02 17:42:04 UTC
This patch does some thing:
- add ximageutil.c and ximageutil.h
- move some xshm util code from ximagesrc to ximageutil
- add xshm support to ximagesrc

I've done this work hoping that it'll improve ximagesrc's performance but i was
wrong :/ So i'm not going to apply this patch, i'm adding this to bugzilla so my
work won't be lost. Maybe a day it'll be usefull..

btw, the patch is not finished, some things that need to be done:
- free the bufferpool 
- better bufferpool management
- test ximagesrc w/o xshm
Comment 1 Luca Ognibene 2005-06-02 17:42:39 UTC
Created attachment 47151 [details] [review]
first not finished patch
Comment 2 Luca Ognibene 2005-06-02 17:43:48 UTC
marking as WONTFIX because xshm doesn't make ximagesrc faster (at least in my pc). 
Comment 3 David Schleef 2005-06-02 17:55:33 UTC
Then you're doing it wrong. :)
Comment 4 Luca Ognibene 2005-06-02 18:01:23 UTC
It's really possible! :) 
I'm definitily not a X guru.. If you (or someone else) want to try to improve (or fix) the patch.. feel free 
to do it!! I've attached it here and not just deleted it for this reason.. 
Comment 5 Luca Ognibene 2005-06-02 18:13:11 UTC
I've just found this:
http://lists.freedesktop.org/pipermail/xorg/2005-April/007266.html

So.. can someone with a good video card test the patch? (my desktop has a
voodoo3 card..)
See cpu usage before and after the patch using:
gst-launch-0.8 ximagesrc ! video/x-raw-rgb,framerate=10.0 ! fakesink 

Reopening the bug. I'll fix all the patch issues if someone can see an improvement.
Comment 6 Luca Ognibene 2005-06-03 18:57:03 UTC
Created attachment 47204 [details] [review]
second not finished patch

gstreamer moves too fast ;)

new patch against current cvs.
Comment 7 Ronald Bultje 2005-06-09 17:47:08 UTC
It definitely makes it faster, I can run at 5-10 FPS. The old could run at 1-2
FPS at best.

However... You broke colors, too. :). I don't know why yet...
Comment 8 Ronald Bultje 2005-06-09 17:49:02 UTC
Old: /pipeline0/ximagesrc0.src: caps = video/x-raw-rgb, bpp=(int)32,
endianess=(int)4321, red_mask=(int)65280, green_mask=(int)16711680,
blue_mask=(int)-16777216, width=(int)1680, height=(int)1050,
framerate=(double)1, depth=(int)24, endianness=(int)4321

New: 

/pipeline0/ximagesrc0.src: caps = video/x-raw-rgb, bpp=(int)32,
endianess=(int)4321, red_mask=(int)16711680, green_mask=(int)65280,
blue_mask=(int)255, width=(int)1680, height=(int)1050, framerate=(double)1,
depth=(int)24, endianness=(int)4321

So the mask swapped from xRGB to BGRx or the other way around. Please fix that
before applying.
Comment 9 Luca Ognibene 2005-06-14 20:09:35 UTC
Created attachment 47764 [details] [review]
updated patch

New patch.

Features:
 * implement xshm in ximagesrc (performance gain)
 * moves some useful code from ximagesink to ximageutil.[ch]
 * fix some bugs in ximagesrc (for ex. display property)
 * make ximagesrc uses functions in ximageutil.[ch]
 * add a bufferpool to ximagesrc (performance gain)
 * fix some memory leak in ximagesrc

Adding support for capturing a window and not the whole display should be
easier now. It should also work w/o xshm but i've not tested it.. if someone
can test and report it :)

The patch is quite big so i would like to have some testing before commiting..
(both ximagesrc and ximagesink).

to BBB: i can't reproduce your bug but maybe i've fixed it :) can you test?
thanks!
Comment 10 Andy Wingo 2005-07-16 14:10:04 UTC
See also bug #304795, about porting ximagesrc to 0.9. Let's keep this bug open
(or a bug) until this makes it into HEAD.
Comment 11 Andy Wingo 2005-11-14 12:21:20 UTC
Because it seems ximagesrc and ximagesink will end up in different modules this
file will need to be put in both modules. Adding Julien to cc because he's
working on this right now.
Comment 12 Julien MOUTTE 2005-12-18 21:22:43 UTC
I am not going to use those files.
So please just commit your stuff in gst-plugins-bad when you are happy enough with your port of ximagesrc.

Comment 13 Julien MOUTTE 2005-12-18 21:40:02 UTC
ok i ll apply that to -bad myself
Comment 14 Julien MOUTTE 2005-12-18 21:45:47 UTC
So we have 2 bugs for the same thing i m going to close this one and check tomorrow how to grab the correct ported code that can go in gst-plugins-bad.
This patch is obsolete because there won't be code shared between ximagesink and ximagesrc.