Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace keyboard handling with socket API #10

Closed
popcornmix opened this issue Jun 28, 2013 · 12 comments
Closed

Replace keyboard handling with socket API #10

popcornmix opened this issue Jun 28, 2013 · 12 comments

Comments

@popcornmix
Copy link
Owner

Make omxplayer controlled through a socket interface.
This may be add-hock (e.g. read packet/write response), or using a http library (for GET/POST type calls).

The current keyboard handling code will be split into a separate thread (or even process) and will send commands to the socket.
There can be alternative control processes, using, e.g:
libCEC
LIRC
iPhone app

The messages supported would include:
play
get status (returns elapsed time, duration etc)
current keyboard operations (e.g. pause/resume/seek/volume/audio channel)

There are currently some GUI front-ends to omxplayer that could benefit from this.
It would make supporting services like airplay more straightforward.

@trickkiste
Copy link

Where can I read up on how to use this?

@popcornmix
Copy link
Owner Author

It's a enhancement request, not an implemented feature. It's something that's planned.

@trickkiste
Copy link

Alright, thank you. Got that wrong.

@StevenHickson
Copy link

I currently just use a mkfifo and a read loop so that I have a fifo to control omxplayer but I can still use the keyboard to control it. I created it to mimic pianobar's use of a fifo and a keyboard at the same time.
You can find it here: https://github.com/StevenHickson/omxplayer_fifo

@trickkiste
Copy link

For me basically what I need an API for is to track the play status and
feed the player new files in time, if the playlist empties. Not sure if
playlists are supported yet.

Also I used to see omxplaxer stopping playback of livestreams for whatever
reason and I would want to react to such situations.

Am 30.06.2013 23:24 schrieb "Steven Hickson" notifications@github.com:

I currently just use a mkfifo and a read loop so that I have a fifo to
control omxplayer but I can still use the keyboard to control it. I created
it to mimic pianobar's use of a fifo and a keyboard at the same time.
You can find it here: https://github.com/StevenHickson/omxplayer_fifo


Reply to this email directly or view it on GitHub.

@dyorgio
Copy link

dyorgio commented Jul 18, 2013

I suggest to start with a console input support (standard in).
So, who needs socket can just implement a pipe between socket and process input stream,
adjusting protocol according with the your necessities.

I would like to see support for reposition window command (like reshape x,y,w,h). :)

@torarin
Copy link

torarin commented Aug 9, 2013

I don't know whether anyone is working on this, but one interesting possibility is using Thrift, which generates interfaces for several programming languages, as well as HTTP.

@popcornmix
Copy link
Owner Author

Yes, there is someone doing some work on this. He's not using thrift at the moment.

@popcornmix popcornmix mentioned this issue Aug 9, 2013
@fastcat
Copy link

fastcat commented Aug 9, 2013

Re: Thrift: If you think the build process is messy now, just wait and see :)

Also, most of thrift is not packaged for debian, and given raspbian is a major target for omxplayer...

@torarin
Copy link

torarin commented Aug 9, 2013

I made a simple Thrift server on the Pi a while ago, and I don't recall any serious troubles.

@fastcat
Copy link

fastcat commented Aug 9, 2013

In C++? Because only the Java and Python bindings for Thrift are packaged for Debian.

@torarin
Copy link

torarin commented Aug 9, 2013

In C++, I built Thrift from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants