Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
Gaya, mono and interprocess stuff - how does it work?
03-17-2010, 07:42 PM
Post: #1
Gaya, mono and interprocess stuff - how does it work?
I am currently trying to fathom out how the various bits and pieces that make up the PCH's user interface and video player services (i.e. gaya and mono) interact and how they are controlled - or control each other.

For example, while playing an AVI movie, both gaya and mono are on the process list, and mono has a command line option referring to /tmp/playlist.htm (which is not HTML, by the way) so it looks like gaya creates a playlist file, then launches mono, waits for it to exit, and then resumes. For a moment I thought that gaya exits after creating a script file in /tmp (there was a /tmp/runmono with two commands; one to run mono and one to restart gaya) but that apparently belongs to something else.

While mono is playing, how does it receive commands from lirc (e.g. pause, stop or volume button operations)? Does it listen on a socket for lirc data? I cannot find a lirc.conf anywhere - am I overlooking it?

All info (or suggestions on where to find any) would be appreciated!

// FvW
Find all posts by this user
03-17-2010, 07:46 PM
Post: #2
RE: Gaya, mono and interprocess stuff - how does it work?
There is no lirc.conf.

echo the commands over telnet:
http://www.networkedmediatank.com/wiki/i...ing_Telnet

Kill gaya on occassion:
http://www.networkedmediatank.com/wiki/i...media_file

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
[+] 1 user says Thank You to dc11ab for this post
03-18-2010, 12:17 PM
Post: #3
RE: Gaya, mono and interprocess stuff - how does it work?
(03-17-2010 07:46 PM)dc11ab Wrote:  There is no lirc.conf.

OK.

(03-17-2010 07:46 PM)dc11ab Wrote:  echo the commands over telnet:
http://www.networkedmediatank.com/wiki/i...ing_Telnet
Kill gaya on occassion:
http://www.networkedmediatank.com/wiki/i...media_file
Yes, that part I've got, thanks. :-) What I'm trying to figure out is not how to do it, but how the NMT itself works - in other words how mono, gaya and lirc intercommunicate during plain-vanilla, out-of-the-box use of the NMT as a media player.

Is there anyone who had ported strace to the A110 or would be willing to do that for me? (It would have to be linked to a static binary, of course.)

// FvW
Find all posts by this user
03-18-2010, 12:59 PM
Post: #4
RE: Gaya, mono and interprocess stuff - how does it work?
I know lundman compiled strace for the A/C200, but I'm unsure where it is available for 100-series.

Try asking lundman for the 100-version if you need that one. But perhaps it's already part of the CSI Utils package?

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
03-18-2010, 01:29 PM
Post: #5
RE: Gaya, mono and interprocess stuff - how does it work?
(03-18-2010 12:59 PM)dc11ab Wrote:  Try asking lundman for the 100-version if you need that one. But perhaps it's already part of the CSI Utils package?
It's not included in Utils, AFAIK (which makes sense, since that is mostly a set of prerequisites for apps, while strace is an OS analysis tool).

I'll ask Lundman. Thanks!

// FvW
Find all posts by this user
03-18-2010, 02:45 PM
Post: #6
RE: Gaya, mono and interprocess stuff - how does it work?
You are right, I just checked the contents of the 100-utils pack and it's not there, but there is nice stuff like hdparm.
And here some more:
http://www.networkedmediatank.com/wiki/i..._Utilities

But a board search I found that lundman already has compiled it for the A100/110:
http://www.networkedmediatank.com/showth...#pid154006

http://lundman.net/ftp/librarcy/strace

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
[+] 1 user says Thank You to dc11ab for this post
03-18-2010, 05:39 PM (This post was last modified: 03-18-2010 05:56 PM by frankvw.)
Post: #7
RE: Gaya, mono and interprocess stuff - how does it work?
Another question: while mono or amp_test are playing media, does gaya (which remains in core) continue to listen to lirc for commands entered via the IR remote control, to pass them to the players via a CGI executable or some other means, or do these player applications take over the input channel from lirc and process them directly? The speed with which they respond to the IR remote control suggests the latter, but I can't quite figure it out...

