org.hfbk.vid.AVStreamThread Class Reference

Inheritance diagram for org.hfbk.vid.AVStreamThread:

Inheritance graph
[legend]
Collaboration diagram for org.hfbk.vid.AVStreamThread:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AVStreamThread (String name, AVCodecContext ctx, int bufferlimit)

Protected Member Functions

void close ()

Protected Attributes

boolean running = true
boolean playing = true

Package Functions

void setPlaying (boolean playing)
void setRunning (boolean running)
void tick (int time)
void add (AVPacket p)
synchronized AVPacket poll ()
void free (AVPacket p)
synchronized AVPacket getFree ()
synchronized void flush ()

Package Attributes

boolean finished = false
AVCodecContext ctx
int bytes
int limit

Private Attributes

List< AVPacketqueue = new LinkedList<AVPacket>()
List< AVPacketfree = new LinkedList<AVPacket>()

Detailed Description

an abstract stream thread. it's queue is filled with encoded media data via add(AVPacket ..). after start()ing this thread, it decodes the media data to some recipient.

subclasses must implement the actual decoding and delivery.

Definition at line 22 of file AVStreamThread.java.


Constructor & Destructor Documentation

org.hfbk.vid.AVStreamThread.AVStreamThread ( String  name,
AVCodecContext  ctx,
int  bufferlimit 
)

create a stream player for a given codec context.

Parameters:
name Name of this Thread
ctx codec context to use
bufferlimit size of undecoded data buffer in bytes

Definition at line 47 of file AVStreamThread.java.

References net.sf.ffmpeg_java.AVCodecLibrary.AVCodecContext.codec_id, net.sf.ffmpeg_java.AVCodecLibrary.AVCodecContext.codec_name, and org.hfbk.vid.AVStreamThread.ctx.


Member Function Documentation

void org.hfbk.vid.AVStreamThread.setPlaying ( boolean  playing  )  [package]

set this streams playing state. can be toggled at any time.

Reimplemented in org.hfbk.vid.AVAudioThread.

Definition at line 70 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVStreamingThread.setPlaying().

Here is the caller graph for this function:

void org.hfbk.vid.AVStreamThread.setRunning ( boolean  running  )  [package]

set this streams running state. setting this to false will stop this streams operation and quit this thread.

Reimplemented in org.hfbk.vid.AVAudioThread.

Definition at line 73 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVStreamingThread.close().

Here is the caller graph for this function:

void org.hfbk.vid.AVStreamThread.close (  )  [protected]

Reimplemented in org.hfbk.vid.AVAudioThread, and org.hfbk.vid.AVVideoThread.

Definition at line 75 of file AVStreamThread.java.

References org.hfbk.vid.AVStreamThread.ctx, and org.hfbk.vid.AVStreamThread.flush().

Here is the call graph for this function:

void org.hfbk.vid.AVStreamThread.tick ( int  time  )  [package]

override this to receive clock ticks a tick is issued every time time changes, which depends on time granularity of the stream.

Definition at line 85 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVAudioThread.AVAudioThread(), and org.hfbk.vid.AVVideoThread.run().

Here is the caller graph for this function:

void org.hfbk.vid.AVStreamThread.add ( AVPacket  p  )  [package]

add a packet to the queue. propably blocks til enough space is free to enqueue this packet.

Definition at line 93 of file AVStreamThread.java.

References org.hfbk.vid.AVStreamThread.bytes, org.hfbk.vid.AVStreamThread.limit, org.hfbk.vid.AVStreamThread.queue, and net.sf.ffmpeg_java.AVFormatLibrary.AVPacket.size.

Referenced by org.hfbk.vid.AVStreamingThread.run().

Here is the caller graph for this function:

synchronized AVPacket org.hfbk.vid.AVStreamThread.poll (  )  [package]

pull out the oldest AVPacket from the queue the poller must destruct this AVPacket on its own!

