Appendix B: Image Viewer ("Photo") Ecp Commands - Roku HD1000 Manual

External control protocol
Hide thumbs Also See for HD1000:
Table of Contents

Advertisement

© 2003 Roku, LLC

Appendix B: Image Viewer ("Photo") ECP commands

The image viewer appication ("Photo") supports a number of ECP commands. Some are
simple commands, and others take arguments.
Photo will accept ECP commands at any time. However, if you wish to manually "drive" the
application from ECP commands entirely, you may launch Photo with the -p command-line
switch. This puts Photo into "playlist" mode, where it does not open any initial windows, start
any threaded decoding or display any images:
$ photo –p &
In the present implementation, some ECP commands are not really appropriate in all modes,
and some may produce unwanted results.
Specifically, you can think of the app as having two "modes" – a slideshow mode and a
completely manual mode. (This is not strictly accurate, but it's the easiest way to explain the
behavior. The application is actually modeless, but there is state and some of the commands
modify state while some do not.)
In the slideshow mode, ECP commands which duplicate the functionality of the remote's
buttons are available (zoom, pan, next, prev, play, pause, info) and work as expected.
Slideshow mode is entered by issuing the SLIDESHOW command.
In the completely manual mode, the ECP program sending the commands is responsible
for sending the commands to pre-fetch images and display them (although straight display
commands do work, they're slower). In this mode, many of the "normal" features work as
expected (zoom, pan, info). However, because Photo was designed to work with a list of files
in a directory, some commands produce unusual results. Specifically, the NEXT_IMAGE and
PREV_IMAGE commands are relative to the current index in the directory initially set with
IMAGEDIR. The DISPLAY_IMAGE and PREFETCH_IMAGE commands do not update the position
in this list, even if the files in question are in the list. Also ROTATE_IMAGE will rotate the image
which is at the current list index – almost certainly not the image currently displayed. The
tables that follow break the ECP commands down into commands which work for slideshow,
commands that work in manual mode, and commands that are valid in both.
The completely manual mode is the default mode when Photo is launched with -p. It can
also be entered at any time during a slideshow by simply issuing a PAUSE command and then
issuing PREFETCH_IMAGE or DISPLAY_IMAGE commands.
Note that Photo's normal button and infrared handling is always active. If your application
desires to completely control Photo while locking out keys, it should open an always-on-top
window and SetFocus() on that window after launching Photo. This window should trap all keys.
8
Roku External Control Protocol for the HD1000

Advertisement

Table of Contents
loading

Table of Contents