Download presentation
Presentation is loading. Please wait.
1
Streaming Player Student: Idan Shreiber Supervisor: Erez Ben-Yaacov Presentation Date: 22.2.07 Spring 2006, Software Laboratory
2
What is Streaming? A technique for transferring data such that it can be processed as a steady and continuous stream. Streaming serves mostly for playing real-time audio/video.
3
Project Definition Create an audio streaming player for playing: Remote files/radio stations (from the internet).Remote files/radio stations (from the internet). Local files (the user machine).Local files (the user machine). Design the player to be adaptive to audio/video, other sorts of protocols and compression algorithms.
4
Streaming Protocols Standard and often used real-time streaming protocols: RTSP – Real-time Streaming Protocol.RTSP – Real-time Streaming Protocol. SC – Shout Cast.SC – Shout Cast.
5
RTSP – Real-time Streaming Protocol Establishes and controls either a single or several time synchronized streams of continuous media such as audio and video. RTSP is in no way tied to a transport level connection such as TCP.
6
SC – Shout Cast Delivers audio in a live situation (radio), or audio on-demand for archived files. Uses HTTP. Currently, dominates the network real time streaming.
7
First, type definition Packet – a bundle of data coming from the net. Usually contains a transport layer header (meta-data) which describe the data (data type, transport protocol, data size, etc.). Frame – Audio/video stream is divided into frames typically contain about 20ms of data. Frames also contain a header describing the frame (frame length, frame size, etc.), and are usually transferred compressed with all sorts of algorithms (e.g., mp3 for audio). Samples – Audio/video data samples that can be sent to the sound/graphic card to be played/displayed.
8
Suggested Solution Design DepacketizerConnectionDecoder Renderer Packets Buffer Samples Buffer Frames Buffer Network
9
System state machine controller create components pause play idle (stop) stop / pause play pause play stop end of stream / stop
10
Threads Collaboration
11
Main packages (MVC design pattern) DecoderDepacketizer Connection Renderer GUI ControllerUtility Define queue and other data bases. Runner run application, contains main which initializes GUI, controller and utility data bases.
12
use case 1: Tune to a shoutCast radio station Tune to a shoutCast radio station
14
use case 2: Play a local file
16
Error Handling Connection failure:Connection failure: System will display an appropriate message. System will display an appropriate message. Unknown protocol/media type/etc.:Unknown protocol/media type/etc.: System will display and appropriate message. System will display and appropriate message. Buffer synchronization:Buffer synchronization: No simultaneous read/write to queues by different threads. No simultaneous read/write to queues by different threads. Buffer underflow:Buffer underflow: Pause player until buffer is ready, display a message. Pause player until buffer is ready, display a message.
17
Thank you
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.