DTV Software Infrastructure Milton Chen Outline MPEG2 Transport

  • Slides: 17
Download presentation
DTV Software Infrastructure Milton Chen

DTV Software Infrastructure Milton Chen

Outline • • MPEG-2 Transport Stream Client Headend Examples

Outline • • MPEG-2 Transport Stream Client Headend Examples

MPEG-2 Transport Stream • Packet – 188 bytes (header plus payload) – 13 bit

MPEG-2 Transport Stream • Packet – 188 bytes (header plus payload) – 13 bit packet ID (pid) – 1 bit priority • Filename ends in. ts (our convention) • Which MPEG are you talking about ?

Client Stack DTV_MPEG API DTV_Object API DTV API application driver emulation demand receiver card

Client Stack DTV_MPEG API DTV_Object API DTV API application driver emulation demand receiver card disk operation system hardware

DTV API • int DTVInit( int channel, char *tsfname, bool loop, double bitrate );

DTV API • int DTVInit( int channel, char *tsfname, bool loop, double bitrate ); • int DTVClose();

DTV API (2) • class DTVConn { DTVConn( int pid, int raw ); int

DTV API (2) • class DTVConn { DTVConn( int pid, int raw ); int Retrieve. Buffer( DTVappbuf ** buf, int wait ); int Return. Buffer( DTVappbuf * buf ) int Flush(); }

DTV API (3) • typedef struct { int filledsize; unsigned char * data; }

DTV API (3) • typedef struct { int filledsize; unsigned char * data; } DTVappbuf;

DTV_MPEG API • Set a dozen global variables – playbacklevel, texture size, etc. •

DTV_MPEG API • Set a dozen global variables – playbacklevel, texture size, etc. • My. Dtv. Decoder() • unsigned char RGBarray[]

DTV_Object API • class Dtv. Obj. Stream { Dtv. Obj. Stream( int pid );

DTV_Object API • class Dtv. Obj. Stream { Dtv. Obj. Stream( int pid ); int Get. Obj( char * objname, int waittime, dtvobject * obj ); int Close. Obj( dtvobject *obj ); }

DTV_Object API (2) • typedef struct { char name[256]; FILE * data; } dtvobject;

DTV_Object API (2) • typedef struct { char name[256]; FILE * data; } dtvobject;

Client Environment 1. Win 95 2. Direct. X 5 3. ATI Rage Pro or

Client Environment 1. Win 95 2. Direct. X 5 3. ATI Rage Pro or Intel 740 Graphics Card • Live reception requires 1 • MPEG decoder requires 2, 3 • Link with multi-threaded library in VC++

Headend - Video 1. Camera -> 2. Video Capture Card -> 3. capture. exe

Headend - Video 1. Camera -> 2. Video Capture Card -> 3. capture. exe (. ppm ) -> 4. MPEG 2 Encoder (. m 2 v ) -> 5. pespacketizer. exe (. pes ) -> 6. dynamux. exe (. ts ) • Step 4, 5, and 6 are not real-time • tools to manipulate. m 2 v files (clip, cat, …)

Headend - Object • Object Parameter File #file obj. name insert time obj 1.

Headend - Object • Object Parameter File #file obj. name insert time obj 1. exe obj 1 0. 0 obj 2. zip obj 2 0. 5 obj 3. html obj 3 1. 0 • Run dynamux. exe magicid 1 2 3

Headend - Arbitrary data • Write it to a file • Run dynamux. exe

Headend - Arbitrary data • Write it to a file • Run dynamux. exe

Headend - Multiplexer • dynamux. exe • Convert video, audio, object, and arbitrary data

Headend - Multiplexer • dynamux. exe • Convert video, audio, object, and arbitrary data from different sources into one transport stream

Examples • My. Dtv. Receiver (DTV API) – count the number of bytes received

Examples • My. Dtv. Receiver (DTV API) – count the number of bytes received • My. Dtv. App (DTV_MPEG API) – one thread decode to shared memory – one thread display the decoded frames with Open. GL texture mapping • My. Dtv. Web (DTV_Object API) – receive one html file and launch netscape to display that file

Source Tree • C: Dtv_public – content – headend – receiver • • bin

Source Tree • C: Dtv_public – content – headend – receiver • • bin include lib sample