com.smaxe.uv.client.video
Class FlvVideo

java.lang.Object
  extended by com.smaxe.uv.client.video.AbstractVideo
      extended by com.smaxe.uv.client.video.FlvVideo
All Implemented Interfaces:
IVideo

public final class FlvVideo
extends AbstractVideo

FlvVideo - IVideo implementation that saves incoming stream to the file.

Version:
1.5.12
Author:
Andrei Sochirca
See Also:
JUV RTMP Client

Constructor Summary
FlvVideo(IMediaStreamAcceptor acceptor)
          Constructor.
FlvVideo(IMediaStreamAcceptor acceptor, MediaStreamInfo info)
          Constructor.
FlvVideo(java.lang.String file, boolean sync)
          Constructor.
FlvVideo(java.lang.String file, int bufferSize)
          Constructor.
FlvVideo(java.lang.String file, int bufferSize, boolean sync)
          Constructor.
 
Method Summary
 void onAudioData(MediaData data)
          Notifies about available audio frame.
 void onCuePoint(java.lang.Object data)
          Notifies about stream's cue point.
 void onFlvData(MediaData data)
          Notifies about available flv-data.
 void onMetaData(java.lang.Object data)
          Notifies about stream's metadata.
 void onSetDataFrame(java.lang.String method, java.lang.Object data)
          Notifies about "@setDataFrame" frame.
 void onVideoData(MediaData data)
          Notifies about available video frame.
 void release()
          Releases the resources.
 
Methods inherited from class com.smaxe.uv.client.video.AbstractVideo
bufferLength, bytesLoaded, bytesTotal, clear, clearPlayBuffer, fps, liveDelay, reset, time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlvVideo

public FlvVideo(IMediaStreamAcceptor acceptor)
Constructor.

Parameters:
acceptor -

FlvVideo

public FlvVideo(IMediaStreamAcceptor acceptor,
                MediaStreamInfo info)
Constructor.

Parameters:
acceptor -
info -

FlvVideo

public FlvVideo(java.lang.String file,
                boolean sync)
         throws java.lang.Exception
Constructor.

Parameters:
file - destination flv file
sync -
Throws:
java.lang.Exception - if an exception occurred

FlvVideo

public FlvVideo(java.lang.String file,
                int bufferSize)
         throws java.lang.Exception
Constructor.

Parameters:
file - destination flv file
bufferSize - buffer size (set -1 to do not use buffer)
Throws:
java.lang.Exception - if an exception occurred

FlvVideo

public FlvVideo(java.lang.String file,
                int bufferSize,
                boolean sync)
         throws java.lang.Exception
Constructor.

Parameters:
file - destination flv file
bufferSize - buffer size (set -1 to do not use buffer)
sync -
Throws:
java.lang.Exception - if an exception occurred
Method Detail

release

public void release()
Releases the resources.


onAudioData

public void onAudioData(MediaData data)
Description copied from interface: IVideo
Notifies about available audio frame.

Note: This method should be really quick.

Specified by:
onAudioData in interface IVideo
Overrides:
onAudioData in class AbstractVideo
Parameters:
data - audio data frame

onVideoData

public void onVideoData(MediaData data)
Description copied from interface: IVideo
Notifies about available video frame.

Note: This method should be really quick.

Specified by:
onVideoData in interface IVideo
Overrides:
onVideoData in class AbstractVideo
Parameters:
data - video data frame

onFlvData

public void onFlvData(MediaData data)
Description copied from interface: IVideo
Notifies about available flv-data.

Note: This method should be really quick.

Specified by:
onFlvData in interface IVideo
Overrides:
onFlvData in class AbstractVideo

onCuePoint

public void onCuePoint(java.lang.Object data)
Description copied from interface: IVideo
Notifies about stream's cue point.

Note: This method should be really quick.

Specified by:
onCuePoint in interface IVideo
Overrides:
onCuePoint in class AbstractVideo
Parameters:
data - cue-point data

onMetaData

public void onMetaData(java.lang.Object data)
Description copied from interface: IVideo
Notifies about stream's metadata.

Note: This method should be really quick.

Specified by:
onMetaData in interface IVideo
Overrides:
onMetaData in class AbstractVideo
Parameters:
data - meta-data

onSetDataFrame

public void onSetDataFrame(java.lang.String method,
                           java.lang.Object data)
Description copied from interface: IVideo
Notifies about "@setDataFrame" frame.

Note: This method should be really quick.

Specified by:
onSetDataFrame in interface IVideo
Overrides:
onSetDataFrame in class AbstractVideo
Parameters:
method - method
data - meta-data