fi.helsinki.cs.ohtu.mpeg2
Class VideoStream.VideoPacketizer

java.lang.Object
  extended by fi.helsinki.cs.ohtu.mpeg2.AVPacketizer
      extended by fi.helsinki.cs.ohtu.mpeg2.VideoStream.VideoPacketizer
Enclosing class:
VideoStream

private static class VideoStream.VideoPacketizer
extends AVPacketizer

Implements the packetizer for video streams.


Nested Class Summary
 
Nested classes/interfaces inherited from class fi.helsinki.cs.ohtu.mpeg2.AVPacketizer
AVPacketizer.State
 
Field Summary
private  boolean alignIFrames
           
 
Constructor Summary
VideoStream.VideoPacketizer(StreamID sid, int bufsize, boolean alignIFrames)
          Creates a new video packetizer.
 
Method Summary
protected  boolean needPacketAlign(AccessUnit au)
          Gets whether the given access unit needs to be packet aligned.
 
Methods inherited from class fi.helsinki.cs.ohtu.mpeg2.AVPacketizer
close, flush, getBufferSize, getDesiredBuffering, getNextDts, getPayloadPrefixLength, getState, getStreamId, isMuxable, packetize, setPacketizerListener, setTimebaseOffset, write, writePayloadPrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alignIFrames

private final boolean alignIFrames
Constructor Detail

VideoStream.VideoPacketizer

public VideoStream.VideoPacketizer(StreamID sid,
                                   int bufsize,
                                   boolean alignIFrames)
Creates a new video packetizer.

Parameters:
sid - the stream id for the packetized stream
bufsize - the size of the video decoder buffer, in bytes
alignIFrames - true if I-frames are to be started at packet boundaries
Method Detail

needPacketAlign

protected boolean needPacketAlign(AccessUnit au)
Description copied from class: AVPacketizer
Gets whether the given access unit needs to be packet aligned. If packet alignment is required, the access unit will be placed at the start of a packet.

This packetizer uses this method to get hints when to start a new packet. The default implementation returns true when an access unit is marked as discontinuous.

Overrides:
needPacketAlign in class AVPacketizer
Parameters:
au - the access unit for which packet alignment is checked
Returns:
true if packet aligned is needed