| Author |
Message |
|
jameswilson
Joined: Wed Jun 08, 2005 9:07 pm Posts: 5078 Location: Midlands UK
|
maciekc, you know you mentioned i could use the code in my viewer, can i look at the code so as to see how you have achived shared mem access. I assume there is a jpeg in ram is there or does it work in a different way, ie this raw thing?
_________________James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
|
| Wed Mar 08, 2006 12:35 pm |
|
|
|
 |
|
maciekc
Joined: Wed Feb 23, 2005 10:21 pm Posts: 150 Location: Czestochowa, POLAND
|
Yes no problem - the source is in the package.
Shared mem access is functions shmget shmat.
The images in the memory are raw - not jpeg maybe there are also jpegs, but I didn't looked for them. The rgb images are simpler to use than jpegs and you don't have to decompress them.
If you have any questions please write to me.
GOOD LUCK with shm!
I have now some rescalling not yet included in the source, but I will try to use xvideo extension for this work - should be better because the rescallling, converting, and displaying will be done by graphics card not by main CPU.
I downloaded some testxv source that is example for xvideo I can mail it for you if you want.
|
| Wed Mar 08, 2006 4:26 pm |
|
 |
|
jameswilson
Joined: Wed Jun 08, 2005 9:07 pm Posts: 5078 Location: Midlands UK
|
im not that far along with it yet, i was just wondering about changing the linux viewer i have to work with shared mem. It looks like a mine field lol. I was only curious so i caould mull it over in my head for a while, while i thought about the end game for the linux viewer. Am i right in thinking this raw viewer opens indivual windows per monitor
?
_________________James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
|
| Wed Mar 08, 2006 6:05 pm |
|
 |
|
maciekc
Joined: Wed Feb 23, 2005 10:21 pm Posts: 150 Location: Czestochowa, POLAND
|
Could you explain what you mean? I'm not an englishmen...
The version 0.3 - xlib_shm opens one window and up to 32(this could be simply changed by editing src). The monitors are positioned automatically(not resized - only scale=100%). My next goal is to use xvideo to display the pictures that would eat less CPU time, and probably will do also all the rescalling stuff.
xlib_raw is the other game:) - I probably won't make any updates of it - maybe only if someone wants.
|
| Wed Mar 08, 2006 9:10 pm |
|
 |
|
jameswilson
Joined: Wed Jun 08, 2005 9:07 pm Posts: 5078 Location: Midlands UK
|
I like to think about the problem for a while before starting to write code
_________________James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
|
| Wed Mar 08, 2006 9:37 pm |
|
 |
|
semotta
Joined: Thu Jun 30, 2005 12:39 am Posts: 20 Location: Sao Paulo, Brazil
|
ZM is running. I can access through http.
I was already trying to run xlib_shm as root.
What else could I try?
EDIT: After posting I tried again and it worked! Sorry for I was doing something wrong. Thanks for your patience. Sergio
|
| Wed Mar 08, 2006 10:14 pm |
|
 |
|
maciekc
Joined: Wed Feb 23, 2005 10:21 pm Posts: 150 Location: Czestochowa, POLAND
|
So you are opposite of me. I'm first trying to write. Of course it doesn't work, or work badly, next I'm googling and thinking...
|
| Wed Mar 08, 2006 10:25 pm |
|
 |
|
jameswilson
Joined: Wed Jun 08, 2005 9:07 pm Posts: 5078 Location: Midlands UK
|
lol no i do that too, but i need to have a clue where to start and at the moment i have none.
PS of course i dont plan my code that would be just plain organised, professional and daft...lol
JAmes
_________________James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
|
| Wed Mar 08, 2006 11:38 pm |
|
 |
|
victor_diago
Joined: Wed Jan 21, 2004 3:44 pm Posts: 245 Location: Brazil, sao paulo
|
Hi macieck
Ive run your software until now. it works VERY WELL. dont stops and maintain all sync.
but as we know zm 1.22.0 is a bit buggy. can you make a port to 1.21.4 ?
ive tried to change shm structure but no success.
Please, could you help us ?
Victor Diago
|
| Tue Mar 28, 2006 2:26 am |
|
 |
|
maciekc
Joined: Wed Feb 23, 2005 10:21 pm Posts: 150 Location: Czestochowa, POLAND
|
I will take a look at this.
Which version of xlib_shm do you want to have ported?
I will then try to explain you how to do this - what you have to change.
ps. The version using xvideo is almost done - now you will be able to rescale image with beautiful antialiasing and without any cpu usage - everything is done inside graphics card.
---ADDED:
I have looked at this.
You have to change struct shareddata. That should be all. Simply find it in zm_monitor.h - lines 126-142 and copy to the source of xlib_shm. I don't want to install zm-1.21.4 because I have already installed 1.22.0 on my machine.
|
| Tue Mar 28, 2006 3:57 pm |
|
 |
|
maciekc
Joined: Wed Feb 23, 2005 10:21 pm Posts: 150 Location: Czestochowa, POLAND
|
new version - 0.4
Now I'm using xvideo extension to display images - it should be compatible with every new graphics card - I have RIVA TNT, and it works without any problems.
Now you are able to display up to 32 monitors they are automatically adjusted, positioned, and resized to perfectly fit the screen or window size.
Usage is the same as in 0.3 except options -w -h - they specify window width and height. If they are not specified - window size is your resolution(fullscreen). When you change window size monitors are also resized.
Please test it, and tell if there are any bugs.
My next goal is to make simple GUI with buttons.
http://dig.hopto.org/xlib_shm/
If you want a screenshot please write. I will make one for you.
ps. maybe I should change the name and start new topic zm_gui? What do you think?
|
| Wed Mar 29, 2006 8:18 pm |
|
 |
|
victor_diago
Joined: Wed Jan 21, 2004 3:44 pm Posts: 245 Location: Brazil, sao paulo
|
Hi.
Thanks, Congratulations for the perfect work.
We all in the zoneminder community has to thanks you.
Is this able to run in 1.21.4 ?
Thanks for now
Victor Diago
|
| Wed Mar 29, 2006 9:28 pm |
|
 |
|
maciekc
Joined: Wed Feb 23, 2005 10:21 pm Posts: 150 Location: Czestochowa, POLAND
|
After a little modification it should work.
Maybe I'will check this out this weekend.
Did you tried to change shm structure what I wrote few days ago?
|
| Wed Mar 29, 2006 11:08 pm |
|
 |
|
victor_diago
Joined: Wed Jan 21, 2004 3:44 pm Posts: 245 Location: Brazil, sao paulo
|
Hi maciekc
Man all works like a charm.
Im wondering if there is a way to, view remotelly with your viewer. i mean, is there a way to write your system output to a file with ffmpeg´s help, encode it with divx and view remotely with ffplay or something like ?
Your software sure is a important step for zoneminder.
Thanks you and much congratulations.
Victor Diago
|
| Tue Apr 11, 2006 12:36 pm |
|
 |
|
krattai
Joined: Thu Apr 13, 2006 4:28 pm Posts: 3
|
I'm trying to get a copy of this to try, but looks like you've run into a problem on your server, maciekc.
Any idea when it'll be available again?
Cheers...
|
| Thu Apr 13, 2006 5:06 pm |
|
|