11. Android Opencore Framework

26
Sasken Confidential © 2007 Sasken Communication Technologies Android Opencore Framework

Transcript of 11. Android Opencore Framework

Page 1: 11. Android Opencore Framework

Sasken Confidential © 2007 Sasken Communication Technologies

Android Opencore Framework

Page 2: 11. Android Opencore Framework

2© 2007 Sasken Communication Technologies

In this session

• Media Player Architecture Media player engine State machine Usage scenario command flow graphs

• Media Capture Architecture Media capture engine State machine Usage scenario command flow graphs

• PVMF Node Architecture Nodes - Media player & Media capture scenarios Node interface class MIO Node

Page 3: 11. Android Opencore Framework

3© 2007 Sasken Communication Technologies

NATIVE LIBRARIES NATIVE LIBRARIES

Data SinkData Source

APPLICATIONSAPPLICATIONS

APPLICATION FRAMEWORKAPPLICATION FRAMEWORK

LINUX KERNEL LINUX KERNEL

Media Player Application UIMedia Player Application UI

Media Player Engine WrapperMedia Player Engine Wrapper

Media Player Engine JNI

Player Engine Interfaces

PV Media Player Engine

PV OMX AV Codec Node

OMX Core

AV Media Output Node

Surface Flinger

Audio Flinger

Display Driver

Audio Driver

File Recognizer Streaming NodeFormat Parser

NodeOMX

Codec Componen

t

RTSP, RTP, RTCP payloads

Format Parsers

PV OSCL

Media player architecture

Page 4: 11. Android Opencore Framework

4© 2007 Sasken Communication Technologies

Media player architecture (Contd…)

• Media Player Engine JNI Exposes the media player APIs in the native layer to application layer

• Media Player Engine Establishes the data path for media decoding & rendering Maintains state machine Handles events and information generated during multimedia playback

operations.

• Data Source Implements file parser nodes, streaming node & file recognizer

• Data Sink Implements decoder nodes, Media output nodes Sends the decoded data to rendering devices Takes care of AV synchronization

Page 5: 11. Android Opencore Framework

5© 2007 Sasken Communication Technologies

Media player engine

Page 6: 11. Android Opencore Framework

6© 2007 Sasken Communication Technologies

Media player engine (Contd…)

• PVPlayerFactory handles the instantiation and destruction of

PVPlayerEngine

• PVPlayerInterface provides all player APIs

Playback specific APIs like Start, Stop, Seek

Query and retrieve any extension interfaces

• PVCommandStatusObserver, PVInformationalObserver, and

PVErrorEventObserver are the callback handlers

Notifies the application of any asynchronous command

completion,unsolicited error and informational events

Page 7: 11. Android Opencore Framework

7© 2007 Sasken Communication Technologies

Media player engine – State machine

Page 8: 11. Android Opencore Framework

8© 2007 Sasken Communication Technologies

Media player engine – Usage Scenarios

player_usage_scenarios

Page 9: 11. Android Opencore Framework

9© 2007 Sasken Communication Technologies

In this session

• Media Player Architecture Media player engine State machine Usage scenario command flow graphs

• Media Capture Architecture Media capture engine State machine Usage scenario command flow graphs

• PVMF Node Architecture Nodes - Media player & Media capture scenarios Node interface class MIO Node

Page 10: 11. Android Opencore Framework

10© 2007 Sasken Communication Technologies

NATIVE LIBRARIES NATIVE LIBRARIES

Data SourceData Sink

Media capture architectureAPPLICATIONSAPPLICATIONS

APPLICATION FRAMEWORKAPPLICATION FRAMEWORK

LINUX KERNEL LINUX KERNEL

Media Capture Application UIMedia Capture Application UI

Media Author Engine WrapperMedia Author Engine Wrapper

Media Author Engine JNI

Author Engine Interfaces

PV Media Author Engine

PV OMX AV Codec Node

OMX Core

AV Media Input Node

Camera Driver

Audio Driver

Format Composer

Node OMX Codec

Component

Format Composers

PV OSCL

Display Driver

Page 11: 11. Android Opencore Framework

11© 2007 Sasken Communication Technologies

Media capture architecture (Contd…)

• Media Author Engine JNI Exposes the media author APIs in the native layer to application layer

• Media Author Engine Establishes the data path for media capture & encoding Maintains state machine Handles events and information generated during multimedia record

operations

• Data Source Implements audio/video media input node Passes the captured raw media data to encoder nodes

• Data Sink Implements encoder nodes, format composer nodes Writes the encoded media data into file

Page 12: 11. Android Opencore Framework

12© 2007 Sasken Communication Technologies

Media capture engine

Page 13: 11. Android Opencore Framework

13© 2007 Sasken Communication Technologies

Media capture engine (Contd…)

