liiir1985 7f62dcda9f | ||
---|---|---|
.. | ||
DEPS | ||
README.md | ||
osp_demo.cc |
README.md
Presentation API Demo
This directory contains a demo of a Presentation API controller and receiver. The demo supports flinging a URL to start a presentation and stopping the presentation.
Command line options
The same executable is run for the controller and receiver; only the command line options affect the behavior. The command line options are:
$ osp_demo [-v] [friendly_name]
-v
enables verbose logging.- Specifying
friendly_name
puts the demo in receiver mode and sets its name tofriendly_name
. Currently,friendly_name
won't appear in any of the controller-side output related to this screen though. If no friendly name is given, the demo runs as a controller.
Log output
Because the demo acts like a shell and accepts commands on stdin
, the logging
output is redirected to a separate file so it doesn't flood the same display.
You have to create these files on your machine before running the demo. For the
controller, this file should be named _cntl_fifo
and for the receiver, it
should be named _recv_fifo
. The simplest way to do this is so you can see the
output while the demo is running is to make these named pipes like so:
$ mkfifo _cntl_fifo _recv_fifo
Then cat
them in separate terminals while the demo is running.
Listener commands
avail <url>
: Begin listening for receivers that support the presentation ofurl
.start <url> <service_id>
: Start a presentation ofurl
on the receiver specified by the IDservice_id
.service_id
will be printed in the output log onceavail
has been run. The demo only supports starting one presentation at a time.msg <string>
: Sends a string message on the open presentation connection.close
: Close the open presentation connection without terminating the presentation.reconnect
: Reconnect the previously-connected presentation connection. This allows using themsg
command again.term
: Terminate the previously started presentation.
Publisher commands
avail
: Toggle whether the receiver is publishing itself as an available screen. The receiver starts in the publishing state.close
: Close the open presentation connection without terminating the presentation.msg <string>
: Sends a string message on the open presentation connection.term
: Terminate the running presentation.