(I told you I'd be bugging you before this was over!) :-)

// FvW
(03-18-2010 02:45 PM)dc11ab Wrote:  http://lundman.net/ftp/librarcy/strace

Your board search skills are obviously better than mine, because I hadn't found it... but a quick E-mail to Lundman resulted in an even quicker response from him, with the same URL. (Kudos to that guy!)

Thanks to both of you!!

// FvW
Find all posts by this user
03-19-2010, 12:32 AM
Post: #8
RE: Gaya, mono and interprocess stuff - how does it work?
Sorry, but this question is beyond my knowledge.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
03-19-2010, 01:16 AM (This post was last modified: 03-19-2010 01:17 AM by emveepee.)
Post: #9
RE: Gaya, mono and interprocess stuff - how does it work?
What are you trying to accomplish frankvw? strace will show memory mapped application that is not very hackable, maybe if you explained your application I can offer suggestions.

gaya is a browser using Syabas markup language that is well explained here in probalby 1000's of post and mono and amp_test are independent players that really don't need gaya at all, although that is their UI front-end The lircd source is on the (incomplete) Syabas page for open source pieces of the system, and if monitor /tmp/irkey you will see key presses. amp_test uses DirectFB

Martin
Find all posts by this user
[+] 1 user says Thank You to emveepee for this post
03-19-2010, 01:24 AM
Post: #10
RE: Gaya, mono and interprocess stuff - how does it work?
gaya writes the playlist file (its just a regular text file), then effectively does a system("mono $args") to run mono. When mono process exists, SIGCHLD is sent, and gaya wakes up again.

lircd opens the remote control /dev/ entry (which is only allowed one reader) and opens a Unix domain socket (/tmp/ somewhere). Both gaya and mono open this socket in read mode for remote control instructions. gaya obviously ignores the remote control while mono runs, I don't know by which method, but I don't feel that's is so important.

gaya also opens a few /tmp/* sockets, for incoming commands. you can echo characters to it, to make gaya do various tasks (Source refresh etc etc). All their inter-process communication is either done with small files in /tmp/, or unix domain socket files in /tmp/

It becomes immediately apparent that gaya has to release the video hardware, to run mono, which has to initialise it. play video, then release to exit, and gaya has to re-initialise it again. Clearly it would have been much better to compile "mono" as a library and included it in gaya.

Anything in particular you were curious about?
Visit this user's website Find all posts by this user
[+] 1 user says Thank You to lundman for this post
03-19-2010, 03:05 PM
Post: #11
RE: Gaya, mono and interprocess stuff - how does it work?
(03-19-2010 01:24 AM)lundman Wrote:  It becomes immediately apparent that gaya has to release the video hardware, to run mono, which has to initialise it. play video, then release to exit, and gaya has to re-initialise it again. Clearly it would have been much better to compile "mono" as a library and included it in gaya.

That's my biggest rub with Syabas. They don't have to do that. The video output block doesn't need to be reinitialized between programs. That is what is causing the HDMI resync and monitor A/V dropouts between gaya/mono. There are few technical problems that you have to overcome, but they are pretty minor.

No other commercial HDMI product on the market drops sync except when changing video mode, hotplug, or receiver on/off detect (usually caused by soft standby or changing inputs on the display).
Find all posts by this user
03-20-2010, 07:28 PM (This post was last modified: 03-20-2010 07:41 PM by frankvw.)
Post: #12
RE: Gaya, mono and interprocess stuff - how does it work?
(03-19-2010 01:16 AM)emveepee Wrote:  What are you trying to accomplish frankvw?
I'm mainly trying to satisfy my curiosity, and to deal with the simple fact that I feel uncomfortable working with (or making apps for) a platform that I don't sufficiently understand. I'm pretty new to this thing and so the first thing I'm trying to do is fathom out what goes on inside the box: which processes do what, why and when, and especially how.

(03-19-2010 01:16 AM)emveepee Wrote:  gaya is a browser using Syabas markup language that is well explained here in probalby 1000's of post and mono and amp_test are independent players that really don't need gaya at all, although that is their UI front-end The lircd source is on the (incomplete) Syabas page for open source pieces of the system, and if monitor /tmp/irkey you will see key presses. amp_test uses DirectFB
I'm in the process of slowly finding this out. :-) In a few days I've managed to learn quite a bit about the NMT (with a lot of help from forum users here!)

// Frank
(03-19-2010 01:24 AM)lundman Wrote:  gaya obviously ignores the remote control while mono runs, I don't know by which method, but I don't feel that's is so important.
In itself it is not important indeed - all I wanted to know is how it works (and now I do) so I can tinker with it and be reasonably sure I won't break it by not knowing what I'm doing. :-)

(03-19-2010 01:24 AM)lundman Wrote:  Anything in particular you were curious about?
All of this. So you answered all my questions in one fell swoop. Thank you, sir!

// Frank
(03-19-2010 03:05 PM)alanh Wrote:  That's my biggest rub with Syabas. They don't have to do that. The video output block doesn't need to be reinitialized between programs. That is what is causing the HDMI resync and monitor A/V dropouts between gaya/mono. There are few technical problems that you have to overcome, but they are pretty minor.
Something else that doesn't make much sense to me (and that I find inelegant) is that the tank has two different video players (amp_test for DVD, mono for everything else) that behave differently. The left and right arrow buttons will skip back and forth while playing an AVI file (mono) but not while playing a DVD file. Surely this could have been integrated better?

// Frank
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  MN-200 work with B-110? dwalterm 2 1,818 03-30-2012 05:31 PM
Last Post: dwalterm
  jukebox to work with sickbeard artwork phenz 4 1,941 12-07-2011 12:26 AM
Last Post: phenz
Brick Building Freenas box to work with PCH and My Lil Movie Jukebox Casuall 10 6,871 07-17-2011 04:23 AM
Last Post: Casuall
  how to start mono from php harrykausl 5 2,981 07-10-2011 10:01 PM
Last Post: harrykausl
  Help required to fix Extended gaya Extended 0.4 AquaFire 2 2,635 03-17-2011 07:46 AM
Last Post: accident
  TankTV (AppleTV Clone & Gaya replacement) vinayp 69 28,224 01-08-2011 05:48 PM
Last Post: AlramEast
  Using NetworkMounter, now shares don't work pbusardo 3 2,076 09-20-2010 04:06 PM
Last Post: kryzchek
  Does FTP resume work? cagg 1 2,373 05-26-2010 02:52 AM
Last Post: michaelg04
  unix/c gurus - Starting a process from gaya without it hanging lordy 5 2,921 05-04-2010 06:43 PM
Last Post: lordy
  gaya / directfb / video memory thica 5 4,006 04-20-2010 07:28 AM
Last Post: thica

Forum Jump: