Upload
alastor-wu
View
48
Download
1
Tags:
Embed Size (px)
Citation preview
DECODE + PLAYBACK
4
Video queue
MediaDecoderStateMachine
Audio queue
Decoded data
Render &
Player
Command
DECODING FLOW
5
Media Decoder
Media Decoder
State Machine
Media Omx
Reader
Omx Decoder
Codec &
Codec Proxy
!
HW/SW Decoder
PlayRequestData
DecodeDataReadData
Read
BufferBufferFrame
Data
MODULES CONCEPT
6
Media Decoder
Media Decoder
State Machine
Media Omx
Reader
!
Omx Decoder
Codec &
Codec Proxy
HW/SW Decoder
Command Data control Manage decoders Decoding!
Communicate with
decoderGet
decoded data
Load
PLAY() CALL FLOW
7
MediaDecoderStateMachineMediaDecoder MediaOmxReader OmxDecoderMediaElement
Play()
RequestAudio/VideoData()EnsureAudio/VideoDecodeTaskQueued
DecodedAudio/VideoFrame()ReadAudio/Video()
OnAudio/VideoDecode() OnAudio/VideoNotDecode()
Resolve/Reject
Play()
MaybeFinishDecode
Decoding task
Decoding taskProm
ise
DispatchDecodeTasksIfNeeded()
StartDecoding()
RunStateMachine()MaybeStartPlayback()
AdvanceFrame()
Loop
ScheduleStateMachine()
Load()
PAUSE() CALL FLOW
8
MediaDecoderStateMachineMediaDecoderMediaElement
Pause()
Pause()
MediaOmxReader OmxDecoder
StopPlaying()
RunStateMachine()
DispatchDecodeTasksIfNeeded()
SetReaderIdle()
SetIdle()Pause()
ScheduleStateMachine()
Low Video Threshold
SKIP TO NEXT KEY FRAME
9
Timeline
Current timeLast decoded frame time
Next key frame
Drop frames!
AUDIO & VIDEO SYNCHRONIZATION
10
Video queue
Checking Time-step
(Audio/system clock)
Image container
Discarding !
Video data Video data
too early