Table of Contents
Introduction
Making application
Running application
Command Usage
References
Introduction
The fapex_av_demo_fs is a simple audio/video demonstrator application which shows the general use of the FAPex drivers to start and stop video and audio, service scan, etc.
This is located in the "FAPexU_V01L00R00/sample_application/fapex_av_demo_fs" subfolder.
This is an application that added functions for TS file playback .
Making application
This application is compiled with the following fapex_subsystems libraries.
basically libraries |
|
libfapex_abst | libfontserver | libosdhandler | libval |
|
|
selectable libraries |
|
In case of using Bitmap font for Cursor Plane display ( The optional setting of Makefile: OSD_USE_FREETYPE=0 ) |
libfontserver_engine_fbf | libfbf |
|
In case of using TrueType font for Cursor Plane display ( The optional setting of Makefile: OSD_USE_FREETYPE=1 ) |
libfontserver_engine_ft | libftf | libfreetype2 |
|
In case of rounding Cursor Plane displayed corners ( The optional setting of Makefile: OSD_DRAW_ROUND_CORNERS=1 ) |
|
|
|
If you set the ENABLE_GUI_WINDOW
of Makefile to 1, you can execute this application with GTK+2 window.
However, you should install libraries related GTK+2 function. When GTK+2 over DirectFB is installed, the following library linkage will be necessary.
This application is compiled with shared libraries by make command in default setting.
If you select the compiling with static libraries, you should change setting of Makefile to "LIBTYPE=static"
.
This application is builded with the following commands after above necessary setting.
$ cd FAPexU_V01L00R00/sample_application/fapex_av_demo_fs
$ make
Running application
After kernel booting, this application is executed by the following commands.
Example: in case of using USB device ( /dev/sda1 ) |
# ./insmodall.sh
# insmod usbcore
# insmod musb_hdrc
# insmod usb-storage
# mount /dev/sda1 /mnt/usb
# ./fapex_av_demo_fs
In addition, you can set arguments as follows.
|
./fapex_av_demo_fs [fileName startOffsetPos(optional)] [-s hd_mode sd_mode(optional)]
The arguments of "fileName" and "startOffsetPos" are the same meaning as 'play' command arguments (it is explained in next Command Usage section).
The "-s" option set the video output mode.
The "hd_mode" is a value according to VAL_HdEncoderT . This defalut value is VAL_1920x1080x50I(5).
The "sd_mode" is a value according to VAL_SdEncoderT . This defalut value is VAL_SD_PAL(4). |
# ./fapex_av_demo_fs /mnt/usb/sample.ts
# ./fapex_av_demo_fs /mnt/usb/sample.ts 10000
Command Usage
Within the AV demo itself, the following commands may be used:
Basically Operation Command
- dir <pathName>
This command prints files within pathName directory.
- down
This command jumps to the previous service in the service list. If it reaches the first service of the service list and this command is used again, it will jump to the last service in the list.
This command will only work if the service list contains valid entries.
This command will wakeup the system if in standby and starts the previously watched channel again.
- exit
This command will exit the application.
- list
This command prints the current service list.
- live
This command stops PVR playback and changes to Live mode.
- p
This command pauses/unpauses PVR playback.
- play <fileName> <startOffsetPos (optional)> or
- play
This command starts playback of TS file fileName.
Once this command succeeds, playback of same file is available without arguments (fileName and startOffsetPos are regarded as registered value).
Examples:
play /mnt/usb/sample.ts |
// playback from start of the file "/mnt/usb/sample.ts" |
play /mnt/usb/sample.ts 10000 |
// playback after setting file position to 10000 bytes from start of the file "/mnt/usb/sample.ts" |
- scan
This command will scan for valid services and fill the service list with entries. Once the scan is completed, the service list is displayed and the first service is started.
- standby
This command will put the system in standby and wake it up again. Upon wakeup, the previously watched channel is started again.
- start <audioPID> <videoPID> <teletextPID (optional)> or
- start <service list index>
This command starts a service with the provided PIDs for audio, video and Teletext. The teletextPID is optional and does not need to be provided. In case only audio or video shall be started, one may specify 0 as a PID for the unwanted feature.
This command will wakeup the system if in standby and switch to the given channel/PIDs.
Examples:
start 102 101 | // audio and video |
start 102 101 104 | // audio, video and teletext |
start 0 101 | // video only |
In case a service list is generated, the index which can be found at the start of each line may be used to jump to a certain service.
Example:
start 3 | // starts service listed in row 4 of the service list. |
- stop
This command stops any currently running service.
- sys <command>
This command executes the shell command.
- up
This command jumps to the next service in the service list. If it reaches the last service of the service list and this command is used again, it will jump to the first service in the list.
This command will only work if the service list contains valid entries.
This command will wakeup the system if in standby and starts the previously watched channel again.
HDMI-CEC Operation Command
If the compiling option of "USE_HDMICEC"
within Makefile is defined, the following HDMI-CEC test commands may be used.
- allocatelogicaladdr
This command allocates Logical Address for CEC.
- cec <opcode> <send_flag> <rec_flag> <InitiatorLogicalAddr> <FollowerLogicalAddr>
This command communicates CEC message for test.
The opcode value is set by hexadecimal number. Please do not put 0x on the numerical value.
The range of each send_flag and rec_flag is 0..1.
The range of each InitiatorLogicalAddr and FollowerLogicalAddr is 0..15.
Supported Message:
Message Feature | opecode |
One Touch Play |
<Active Source> |
<Image View On> |
<Text View On> |
Routing Control |
<Active Source> |
<Inactive Source> |
<Request Active Source> |
<Routing Change> |
<Routing Information> |
<Set Stream Path> |
Standby |
<Standby> |
System Information |
<CEC Version> |
<Get CEC Version> |
<Give Physical Address> |
<Get Menu Language> |
<Polling Message> |
<Report Physical Address> |
<Set Menu Language> |
|
Message Feature | opecode |
Tuner Control |
<Give Tuner Device Status> |
<Select Analogue Service> |
<Select Digital Service> |
<Tuner Device Status> |
<Tuner Step Decrement> |
<Tuner Step Increment> |
OSD Display |
<Set OSD String> |
Device Menu Control |
<Menu Request> |
<Menu Status> |
<User Control Pressed> |
<User Control Released> |
Remote Control Passthrough |
<User Control Pressed> |
<User Control Released> |
Power Status |
<Give Device Power Status> |
<Report Power Status> |
General Protocol |
<Feature Abort> |
<Abort> Message |
|
For more information please refer "Supplement 1 : CEC 15 Message Descriptions" (1).
- cecgetlogicaladdr <My device logical address>
This command gets Logical Address for CEC.
- cecgetmsg
This command gets CEC message.
- cecrecmsg
This command receives CEC Message.
- cecrecstatus
This command checks CEC receiving status.
- cecsendstatus
This command checks CEC sending status.
- cecsetlogicaladdr <My device logical address>
This command set Logical Address for CEC.
- cecsetparam <opcode> <cecparameter>
This command set the parameter of CEC message.
The opcode and the cecparameter value are set by hexadecimal number. Please do not put 0x on the numerical value.
The cecparameter is delimited and input it in space in every one byte when its value become one byte or more.
Example:
cecsetparam 82 10 00 | // the operation code is 0x82, and the parameter (Physical Address) is 0x1000. |
For more information please refer "Supplement 1 : CEC 17 Operand Descriptions" (1).
- checkhpd
This command checks HPD signal.
- devinsaddr <count>
This command starts Device Instration And Addressing for CEC.
The count specifies Device Installation and Addressing processing frequency. The range of count is 1..255.
- onetouchplay
This command starts One Touch Play.
After sending <Image View On> message, this sends <Active Source> message.
- readedid
This command reads EDID.
- sendosdstring
This command sends <Set OSD String> message.
References
Please refer the following documentation about HDMI-CEC.
- High-Definition Multimedia Interface Specification Version 1.3a
- High-Definition Multimedia Interface Compliance Test Specification Version 1.3b1