digital-car.co.uk    

Go Back   digital-car.co.uk > Software > CarPC Software > Velocity Frontend

Reply
 
Thread Tools Display Modes
Old 26-09-2006, 12:13 PM   #16
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
forgot to mention, my only concern with it having windows hooks, is that it would become windows oriented, and I'm trying to make it work with Mac and linux too.
Sama is offline   Reply With Quote
Old 26-09-2006, 12:30 PM   #17
ElKeeed
Advanced Member
 
ElKeeed's Avatar
 
Join Date: Jan 2005
Posts: 4,207

ElKeeed will become famous soon enough
mmm the trouble with that is that things that try always end up so so on everything rather than great on just one or two platforms.

Probably best to have a lot in common but then optimisations for various platforms than try to be too generic?
ElKeeed is offline   Reply With Quote
Old 26-09-2006, 12:50 PM   #18
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
I agree and disagree!

I agree that porting stuff over from one platform to the other, means too much messing around, and also that writing stuff in the wrong way for multi os's is usually ineffecient.

but when coding for multiplatform correctly, it can be just as good on all systems (give or take the abilities of the os's, like Java Linux can address more memory than Java Windows).

When writing multiplatform code, it's important to write as abstract as possible, and where specific system hooks are required, that this be done in a single class, where it can be done differently for different os's.

For example, say you have a TV card. Windows will have one driver, Mac another, and these drivers do not speak the same protocol. So you start by specifying an interface, which will allow you to change channel, change volume, and all the functions required on the top end of the system. then you implement that interface using one class for windows, and another for mac.

If writing something for the serial port, like a GPS for example, where the drivers do speak the same protocol (baudrate, party, bits etc), then you can write the code to read/write bytes to/from a stream within a common class, and you only point to a differernt driver.

So between direct OS communcation, and wrapping specific drivers, you can get the best of both worlds.

that's my take on it anyway :)
Sama is offline   Reply With Quote
Old 26-09-2006, 12:54 PM   #19
~Rob
Advanced Member
 
~Rob's Avatar
 
Join Date: Apr 2006
Location: Cambridge, UK
Posts: 14,922

~Rob will become famous soon enough
Send a message via MSN to ~Rob Send a message via Skype™ to ~Rob
So you're going to have a small accessor method to detect the OS and then use different classes depending on the OS to do the same thing. So for example you'd have a method which does the basics and another which calls it depending on the OS? Sounds like a lot of coding!
__________________
~Rob - Proving more posts don't mean more knowledge
~Rob is offline   Reply With Quote
Old 26-09-2006, 12:59 PM   #20
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
that's the point. most of the time, you needn't write additonal OS code, since most of the code will be done multiplatoform. It's only when there are specific devices that need coding, you'd need to write an OS specific driver.

So again, TV card example at hand, if you write all the code in Velocity to do your channel surfing, favourite channels, recording, taking screenshots etc. This will work for all OS's. Then you would need a class that implements the TV interface for windows, and a class that would do so for linux.

Of course I wouldn't write them all, but someone that wants to add linux support, would do so by writing a single class.
Sama is offline   Reply With Quote
Old 26-09-2006, 01:01 PM   #21
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
it's basically removing dependancy from the code, and saying: if on this OS, these are the classes that are dependant on, and if this OS, these are the classes. and in those classes, you only need to code the differences between the os's.
Sama is offline   Reply With Quote
Old 28-09-2006, 02:04 AM   #22
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
Update:

Today, I stabalized the framework a bit, and did some performance testing, as I feared the network would be filled with rubbish and Flash would slow down.

I was sending an update message from Java to Flash every millisecond (highly unlikely situation) and was also polling vlc every millisecond, all at the same time as repeatedly changing from video to mp3, hammering mp3 additions to vlc and hammering video additions to video.

don't forget, that these are three different technologies that are talking to each other, and you really need to make sure the turns are sorted out correctly etc...

it works like charm!
Sama is offline   Reply With Quote
Old 28-09-2006, 08:40 AM   #23
com2soft
Member
 
Join Date: Sep 2006
Posts: 32
com2soft is on a distinguished road
all the support for your hard work.
com2soft is offline   Reply With Quote
Old 28-09-2006, 09:47 AM   #24
ccsnet
DC Organiser
 
ccsnet's Avatar
 
Join Date: Feb 2004
Location: Morecambe, Lancs, UK ( Just For The Moment )
Posts: 16,602

ccsnet will become famous soon enough
So for the un-brisolistes of us any chance of some screenies ?

Terran
__________________

ccsnet is offline   Reply With Quote
Old 28-09-2006, 10:59 AM   #25
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
I've just done some video capture, but since the vlc window is an overlay, it's not being shown, so you'll have to use your imagination and pretend the video is in the black box

video moved to this thread

Last edited by Sama; 28-09-2006 at 01:13 PM.
Sama is offline   Reply With Quote
Old 28-09-2006, 11:11 AM   #26
ccsnet
DC Organiser
 
ccsnet's Avatar
 
Join Date: Feb 2004
Location: Morecambe, Lancs, UK ( Just For The Moment )
Posts: 16,602

ccsnet will become famous soon enough
Quote:
Originally Posted by Sama
I've just done some video capture, but since the vlc window is an overlay, it's not being shown, so you'll have to use your imagination and pretend the video is in the black box
Whats the avi type ? Its not a standard one or I'd be able to play it...

Terran
__________________


Last edited by Sama; 28-09-2006 at 01:13 PM.
ccsnet is offline   Reply With Quote
Old 28-09-2006, 11:12 AM   #27
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
oops! dunno, I just used this freeware grabber. just use VLC ;)

do you know any good grabbers that will do overlayed video as well?
Sama is offline   Reply With Quote
Old 28-09-2006, 11:14 AM   #28
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
it's xvid
Sama is offline   Reply With Quote
Old 01-10-2006, 03:09 PM   #29
nigelf
Senior Member
 
nigelf's Avatar
 
Join Date: Nov 2005
Location: New York USA- Keighley GB
Posts: 512

nigelf is on a distinguished road
Sama... that VLC is the dogs..... wow i may dump media player and winamp! it plays anything... and smoothly.
__________________
Any married man should forget his mistakes. There's no use in two people remembering the same thing.
nigelf is offline   Reply With Quote
Old 01-10-2006, 03:23 PM   #30
Sama
Advanced Member
 
Sama's Avatar
 
Join Date: Apr 2006
Location: London
Posts: 2,154

Sama is on a distinguished road
Send a message via AIM to Sama Send a message via MSN to Sama Send a message via Yahoo to Sama Send a message via Skype™ to Sama
indeed. I saw this as a tip on the other side and was convinced it's the way to go for media playback
Sama is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Forum Jump
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT +1. The time now is 09:23 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Website Hosted by
www.wicked-websites.co.uk