11. Android Opencore Framework
-
Upload
sree-lakshmi-c -
Category
Documents
-
view
275 -
download
1
Transcript of 11. Android Opencore Framework
Sasken Confidential © 2007 Sasken Communication Technologies
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
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
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
5© 2007 Sasken Communication Technologies
Media player engine
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
7© 2007 Sasken Communication Technologies
Media player engine – State machine
8© 2007 Sasken Communication Technologies
Media player engine – Usage Scenarios
player_usage_scenarios
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
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
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
12© 2007 Sasken Communication Technologies
Media capture engine
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
14© 2007 Sasken Communication Technologies
Media capture engine – State machine
15© 2007 Sasken Communication Technologies
Media capture engine – Usage Scenarios
capture_usage_scenarios
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
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
18© 2007 Sasken Communication Technologies
PVMF Nodes – Media player scenario – Media Data Flow
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
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
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
22© 2007 Sasken Communication Technologies
Media Input-Output Node – Playback scenario
23© 2007 Sasken Communication Technologies
Media Input-Output Node – Capture scenario
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
25© 2007 Sasken Communication Technologies
MIO Node Sequence Diagram – Media player
mio_player
Sasken Confidential © 2007 Sasken Communication Technologies
Thank You