Returns:
the oldest packet or null if queue is used up

Definition at line 109 of file AVStreamThread.java.

References org.hfbk.vid.AVStreamThread.bytes, and org.hfbk.vid.AVStreamThread.queue.

Referenced by org.hfbk.vid.AVAudioThread.AVAudioThread(), org.hfbk.vid.AVStreamThread.flush(), and org.hfbk.vid.AVVideoThread.run().

Here is the caller graph for this function:

void org.hfbk.vid.AVStreamThread.free ( AVPacket  p  )  [package]

give a used AVPacket back for recycling.

Definition at line 120 of file AVStreamThread.java.

References net.sf.ffmpeg_java.AVFormatLibrary.AVPacket.destruct, and org.hfbk.vid.AVStreamThread.free.

Referenced by org.hfbk.vid.AVImageLoader.AVImageLoader().

Here is the caller graph for this function:

synchronized AVPacket org.hfbk.vid.AVStreamThread.getFree (  )  [package]

get an new or recycled AVPacket ready to fill.

Definition at line 128 of file AVStreamThread.java.

References org.hfbk.vid.AVStreamThread.free.

Referenced by org.hfbk.vid.AVStreamingThread.run().

Here is the caller graph for this function:

synchronized void org.hfbk.vid.AVStreamThread.flush (  )  [package]

drains queue, freeing all remaining packets.

Definition at line 141 of file AVStreamThread.java.

References net.sf.ffmpeg_java.AVFormatLibrary.AVPacket.destruct, and org.hfbk.vid.AVStreamThread.poll().

Referenced by org.hfbk.vid.AVStreamThread.close().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

boolean org.hfbk.vid.AVStreamThread.running = true [protected]

if the stream is running, that is it is not closed.

Definition at line 25 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVAudioThread.AVAudioThread(), and org.hfbk.vid.AVVideoThread.run().

boolean org.hfbk.vid.AVStreamThread.playing = true [protected]

if the stream is actually playing back

Definition at line 27 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVVideoThread.run().

boolean org.hfbk.vid.AVStreamThread.finished = false [package]

streamer should set this flag if no more AVPackets will be added

Definition at line 31 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVVideoThread.run(), and org.hfbk.vid.AVStreamingThread.run().

AVCodecContext org.hfbk.vid.AVStreamThread.ctx [package]

Definition at line 33 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVAudioThread.AVAudioThread(), org.hfbk.vid.AVStreamThread.AVStreamThread(), org.hfbk.vid.AVVideoThread.AVVideoThread(), org.hfbk.vid.AVStreamThread.close(), org.hfbk.vid.AVVideoThread.convertToRGB(), org.hfbk.vid.AVAudioThread.decodeAudio(), and org.hfbk.vid.AVVideoThread.decodeVideo().

int org.hfbk.vid.AVStreamThread.bytes [package]

Definition at line 35 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVStreamThread.add(), org.hfbk.vid.AVStreamingThread.AVStreamingThread(), and org.hfbk.vid.AVStreamThread.poll().

int org.hfbk.vid.AVStreamThread.limit [package]

Definition at line 35 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVStreamThread.add().

List<AVPacket> org.hfbk.vid.AVStreamThread.queue = new LinkedList<AVPacket>() [private]

Definition at line 37 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVStreamThread.add(), and org.hfbk.vid.AVStreamThread.poll().

List<AVPacket> org.hfbk.vid.AVStreamThread.free = new LinkedList<AVPacket>() [private]

Definition at line 38 of file AVStreamThread.java.

Referenced by org.hfbk.vid.AVAudioThread.decodeAudio(), org.hfbk.vid.AVStreamThread.free(), org.hfbk.vid.AVStreamThread.getFree(), and org.hfbk.vid.AVVideoThread.run().


The documentation for this class was generated from the following file:
Generated on Tue Apr 7 17:58:01 2009 for visclient by  doxygen 1.5.1