• PVAuthorEngneFactory handles the instantiation and destruction of

PVAuthorEngine

• PVAuthorEngineInterface provides all engine APIs

Recording specific APIs like Record, Pause, Stop

Query and retrieve any extension interfaces

• PVCommandStatusObserver, PVInformationalObserver, and

PVErrorEventObserver are the callback handlers

Notifies the application of any asynchronous command completion,unsolicited

error and informational events

Page 14: 11. Android Opencore Framework

14© 2007 Sasken Communication Technologies

Media capture engine – State machine

Page 15: 11. Android Opencore Framework

15© 2007 Sasken Communication Technologies

Media capture engine – Usage Scenarios

capture_usage_scenarios

Page 16: 11. Android Opencore Framework

16© 2007 Sasken Communication Technologies

In this session

• Media Player Architecture Media player engine State machine Usage scenario command flow graphs

• Media Capture Architecture Media capture engine State machine Usage scenario command flow graphs

• PVMF Node Architecture Nodes - Media player & Media capture scenarios Node interface class MIO Node

Page 17: 11. Android Opencore Framework

17© 2007 Sasken Communication Technologies

PVMF Nodes – Media player scenario

NATIVE LIBRARIES NATIVE LIBRARIES

LINUX KERNEL LINUX KERNEL

PV Media Player Engine

PV OMX Audio Decode Node

MIO Audio Output Node

Surface FlingerAudio Flinger

Display DriverAudio Driver

File Recognizer

Format Parser Node

PV Player Data path

PV Player Node Registry

PV Player Recognizer

Registry

PVMF Recognizer Registry

Format Parser

PV OMX Video Decode Node

MIO Video Output Node

PV Node Command Status Observer

PV Node Error Event Observer

PV Node Info Event Observer

Page 18: 11. Android Opencore Framework

18© 2007 Sasken Communication Technologies

PVMF Nodes – Media player scenario – Media Data Flow

Page 19: 11. Android Opencore Framework

19© 2007 Sasken Communication Technologies

PVMF Nodes – Media capture scenario

NATIVE LIBRARIES NATIVE LIBRARIES

LINUX KERNEL LINUX KERNEL

PV Author Engine

PV OMX Audio Encode Node

MIO Audio input node

Android Camera Input

Android Audio Input

Camera DriverAudio Driver

Format Composer Node

PV Author Engine Node Utility

PV Player Node Registry

Format Composer

PV OMX Video Encode Node

MIO Video input node

PV Node Command Status Observer

PV Node Error Event Observer

PV Node Info Event Observer

PV Author Engine Node Utility Observer

Page 20: 11. Android Opencore Framework

20© 2007 Sasken Communication Technologies

PVMF Node Interface class -PVMFNodeInterface

Init() Initializes the node. The node should be ready to returns its capabilities once init

is complete.

GetCapability() Retrieves the capability of the node used

GetPorts () Returns all available ports for data flow

RequestPort () Returns an already created unused port or dynamically creates one

Prepare() The node should be able to start after this

Start() Starts servicing the connected ports

Pause() Pauses servicing all connected ports and retains the the unprocessed data

Stop() Stops servicing and discards unprocessed data

Reset() Resets the node

ReleasePort () Releases a connected port

CancelCommand() Cancels a particular command which is pending and yet to be processed

CancelAllCommands()Cancels all the commands to be processed and also aborts the command which is

currently processing

Page 21: 11. Android Opencore Framework

21© 2007 Sasken Communication Technologies

PVMF Node Interface – Observer Classes

• PVMFNodeCmdStatusObserver Notifies the status of issued command messages.

• PVMFNodeInfoEventObserver Notifies the informational messages to the client

• PVMFNodeErrorEventObserver Notifies the unsolicited error events back to the user

Page 22: 11. Android Opencore Framework

22© 2007 Sasken Communication Technologies

Media Input-Output Node – Playback scenario

Page 23: 11. Android Opencore Framework

23© 2007 Sasken Communication Technologies

Media Input-Output Node – Capture scenario

Page 24: 11. Android Opencore Framework

24© 2007 Sasken Communication Technologies

MIO Node Interface Classes

• PvmiMIOControl

Allows other PV modules to issue control commands to MIO

component

• PvmiCapabilityAndConfig

Facilitates capability and configuration exchange between other

modules and MIO

• PvmiMediaTransfer

Facilitate to exchange media data

Also allows in-data commands transaction e.g end of data

notification

• PvmiClockExtensionInterface

Allows other modules to provide a clock object to MIO component,

to enable media synchronization during rendering

Page 25: 11. Android Opencore Framework

25© 2007 Sasken Communication Technologies

MIO Node Sequence Diagram – Media player

mio_player

Page 26: 11. Android Opencore Framework

Sasken Confidential © 2007 Sasken Communication Technologies

Thank You