hal testapp and file open and close, and ES and PES dump. HAL doc position. hal compile
2015-01-23 21:07
253 查看
1, st testapp:
hal/3pp/stapi-sdk-7109$ vim README.testapp
Running the ST-SDK testapp on a vip19xx box
==========================================
** Add kreatv-tool-sttestapp to your bootimage configuration
or build the sttestapp bootimage.
** Add kreatv-tool-sttestapp to your build configuration file
** Build your rootdisk/bootdisk and place it in $NFS (location of your choice)
** Edit your $NFS/etc/inittab, make sure start_platform and start_halserver
are disabled. (not needed if you build the sttestapp bootimage)
** Running the testapp
Boot the box, telnet into it (or use the serial console) and do:
/ # start_sttestapp.sh
List available commands:
ST710X > HELP
to play a MPEG1/2 video elementary_stream (for H264, use decoder 1 instead)
ST710X > VID_INJSTART 0 "susie.m1v"
ST710X > VID_ENABLE 0
to play a MPEG1/2 audio elementary_stream (for H264, use decoder 1 instead)
ST710X > AUD_INJSTART 0 "2097_audio.es"
ST710X >AUD_ENABLE 0
start_sttestapp.sh
skill_hero.es:
start play audio es file:
#AUD_INJSTART 0 "skill_hero.es" 0 A_HEAAC 44100 A_ES
unmute device 0:
#AUD_ENABLE 0
stop play device 0;
#AUD_INJSTOP 0
skill_hero.pes
start play audio pes file:
#AUD_INJSTART 0 "skill_hero.pes" 0 A_HEAAC 44100 A_PES
unmute device 0:
#AUD_ENABLE 0
stop play device 0;
#AUD_INJSTOP 0
skill_hero_adts.es:
AUD_INJSTART 0 "skill_hero_adts.es" 0 A_HEAAC 44100 A_ES
skill_hero_adts.es
skill_hero.pes
start play audio pes file:
#AUD_INJSTART 0 "skill_hero.pes" 0 A_HEAAC 44100 A_PES
unmute device 0:
#AUD_ENABLE 0
stop play device 0;
#AUD_INJSTOP 0
it is also possible to play a transport stream from nfs disc:
The following will give help list for 68
ST7105 > PLAY_START 0 "kms2171_kms2111_toy1.ts" 68 P_MAIN
--> Invalid Pid Type ,should be
[P_MP1V,P_MP2V,P_MP4V,P_H264,P_MPEG4P2,P_VC1,P_MP1A,P_MP1A_AUX,P_MP1A_AD,
P_MP2A,P_MP2A_AUX,P_MP2A_AD,P_MP4A,P_MP4A_AUX,P_AC3,P_AC3_AUX,P_AC3_AD,
P_AAC,P_AAC_AUX,P_HEAAC,P_HEAAC_AUX,P_HEAAC_AD,P_WMA,P_WMA_AUX,
P_DDPLUS,P_DDPLUS_AUX,P_DDPLUS_AD,P_DTS,P_DTS_AUX,P_DTS_AD,P_LPCM,
P_LPCM_AUX,P_DDPULSE,P_DDPULSE_AUX,P_DDPULSE_AD,P_DRA,P_DRA_AUX,P_DRA_AD,
P_AUD_ID,P_TTXT,P_SUBT,P_PCR,P_PID,P_AVS,P_MMV,P_MMA,P_END]
play xxx.tx video.
ST710X > PLAY_START 0 "kms2171_kms2111_toy1.ts" P_MP2V +68
in the above case the video is MPEG2 and the video PID is 666. It will play
to the end. If unsure about the syntax of the PID-type, replace P_MP2V
with an arbitrary junk string. The test app will then list the available types.
to stop playback:
ST710X > PLAY_STOP
2, file open and close
definde file pointer:
FILE * faudiop = NULL;
open file:
if (faudiop == NULL) {
if((faudiop=fopen("/2097_audio.es","a+"))==NULL)
{
Debug->Error("%s:%d:%s, open file error leosu \n",__FILE__, __LINE__,__FUNCTION__ );
}
}
write file:
if (faudiop != NULL) {
size_t writesize = fwrite (HalBuffer + BufferOffset + 14 + adtsHeadLength , 1 , frameSize , faudiop );
if(14 + adtsHeadLength+frameSize !=- writesize)
{
Debug->Error("%s:%d:%s, write wrong count leosu \n",__FILE__, __LINE__,__FUNCTION__ );
}
}
close files:
if (faudiop != NULL) {
fclose(faudiop);
}
3, PES dump.
dump audio for mp4 file:
extension/streamer/payload-sink-elements/TAudioPayloadSinkElement.cpp
4, HAL doc position:
audio related:
hal/3pp/stapi-sdk-7109/st40/vip19x3/ST7105/stapisdk/apilib/src/staudlx/docs/common$
hal/3pp/stapi-sdk-7109/st40/vip19x3/ST7105/stapisdk/apilib/src/staudlx$
hal/3pp/stapi-sdk-7109/st40/vip19x3/ST7105/stapisdk/apilib/src/stvid$
5, hal compile
5.1 edit soruce file:
leosu@leosu:/mnt/sda3/dev_iptv/DEV_youtube_4_4/hal/3pp/stapi-sdk-7109/st40/vip19x3/ST7105/stapisdk/apilib/src/staudlx/src/parser$ vim es_aac_parser.c
ST_ErrorCode_t ES_AAC_Parser_Init(ComParserInit_t *Init_p, ParserHandle_t *const handle )
{ printk("ES_AAC_Parser_Init \n");
5.2 touch for compile
leosu@leosu:/mnt/sda3/dev_iptv/DEV_youtube_4_4/hal/3pp/stapi-sdk-7109/st40/vip19x3/ST7105/stapisdk$ touch bin/setenv.sh
5.3 make 3pp hal
leosu@leosu:/mnt/sda3/dev_iptv/DEV_youtube_4_4/hal/3pp/stapi-sdk-7109$ make local_all
5.4 copy ko file into box rootdisk:
leosu@leosu:/mnt/sda3/dev_iptv/DEV_youtube_4_4/hal/3pp/stapi-sdk-7109$ sudo cp st40/vip19x3/ST7105/dist/modules/stapi_all.ko /opt/nfs/rootdisk_19x3/rootdisk/lib/modules/stapi/stapi_all.ko
相关文章推荐
- SecureCRT experienced a fatal error and must close.A crash dump file has been created i
- read file in kernel (flip_open and flip_close)
- AudioToolbox之AudioFile.h(三)open and close audio files
- secrurecrt experenced a fatal error and must close.A crash dump file has been created in
- Cannot open precompiled header file:'Debug/test.pch' No such f...
- 信息系统开发平台OpenExpressApp:OpenTest 之 运行环境准备
- fix errors 1088: “Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied” and 1334: “Exception: System.IO.FileLoadException”
- between..and-->open bound or close bound?
- Open File and Open Path
- Oracle dump datafile and IOT Secondary Index
- CWinApp::OnFileOpen
- 信息系统开发平台OpenExpressApp:OpenTest 之 运行环境准备
- How to Open "File And Replace" Dialog Box ?
- TestOpenFileU
- Transfer file over FTP (close ui and get return code)
- 信息系统开发平台OpenExpressApp:【OpenTest】 之 框架实现说明
- 信息系统开发平台OpenExpressApp:【OpenTest】 之 语法及其使用介绍
- Detect if the UnitTest is running and fix the AppDomain.BaseDirectory in VS 2008
- Can not open file with "ios_base::in | ios_base::app"
- SIT to test the file and folder permission