On Jan 30, 5:43 am, Andrew Leahy <
alf...@gmail.com> wrote:> G'day,
I've been mucking about with LiquidGalaxy ViewSync packets, as this>
year I want to spend some time on getting multiple rigs talking to
each> other.
I've been messing with viewsyncrelay, too, though with a different
goal in mind. Since our Liquid Galaxies run on Linux, and neither
Flash nor audio works in Google Earth on Linux, and further since I've
had a tour to build that had lots of video content, I've been
expanding on the idea of triggering mplayer when the ViewSync packets
indicate Earth has been navigated to a particular position. The code
is available in my liquid-galaxy repository clone [1], in
"
newviewsyncrelay.pl", with a sample config file in config.yml.
There have been a few overriding goals of this development.
Principally, of course, was getting viewsyncrelay to run actions
reliably when the master Earth instance navigated to the right place,
and to be able to configure those actions without writing lots of
code. Hence the config file. This has worked quite well in practice,
though some modification to mp-control and/or launchmplayer are
planned, to allow greater flexibility with things like mplayer's
window size. In the sample tour I've been working on, various
configurable "actions" start mplayer videos at the right place, and
other "exit_actions" forcibly close mplayer if the user leaves the
placemark in question before the video finishes. This could stand to
be better documented, but it's all a work in progress.
I was encouraged to make sure packets were relayed very quickly from
place to place, so the script is heavily multi-process. One process
accepts packets from one or more configurable sources, and then
distributes them to various process which are in charge of spawning
mplayer or other processes, or forwarding packets to other
destinations. RIght now it hasn't been tested with multicast or
broadcast addresses; that's a definite must for future development.
Another goal has been to allow transformation of viewsync packets
before they're relayed. This is only outlined in the code, but the
details need to be filled in. We've talked about making the code
source-agnostic, so it can relay ViewSync packets as well as, for
instance, mplayer's synchronization traffic. That's just a gleam in
our eyes right now, though.
In the meantime, however, this works quite well to trigger external
actions. It's helpful to realize that (at least in my experience)
navigating to a placemark at a particular latitude / longitude creates
viewsync packets that approximate, but don't necessarily exactly
duplicate, that latitude and longitude. So when defining circumstances
under which an action should fire, it's important to allow for some
fudging of the numbers. I hope to add syntactic sugar in the config
file to make that easy; in the meantime, users simply specify a range
of coordinates within which an action should be triggered. Users can
also indicate how they'd like the action re-triggered when subsequent
packets match the conditions. Conditions can depend on latitude and
longitude, as well as altitude, roll, tilt, and heading.
[1]
http://code.google.com/r/eggyknap-lgstuff/
--Josh
Tolle...@endpoint.com /
eggy...@gmail.com