DOC

mplayer_01_acwd_sdk

By Glen Simmons,2014-06-11 12:57
16 views 0
mplayer_01_acwd_sdk

     SK885X Multimedia Platform SDK ACWD Mplayer

    SK885X SDK

    [ACWD MPLAYER]

    Version 1.5

    2009-09-18 - 1 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    Table of content - 2 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    1. How to build ACWD Mplayer

    Typically, developer can find ACWD Mplayer in following directory

    “sk2851v2/ release/ mplayer_acwd”

    Its directory structure:

    And developer can build Mplayer in following steps:

    Step 1 : edit c code to fit own request

    Step 2 : perform “build_mpiayer.sh” to build mplayer bin file

    2. How to use ACWD Mplayer

    2.1 GPL version Mplayer (ACWD_Mplayer)

    The basic concept of the GPL Fix Solution is shown on the picture on the right.

    The GPL Fix Solution concept

     - 3 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    The ACW Framework allows not only to achieve the goals has been set (with known

    limitations) but also gives some benefits:

    ? allows better platform abstraction which in its turn allows easier upgrade of a user

    application

    ? transforms one API to another which allows using, for example, different API's on

    the client side and sole on the host's

    ? packs codecs into repositories which could help to compare codec's versions

    ACW Framework

    Simplified structure of the ACW Framework is shown on the right: As may be seen,

    there are only three components forms a framework's environment:

    ? libacw is the client wrapper substitution of the well-known open-source library libavcodec

    ? acwd is a host wrapper for the ARC's A/V codecs

    ? libacomm provides communication between client and host wrappers

    In other words, libacw and acwd perform ARC Codec's API to libavcodec transformation whereas libacomm helps to abstract from communication mechanism's implementation. Although, in spite of the same libacomm is used on both sides (the

    same sources), the objects normally differ because of different library configurations,

    compiler or linker flags, etc. This is shown on the picture as difference in names

    libacomm against the libacomm'.

白話文,

    前端 Mplayer : demuxer , parser , A/V sync , user space display control

    後端 ACWD(ARC Codec's Wrapping) : codecs , video out , audio out

     - 4 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    2.2 Example:

    ?分為兩隻bin執行檔(mplayer & acwd)

    ?mplayer 已修改成,會自動叫起後端的acwd

    ?編譯好的mplayer acwd 執行bin,建議放於同一目錄,例如: SKY8855 firmware

    code ,會將mplayer & acwd 擺於 ./sky/

     - 5 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    2.3 Sample code to call ACWD

    int MPL_Decode()

    //call mplayer

     This->pid_mpl = fork();

     switch(This->pid_mpl)

     {

     case -1:

     ERROR("Fork MPlayer failed!");

     break;

     case 0:

     //child process

     system("killall acwd");

     execv(MPLAYER_PNAME, argv);

     _EXIT;

     default: //call mplayer

     This->pid_mpl = fork();

     switch(This->pid_mpl)

     {

     case -1:

     ERROR("Fork MPlayer failed!");

     break;

     case 0:

     //child process

     system("killall acwd");

     execv(MPLAYER_PNAME, argv);

     _EXIT;

     default:

     }

    int MPL_Stop()

     if (This->playmode == PLAYMODE_URL)

     {

     system("killall acwd");

     system("killall mplayer");

     sync();

     }

     else

     {

     //kill(This->pid_mpl, SIGKILL);

     kill(This->pid_mpl, SIGTERM);

     } - 6 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    2.4 Message handshake with kernel and UI

     To Do

     - 7 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    3. ACWD Mplayer usage

    3.1. Program: mplayer

    3.2. Option

    -quiet : not print status line

    -really-quiet : hide most of messages

    -nosound : disable audio

    -novideo : disable video, only work for some format

    -demuxer : set demuxer type if demuxer type is available

    -preview : enable thumbnail mode

    -sx : set width of thumbnail

    -sy : set height of thumbnail

    -acache : reserve audio uncached memory when doing slideshow

    -arcdemo : get command from IR (with UI)

    -mono : downmix to output mono audio

    -toff : video thumbnail offset index

    (Value: 0 ~ 8192, real offset = value x 8192,

     zero offset means the beginning of frame buffer)

    -playvideo : If playing video or getting video thumbnail without using

    parser in advance, add this option to let mplayer check support or not by itself.

    -dlna : for DLNA streaming

    -setdest : enable advertisement mode for SK8855

    -dx : set the start of horizontal position

    -dy : set the start of vertical position

    -retry : set the retry times while connecting to network server (default: 10).

     If you want to reduce the waiting time before playback, you can try to

     decrease the retry times.

    -ss : Seek to given time position (for SK8855)

    -endtime : Set end time of playback (for SK8855)

     - 8 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    3.3. Example:

    A. Play video

    /sky/mplayer -really-quiet /mnt/sdmmc/1.avi

    B. Play audio

    /sky/mplayer -really-quiet novideo /mnt/sdmmc/1.mp3

    C. Play audio when slide show

    /sky/mplayer -really-quiet novideo acache /mnt/sdmmc/1.mp3

    D. Play internet radio

    /sky/mplayer -really-quiet novideo acache playlist [URL]

    E. DLNA streaming audio

    /sky/mplayer -really-quiet novideo acache -dlna [URL]

    F. Get thumbnail

    /sky/mplayer -really-quiet nosound preview sx 100 sy 100 /mnt/sdmmc/1.avi

    If demuxer type is available by MediaParser():

    /sky/mplayer -really-quiet nosound preview sx 100 sy 100 demuxer 3 /mnt/sdmmc/1.avi

    For SK8855, the default thumbnail will be stored in last 512 KB of frame buffer.

     If you want to change the position of thumbnail, you can use “-toff” option:

     For example:

     /sky/mplayer -really-quiet nosound preview sx 100 sy 100

    toff 100 demuxer 3 /mnt/sdmmc/1.avi

    You should set suitable position (toff x 8192) with enough space

    (sx x sy x 4) to avoid unexpected problem.

- 9 -

    Version: 1.0

    Skymedi Corporation

     SK885X Multimedia Platform SDK ACWD Mplayer

    G. Advertisement Mode: (for SK8855)

    /sky/mplayer -really-quiet -setdest -dx 100 -dy 100 /mnt/sdmmc/1.avi

H. Seek to given time position (for SK8855)

    For example: Seeks to 30 seconds.

    /sky/mplayer -really-quiet ss 30 /mnt/sdmmc/1.avi

I. Set end time of playback (for SK8855)

    For example: Plays to 80 seconds.

    /sky/mplayer -really-quiet endtime 80 /mnt/sdmmc/1.avi

- 10 -

    Version: 1.0

    Skymedi Corporation

Report this document

For any questions or suggestions please email
cust-service@docsford.com