de.humatic.dsj.sink
Class TSNetworkSink

java.lang.Object
  extended by de.humatic.dsj.sink.JSink
      extended by de.humatic.dsj.sink.TSNetworkSink
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class TSNetworkSink
extends JSink

Sink to stream data in MPEG2 transportstream format. Depending on the originating filtergraph this may require transcoding remultiplexing or eventually no such action at all. In case the source is not already in transportstream format you need to make sure that not only the encoder filters are installed on the host system, but also an appropriate multiplexer, which also needs to be put into transportstream mode.


Field Summary
 
Fields inherited from class de.humatic.dsj.sink.JSink
AV_SYNC_IN, BUFFER_OVERFLOW, CLOSED, CONNECT, CONNECTED, CONNECTION_TIMEOUT, DISPLAY_LOCAL, DUMP, ERROR, HTTP_AUDIO, LOCAL, MAX_BT_DROP, MAX_BT_WARN, MAX_DURATION, MIN_BT, MJPG, MKV, NO_AUDIO, NO_VIDEO, OFFSET_TIME_IN, OFFSET_TIME_OUT, OPT_PKT_SIZE, PIPE_SIZE, pipeSize, PREVIEW, RTMP, RTP, SHOW_DLG_SAVE, SHOW_ENC_DLG, SOCKET_ERROR, SOCKET_SBS, socketSendBufferSize, STARVING, TSNET, UNCONNECTED
 
Constructor Summary
TSNetworkSink(DSFiltergraph graph, java.lang.String baseIP, DSFilterInfo videoEncoder, DSFilterInfo audioEncoder, DSFilterInfo multiplexer, int flags)
          Creates a transport stream sink involving reencoding of data by the given encoder filters.
TSNetworkSink(DSFiltergraph graph, java.lang.String baseIP, DSFilterInfo multiplexer, int flags)
          Creates a "transmuxing" sink to stream out data from MPEG2 sources like files or MPEG CaptureDevices where no transcoding is required or desired.
TSNetworkSink(DSFiltergraph graph, java.lang.String baseIP, MPEGProgram[] prgs, int flags)
          Creates a sink for filtergraphs whose data already is in MPEG2 transportstream format.
 
Method Summary
 void propertyChange(java.beans.PropertyChangeEvent pe)
           
 void reconfigure(java.lang.String baseIP, MPEGProgram[] prgs, int flags)
          Reconfigures the network part of the sink, which may become necessary when for example a BDA graph has switched to a different broadcast than the original.
 void sampleReceived(SampleBuffer buffer)
          Called from SampleAccessFilters used by this sink.
 void stop(boolean terminate)
          Stops the sink and eventually shuts down all network resources.
 
Methods inherited from class de.humatic.dsj.sink.JSink
close, create, getID, getOutputBufferSize, getOutputMediaType, setNetworkInterface, setSinkOption, setSocketOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TSNetworkSink

public TSNetworkSink(DSFiltergraph graph,
                     java.lang.String baseIP,
                     MPEGProgram[] prgs,
                     int flags)
              throws java.lang.Exception
Creates a sink for filtergraphs whose data already is in MPEG2 transportstream format. This is used internally with the broadcast methods in DSBDAGraph and TSFile & NetworkSource.

Throws:
java.lang.Exception

TSNetworkSink

public TSNetworkSink(DSFiltergraph graph,
                     java.lang.String baseIP,
                     DSFilterInfo videoEncoder,
                     DSFilterInfo audioEncoder,
                     DSFilterInfo multiplexer,
                     int flags)
              throws java.lang.Exception
Creates a transport stream sink involving reencoding of data by the given encoder filters.

Throws:
java.lang.Exception

TSNetworkSink

public TSNetworkSink(DSFiltergraph graph,
                     java.lang.String baseIP,
                     DSFilterInfo multiplexer,
                     int flags)
              throws java.lang.Exception
Creates a "transmuxing" sink to stream out data from MPEG2 sources like files or MPEG CaptureDevices where no transcoding is required or desired.

Throws:
java.lang.Exception
Method Detail

reconfigure

public void reconfigure(java.lang.String baseIP,
                        MPEGProgram[] prgs,
                        int flags)
                 throws java.lang.Exception
Reconfigures the network part of the sink, which may become necessary when for example a BDA graph has switched to a different broadcast than the original.

Throws:
java.lang.Exception

stop

public void stop(boolean terminate)
Stops the sink and eventually shuts down all network resources.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pe)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class JSink

sampleReceived

public void sampleReceived(SampleBuffer buffer)
Description copied from class: JSink
Called from SampleAccessFilters used by this sink.

Overrides:
sampleReceived in class JSink