1
Design info for NetStream based media playing
3
===============================================================================
4
Data flow diagram for Gnash implementation of NetStream playback using FFMPEG
5
===============================================================================
7
Notation: process, [dataStore], <externalEvent>
9
[input] --> (2) parser --> [parsedBuffer]
11
+----------------------------+
14
(2) decoder <-+-> [videoQueue] --> (1) videoFrameUpdater --> [renderableFrame]
17
+------- | -----------------------------+ |
19
| (1) <seek> ---> [PlayHead] (1) renderer
24
+-> [audioQueue] ---> (3) soundPlayer -> [audioOut]
32
videoFrameUpdater : refreshVideoFrame
33
renderer : render_handler
34
soundPlayer : sound_streamer
35
seek : NetStream::seek
39
Datastores and protection
40
===========================
42
[input] : Accessible through LoadThread, providing thread-safe interfaces
43
[parsedBuffer] : Accessible through FLVParser, providing thread-safe interfaces
44
[videoQueue] : Accessible through multithread_queue, providing thread-safe interfaces
45
[audioQueue] : Accessible through multithread_queue, providing thread-safe interfaces
46
[renderableFrame] : Direct access, disciplined by image_mutex
47
[audioOut] : Audio output channel
48
[videoOut] : Video output channel
49
[PlayHead] : m_current_timestamp, m_go and m_pause. protection UNCLEAR !! refactoring planned
55
thread1 (main) : videoFrameUpdater, renderer, seek
56
thread2 (load/parse/decode) : parser, decoder
57
thread3 (playsound) : soundPlayer
59
===============================================================================
60
Data flow diagram for Gnash implementation of NetStream playback using GST
61
===============================================================================
64
+--> (2) [ParsedVideoBuffer]---+
66
(2) [input] --> parser --+ +---> (2) GST pipeline --> [renderableFrame] --> (1) renderer -> [videoOut]
68
+--> (2) [ParsedAudioBuffer]---+ |
69
+---> (2) soundPlayer --> [audioOut]
76
thread 2 : FLVParser, decoder, audio output
77
thread 1 : fetch videoframe