Author Topic: howto keep a pipe active  (Read 948 times)

Esperanto

  • Guru
  • ****
  • Posts: 264
    • View Profile
howto keep a pipe active
« on: March 28, 2014, 07:40:16 pm »
Anyone can tell me how I can make sure a pipe stays on/active even after the normal devices stop using it? So some kind of parallel dummy device that uses the pipe and stays active until stopped manually.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3046
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: howto keep a pipe active
« Reply #1 on: March 29, 2014, 09:31:59 am »
what do you want to achieve?

Esperanto

  • Guru
  • ****
  • Posts: 264
    • View Profile
Re: howto keep a pipe active
« Reply #2 on: March 29, 2014, 04:33:34 pm »
I want my amp to stay on if I still use it (parallel to lmce via pulseaudio)

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3046
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: howto keep a pipe active
« Reply #3 on: March 29, 2014, 09:43:07 pm »
Remove the off command from the device template of your amp, or change the timeout of turning the device off. Or do the right thing and create a device for your application that is part of LinuxMCE.

Esperanto

  • Guru
  • ****
  • Posts: 264
    • View Profile
Re: howto keep a pipe active
« Reply #4 on: March 30, 2014, 10:52:38 am »
Or do the right thing and create a device for your application that is part of LinuxMCE.

Thats what I meant when I asked for 'some kind of parallel dummy device that uses the pipe and stays active until stopped manually. I have no idea how to do that or if that is at all possible. Any suggestions on how to realize that? (is there an example template I can use to base it on?) I _think_ it needs to create a media entry on the orbiter (to turn it on and off), be able to use (audio) pipes and be able to function parallel to the other activities.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3046
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: howto keep a pipe active
« Reply #5 on: March 30, 2014, 11:27:43 am »
I did not say dummy device, but a REAL device that controls whatever you want to run.

Esperanto

  • Guru
  • ****
  • Posts: 264
    • View Profile
Re: howto keep a pipe active
« Reply #6 on: March 30, 2014, 11:49:08 am »
There is not really anything that has to be controlled since it just using pulseaudio and not changing anything. However for that the Audio pipes need to stay active.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3046
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: howto keep a pipe active
« Reply #7 on: March 30, 2014, 12:20:08 pm »
It has to start something, and end something. So it needs to do stuff. Create such a device and everything else falls in place.

Esperanto

  • Guru
  • ****
  • Posts: 264
    • View Profile
Re: howto keep a pipe active
« Reply #8 on: March 30, 2014, 02:08:43 pm »
That's what I have been trying to say: it does not need to do anything (since all is configured by default at startup, that is the audio system is started) except making sure that the pipes are still in use.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3046
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: howto keep a pipe active
« Reply #9 on: March 30, 2014, 06:07:27 pm »
Do not take a shortcut. Create a new device <--- that means: Coding! that will call what ever you need to call that needs audio pipes set up. There is no shortcut to it.

Esperanto

  • Guru
  • ****
  • Posts: 264
    • View Profile
Re: howto keep a pipe active
« Reply #10 on: March 30, 2014, 09:37:30 pm »
I am not taking any shortcuts. I just want to know how to create the device I described. The device will do nothing (since there is nothing to be done for the device) except setting the pipes as used. And it needs to do that without interfering with the other media playing on the MD. This is no shortcut, this is all that I need. But I still have no idea if it is possible and/or where to start.....

pigdog

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1008
    • View Profile
Re: howto keep a pipe active
« Reply #11 on: March 30, 2014, 09:58:14 pm »
Hi,

If you are trying to respond to an event type of thing...

http://wiki.linuxmce.org/index.php/Respond_to_Events

...maybe that'll help.

Esperanto

  • Guru
  • ****
  • Posts: 264
    • View Profile
Re: howto keep a pipe active
« Reply #12 on: March 30, 2014, 10:18:17 pm »
It's not really events.

What I envision is:

- an off/on button in the media menu on the orbiter
- a entry in the A/V Equipment list so the pipes can be configured (that get set active/inactive by the on/off buttons)
- be able to use it parallel to/simultaneously with other media (so it should not block the MD)

Beside this there is _no_ functionality, so nothing that needs to be controlled or done.

Is this possible? and if so where to start?

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 890
  • Living with LMCE
    • View Profile
Re: howto keep a pipe active
« Reply #13 on: April 07, 2014, 08:02:40 am »
Hello,

I'm not sure, but quite some time ago I did few devices as GSD devices (you write few pieces of code in Ruby)...

You have Initialize, Release, and then IDLE method that gets called every few seconds... You can specify which commands you'll receive with your device, you can register to receive events, ....

Few links :
http://wiki.linuxmce.org/index.php/GSD

This is what I did (probably outdated info):
http://wiki.linuxmce.org/index.php/Marantz_SR5600#Pipes_can_be_connected_only_to_one_device

There is also some work done with external Perl script that connects to LMCE and performs as device...
http://wiki.linuxmce.org/index.php/Misterhouse (probably outdated too)...


HTH,
Regards,
Bulek.
Thanks in advance,

regards,

Bulek.