de.humatic.dsj
Class DSBDAGraph

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by de.humatic.dsj.DSFiltergraph
              extended by de.humatic.dsj.DSBDAGraph
All Implemented Interfaces:
MPEGSource, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class DSBDAGraph
extends DSFiltergraph
implements MPEGSource

DSBDAGraph provides a basic implementation of Microsoft's Broadcast Driver Architecture for digital TV. It will only work with digital tuners that come with a BDA compliant driver (there are a lot of digital TV boxes with proprietary drivers, read the specs closely!).
The class works with MPEG2 based DVB-T and DVB-S only. MPEG4 based DVB-T2 and DVB-S2 are not supported at the time being, allthough in dsj 0_8_62 some untested options have been added to pass MPEG4 mediatypes to decoders (see setMPEGType).
Support for ATSC and DVB-C has been added in pure theory, it may well not work at all. We appreciate any feedback you may be able to give.
Technically spoken all digital TV standards supported by the BDA architecture use MPEG2 transport streams for data delivery. A system that wants to decode and display that data must be equipped with the appropriate decoders. As with all dsj classes, that work on MPEG2, you may specify decoders by either using the extended constructor or entering preferred decoders into the dsj.xml setup file.
This class does not provide file capture functionality. To record digital TV data use the DSStreamBufferGraph class with a BDASource.
DSBDAGraph reads and stores information about broadcast frequencies and scanned channels in an xml file pointed to by the "channellist" entry in the DSBDAGraph node of the dsj.xml setup file. Before you can watch TV you need to do a channel scan. This can take some time (and - depending on signal strength, antenna quality and position etc. - eventually needs to be performed a couple of times before all broadcasts have been found). The dsj demo folder holds both a list of European DVB frequencies (Channels.xml) as well as an example of a channellist after scanning has been performed (Berlin.xml). Transponder lists for different regions of the world and different satellites can be downloaded from web services like king of sat and others.

Digital TV and all the services involved (radio, data broadcast, return channels etc.) are a vast field of mixed standards, concurring technical approaches and political will throughout the world. On top of that, technical development has already started to overcome the state most of the fragile standardization is built upon.
As an entry point to further investigation, point your browser to:
http://en.wikipedia.org/wiki/DVB
http://en.wikipedia.org/wiki/ATSC

Windows 7 note: There are a lot of - still only very briefly documented - api changes in the native BDA arcitecture. resulting in this class being partly broken at the time being (dsj 0_8_62 is using the new Generic Network Provider, but more reconstruction will be needed).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class de.humatic.dsj.DSFiltergraph
DSFiltergraph.DSAudioStream
 
Nested classes/interfaces inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int ATSC
          BDA network types
static int AUTO_PARSE
           
static int BDA_M4T_CUSTOM
          BDA MPEG types
static int BDA_M4T_NTSC
          BDA MPEG types
static int BDA_M4T_NTSC_NARROW
          BDA MPEG types
static int BDA_M4T_PAL
          BDA MPEG types
static int BDA_M4T_PAL_NARROW
          BDA MPEG types
static int BDA_MOD_1024QAM
          Modulation types
static int BDA_MOD_112QAM
          Modulation types
static int BDA_MOD_128QAM
          Modulation types
static int BDA_MOD_160QAM
          Modulation types
static int BDA_MOD_16QAM
          Modulation types
static int BDA_MOD_16VSB
          Modulation types
static int BDA_MOD_192QAM
          Modulation types
static int BDA_MOD_224QAM
          Modulation types
static int BDA_MOD_256QAM
          Modulation types
static int BDA_MOD_320QAM
          Modulation types
static int BDA_MOD_32QAM
          Modulation types
static int BDA_MOD_384QAM
          Modulation types
static int BDA_MOD_448QAM
          Modulation types
static int BDA_MOD_512QAM
          Modulation types
static int BDA_MOD_640QAM
          Modulation types
static int BDA_MOD_64QAM
          Modulation types
static int BDA_MOD_768QAM
          Modulation types
static int BDA_MOD_80QAM
          Modulation types
static int BDA_MOD_896QAM
          Modulation types
static int BDA_MOD_8VSB
          Modulation types
static int BDA_MOD_96QAM
          Modulation types
static int BDA_MOD_ANALOG_AMPLITUDE
          Modulation types
static int BDA_MOD_ANALOG_FREQUENCY
          Modulation types
static int BDA_MOD_BPSK
          Modulation types
static int BDA_MOD_MAX
          Modulation types
static int BDA_MOD_NOT_DEFINED
          Modulation types
static int BDA_MOD_NOT_SET
          Modulation types
static int BDA_MOD_OQPSK
          Modulation types
static int BDA_MOD_QPSK
          Modulation types
static int BDA_MT_CUSTOM
          BDA MPEG types
static int BDA_MT_NTSC
          BDA MPEG types
static int BDA_MT_NTSC_NARROW
          BDA MPEG types
static int BDA_MT_PAL
          BDA MPEG types
static int BDA_MT_PAL_NARROW
          BDA MPEG types
static int DVBC
          BDA network types
static int DVBS
          BDA network types
static int DVBT
          BDA network types
 
Fields inherited from class de.humatic.dsj.DSFiltergraph
ACTIVATING, ANAMORPHIC, ASYNC_BUFFER_GET, ASYNC_BUFFER_REQ, AUDIO_BUFFER_REQUEST, BDA, BDA_PRG_CHANGED, BDA_SCAN_PROGRESS, BDA_SCANNED_FREQ, BDA_SIG_REC, BUFFER_COMPLETE, BUFFERING, CALLER, CAP_STATE_CHANGED, CAPTURE, CLOSED, CLOSING, COMP_AUDIO_BUFFER_REQ, COMP_BUFFER_FILLED, COMP_VIDEO_BUFFER_REQ, D3D9, DD7, DECKLINK, DELIVER_AUDIO, DES_ERROR, DONE, DV, DV_STATE_CHANGED, DVD, DVD_FORMAT_CHANGED, DVD_MENU_ENABLED, E_CANT_PUMP_AUDIO, E_INIT_HEADLESS, EDITABLE, ENTER_FS, EPG, EVR, EXIT_FS, EXPORT_DONE, EXPORT_FINISHING, EXPORT_PROGRESS, EXPORT_STARTED, EXT_API_EVENT, FILTER_CHANGED, FORMAT_CHANGED, FRAME_CALLBACK, FRAME_LOCKED, FRAME_NOTIFY, GD, GE_DEVICE_CONNECTED, GE_DEVICE_LOST, GE_REF_REC_STOPPED, GRAPH, GRAPH_CHANGED, GRAPH_ERROR, GRAPH_EVENT, HDV, HDV_STATE_CHANGED, HEADLESS, INDEXER_DONE, INDEXER_STARTED, INIT_MUTED, INIT_PAUSED, INITIALIZED, IP_READY, J2D, JAVA_AUTODRAW, JAVA_POLL, JAVA_POLL_RGB, JAVASOUND, KEY_EVENT, KF_NOTIFY, LOCK_BUFFER, LOOP, MGD, MOUSE_ENABLED, MOUSE_EVENT, MOVIE, NATIVE_FORCE_GDI, NIO_UPDATE, NO_AMW, NO_SYNC, NULL, ONESHOT, OVERLAY, OVERLAY_BUFFER_REQUEST, PLAYLIST_PARSED, PREVIEW, RENDER_NATIVE, RESTART_REQ, RGB32, RTCP_EVENT, RTMP_EVENT, RTMP_SO_CHANGED, RTMP_STATE_CHANGED, SAMPLE_BUFFER_FILLED, SAVE_DONE, SAVE_STARTED, SBE, SBE_REC_STATE_CHANGED, SERVICE_ERROR, SERVICE_EVENT, SINK_ERROR, SINK_STATE_CHANGED, SIZE_CHANGED, SOURCE_ERROR, SOURCE_STATE_CHANGED, SOURCE_STATE_NOTIFY, SOURCE_USER_DATA, STILL_IMG_RECEIVED, STREAM_SEEK, SUBCLASS_EVENT, SWING, SYNC_BUFFER_REQ, TABLE_RECEIVED, TIME_FORMAT_CHANGED, TRANS_IN_PLACE, TRANSPORT, TS_BUFFER_FILLED, type, VIDEO_BUFFER_REQUEST, VMR_EMBED, VMR7, VMR9, VPJ, YUV, YUV_ORG
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface de.humatic.dsj.util.MPEGSource
NO_AUDIO, RESOLVE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DSBDAGraph(int DVBType, int flags, DSFilterInfo mpegDecoder, DSFilterInfo audioDecoder, java.beans.PropertyChangeListener pcl)
          Sets up a TV Graph using the specified MPEG decoders.
DSBDAGraph(int DVBType, int flags, java.beans.PropertyChangeListener pcl)
          Sets up a TV graph, leaving decoder selection to DirectShow.
 
Method Summary
 void broadcast(java.lang.String baseIP, MPEGProgram[] prgs, int flags)
          Relays the transport stream received from the BDAReceiver to the network for IPBroadcasting.
 void dumpSITables(int PID, int flags)
          Creates an additional output on the demultiplexer and passes tables received on the given PID to java through PropertyChange events of type TABLE_RECEIVED.
 boolean dumpTransportStream(java.lang.String fileName, boolean preview)
          Writes the BDA receiver's original transport stream to the specified file.
 void enableEPG(boolean enabled)
          Enables or disables the transfer of EPG (electronic program guide) data to java.
static DSFilterInfo[] getBDADevices()
           
 BDAChannelInfo[] getChannelsFromXML(int net)
          Reads previously scanned valid program information from the dsj.xml file
 BDAChannelInfo getCurrentChannel()
           
 EPGData[] getCurrentChannelEPG()
          Returns now/next EPGData for currently tuned channel.
 EPGData[] getEPG()
          Returns now/next EPGData for all channels on the currently active transponder.
 int getNetworkType()
           
 int getPMT_PID()
          Returns the PMT PID of the currently playing program.
 int[] getProgramPIDs()
          Returns the elementary stream PIDs of the currently playing program.
 MPEGProgram[] getPrograms()
          Returns an array of all programs seen in a stream.
 int[] getStreamTypes()
          Returns the elementary streamtypes of the currently playing program.
 DSSampleBuffer interceptTransportStream(int flags)
          Intercepts dataflow in the native filtergraph before the MPEG Demultiplexer.
 void interruptScan()
          breaks an ongoing channel scan
 void loadLastChannel()
           
 BDAChannelInfo[] performChannelScan(int timeout)
          Scans frequencies for valid program streams.
 void persistToXML(int net, BDAChannelInfo[] bdaCh)
          Writes the information in the channel info array to the specified network node of the XML channellist file, that the DSBDAGraph node of the dsj.xml file points to.
 void saveLastChannel(BDAChannelInfo info)
           
 BDAChannelInfo scanChannel(int[] params, int timeout)
           
 BDAChannelInfo scanChannel(int frequency, int specific_1, int specific_2, int timeout)
          Scans the given frequency for valid program streams and returns the first one found.
 BDAChannelInfo[] scanTransponder(int[] params, int timeout)
           
 BDAChannelInfo[] scanTransponder(int frequency, int specific_1, int specific_2, int timeout)
          Scans the given frequency for valid program streams.
 boolean setChannel(BDAChannelInfo info)
          Tunes the receiver component of the graph to the given channel.
static void setMPEGType(int type, int w, int h)
          Instructs the dll to present a more specific mediatype on the demultiplexer's video output.
static void setSatellite(java.lang.String name, int lowOscillator, int highOscillator)
           
 
Methods inherited from class de.humatic.dsj.DSFiltergraph
addColorSpaceConverter, addFilterToGraph, addNotify, addPropertyChangeListener, asComponent, connectDump, connectSink, createDSFiltergraph, dispose, dumpGraph, findFilterByName, findRenderer, flipImage, getActive, getAspectLocked, getAspectRatio, getAudioProperties, getAudioStream, getBitDepth, getData, getDataSize, getDisplaySize, getDuration, getEffectiveFrameRate, getFrameRate, getFullScreenWindow, getID, getImage, getInfo, getLoop, getMediaDimension, getMinimumSize, getOutFlags, getPan, getPreferredSize, getRate, getRendererControls, getTime, getVolume, getYUVType, goFullScreen, graphChanged, hasMediaOfType, insertFilter, insertOverlayFilter, insertSampleAccessFilter, insertTransInPlaceFilter, isFullScreen, isSubGraph, leaveFullScreen, listFilters, lockAspectRatio, paint, pause, play, queryCapability, redraw, register, reloadFilter, removeFilter, removeNotify, removePropertyChangeListener, removeSink, setAudioRenderer, setAviExportOptions, setBounds, setClockSource, setEvent, setLoop, setPan, setPreferredSize, setRate, setTimeValue, setVolume, step, stop, tearDown, update
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DVBT

public static final int DVBT
BDA network types

See Also:
Constant Field Values

DVBS

public static final int DVBS
BDA network types

See Also:
Constant Field Values

DVBC

public static final int DVBC
BDA network types

See Also:
Constant Field Values

ATSC

public static final int ATSC
BDA network types

See Also:
Constant Field Values

BDA_MT_PAL

public static final int BDA_MT_PAL
BDA MPEG types

See Also:
Constant Field Values

BDA_MT_NTSC

public static final int BDA_MT_NTSC
BDA MPEG types

See Also:
Constant Field Values

BDA_MT_PAL_NARROW

public static final int BDA_MT_PAL_NARROW
BDA MPEG types

See Also:
Constant Field Values

BDA_MT_NTSC_NARROW

public static final int BDA_MT_NTSC_NARROW
BDA MPEG types

See Also:
Constant Field Values

BDA_MT_CUSTOM

public static final int BDA_MT_CUSTOM
BDA MPEG types

See Also:
Constant Field Values

BDA_M4T_PAL

public static final int BDA_M4T_PAL
BDA MPEG types

See Also:
Constant Field Values

BDA_M4T_NTSC

public static final int BDA_M4T_NTSC
BDA MPEG types

See Also:
Constant Field Values

BDA_M4T_PAL_NARROW

public static final int BDA_M4T_PAL_NARROW
BDA MPEG types

See Also:
Constant Field Values

BDA_M4T_NTSC_NARROW

public static final int BDA_M4T_NTSC_NARROW
BDA MPEG types

See Also:
Constant Field Values

BDA_M4T_CUSTOM

public static final int BDA_M4T_CUSTOM
BDA MPEG types

See Also:
Constant Field Values

BDA_MOD_NOT_SET

public static final int BDA_MOD_NOT_SET
Modulation types

See Also:
Constant Field Values

BDA_MOD_NOT_DEFINED

public static final int BDA_MOD_NOT_DEFINED
Modulation types

See Also:
Constant Field Values

BDA_MOD_16QAM

public static final int BDA_MOD_16QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_32QAM

public static final int BDA_MOD_32QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_64QAM

public static final int BDA_MOD_64QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_80QAM

public static final int BDA_MOD_80QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_96QAM

public static final int BDA_MOD_96QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_112QAM

public static final int BDA_MOD_112QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_128QAM

public static final int BDA_MOD_128QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_160QAM

public static final int BDA_MOD_160QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_192QAM

public static final int BDA_MOD_192QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_224QAM

public static final int BDA_MOD_224QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_256QAM

public static final int BDA_MOD_256QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_320QAM

public static final int BDA_MOD_320QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_384QAM

public static final int BDA_MOD_384QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_448QAM

public static final int BDA_MOD_448QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_512QAM

public static final int BDA_MOD_512QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_640QAM

public static final int BDA_MOD_640QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_768QAM

public static final int BDA_MOD_768QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_896QAM

public static final int BDA_MOD_896QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_1024QAM

public static final int BDA_MOD_1024QAM
Modulation types

See Also:
Constant Field Values

BDA_MOD_QPSK

public static final int BDA_MOD_QPSK
Modulation types

See Also:
Constant Field Values

BDA_MOD_BPSK

public static final int BDA_MOD_BPSK
Modulation types

See Also:
Constant Field Values

BDA_MOD_OQPSK

public static final int BDA_MOD_OQPSK
Modulation types

See Also:
Constant Field Values

BDA_MOD_8VSB

public static final int BDA_MOD_8VSB
Modulation types

See Also:
Constant Field Values

BDA_MOD_16VSB

public static final int BDA_MOD_16VSB
Modulation types

See Also:
Constant Field Values

BDA_MOD_ANALOG_AMPLITUDE

public static final int BDA_MOD_ANALOG_AMPLITUDE
Modulation types

See Also:
Constant Field Values

BDA_MOD_ANALOG_FREQUENCY

public static final int BDA_MOD_ANALOG_FREQUENCY
Modulation types

See Also:
Constant Field Values

BDA_MOD_MAX

public static final int BDA_MOD_MAX
Modulation types

See Also:
Constant Field Values

AUTO_PARSE

public static int AUTO_PARSE
Constructor Detail

DSBDAGraph

public DSBDAGraph(int DVBType,
                  int flags,
                  java.beans.PropertyChangeListener pcl)
           throws DSJException
Sets up a TV graph, leaving decoder selection to DirectShow. dsj will try to connect decoders with a very basic connection media type, which some filters may not want to deal with. Please see setMPEGType() for further information.

Throws:
DSJException

DSBDAGraph

public DSBDAGraph(int DVBType,
                  int flags,
                  DSFilterInfo mpegDecoder,
                  DSFilterInfo audioDecoder,
                  java.beans.PropertyChangeListener pcl)
           throws DSJException
Sets up a TV Graph using the specified MPEG decoders. dsj will try to connect to video decoders with a very basic connection media type. Some filters may not want to deal with this. Please see setMPEGType() for further information.

Throws:
DSJException
Method Detail

setMPEGType

public static void setMPEGType(int type,
                               int w,
                               int h)
Instructs the dll to present a more specific mediatype on the demultiplexer's video output. By default dsj uses a very basic mediatype and lets decoders read the details from the stream (dimensions etc. may be different among channels etc.). However a substantial number of decoders may refuse to connect without some more parameters being given.
Call this method with one of the BDA_MT_... constants for the type parameter before invoking constructors. As a result the demultiplexer's video output will present a fully specified PAL, NTSC, narrow PAL (704*576), or narrow NTSC (544*480) media type. When type is BDA_MT_CUSTOM, you can additionally specify width and height (which will otherwise be ignored).
dsj 0_8_62 adds some more constants here, allowing for MPEG4-10 mediatypes following the same size steps. This is untested.


getBDADevices

public static DSFilterInfo[] getBDADevices()

setChannel

public boolean setChannel(BDAChannelInfo info)
                   throws DSJException
Tunes the receiver component of the graph to the given channel.

Throws:
DSJException

broadcast

public void broadcast(java.lang.String baseIP,
                      MPEGProgram[] prgs,
                      int flags)
               throws java.lang.Exception
Relays the transport stream received from the BDAReceiver to the network for IPBroadcasting. The transportstream will usually have four programs in it and the combination of baseIP and prgs parameters lets you determine what to do with those in a rather flexible manner. %baseIP sets the default target destination, it takes a string giving ip address and port in xx.xx.xx.xx:yyyy form. Now when %prgs is null the entire transportstream will be pushed to that destination. If %prgs is non null only those programs given in the array will be extracted and relayed. Any program in the array that has a dedicated destination set for itself using MPEGProgram.setIPDestination(..), will not be directed to the address given in baseIP, but to that individual address.
When the receiver is tuned to another broadcast, IP transmission is stopped and needs to be reconfigured.
Windows 7: Preview might not restart unless you tune to another channel (which when done within the current transponder will not affect the broadcast)
This method makes use of the TSNetworkSink class under the hood. Refer to that class for more information.

Throws:
java.lang.Exception

performChannelScan

public BDAChannelInfo[] performChannelScan(int timeout)
                                    throws DSJException
Scans frequencies for valid program streams. %timeout - seconds after which lock attempts will be interrupted when unsucessful.

Throws:
DSJException

enableEPG

public void enableEPG(boolean enabled)
Enables or disables the transfer of EPG (electronic program guide) data to java. The default is false. Note that this does not work for EPG on Windows 7, where you need to enable SI table dumping.


scanChannel

public BDAChannelInfo scanChannel(int frequency,
                                  int specific_1,
                                  int specific_2,
                                  int timeout)
Scans the given frequency for valid program streams and returns the first one found. % specific_1: bandwidth for DVBT, symbolrate for DVBS & C % specific_2: polarization for DVBS, set to 0 for DVBT %timeout - seconds after which lock attempts will be interrupted when unsucessful.


scanChannel

public BDAChannelInfo scanChannel(int[] params,
                                  int timeout)

scanTransponder

public BDAChannelInfo[] scanTransponder(int frequency,
                                        int specific_1,
                                        int specific_2,
                                        int timeout)
Scans the given frequency for valid program streams. % specific_1: bandwidth for DVBT, symbolrate for DVBS & C % specific_2: polarization for DVBS, set to 0 for DVBT %timeout - seconds after which lock attempts will be interrupted when unsucessful.


scanTransponder

public BDAChannelInfo[] scanTransponder(int[] params,
                                        int timeout)

interruptScan

public void interruptScan()
breaks an ongoing channel scan


persistToXML

public void persistToXML(int net,
                         BDAChannelInfo[] bdaCh)
                  throws DSJException
Writes the information in the channel info array to the specified network node of the XML channellist file, that the DSBDAGraph node of the dsj.xml file points to. (see example dsj.xml file in the demo folder).

Throws:
DSJException

saveLastChannel

public void saveLastChannel(BDAChannelInfo info)

loadLastChannel

public void loadLastChannel()

getCurrentChannel

public BDAChannelInfo getCurrentChannel()

getChannelsFromXML

public BDAChannelInfo[] getChannelsFromXML(int net)
Reads previously scanned valid program information from the dsj.xml file


setSatellite

public static void setSatellite(java.lang.String name,
                                int lowOscillator,
                                int highOscillator)

getEPG

public EPGData[] getEPG()
Returns now/next EPGData for all channels on the currently active transponder. EPG transfer must be explicitely enabled before using enableEPG(...) or - on Windows 7 - by setting up SI table dumping.


getCurrentChannelEPG

public EPGData[] getCurrentChannelEPG()
Returns now/next EPGData for currently tuned channel. EPG transfer must be explicitely enabled before using enableEPG(...) or - on Windows 7 - by setting up SI table dumping.


dumpTransportStream

public boolean dumpTransportStream(java.lang.String fileName,
                                   boolean preview)
                            throws DSJException
Writes the BDA receiver's original transport stream to the specified file. Local display may be turned off. The file written will contain all streams of the transponder currently tuned to. This takes a lot of harddisc space... The first call to this method will insert the connection point. Subsequent calls may stop filewriting (when %fileName is null) or change the file written to. The preview parameter is ignored after the first call.
Windows 7: Preview might not restart unless you tune to another channel (which when done within the current broadcast will not affect the recording)

Throws:
DSJException

interceptTransportStream

public DSSampleBuffer interceptTransportStream(int flags)
Intercepts dataflow in the native filtergraph before the MPEG Demultiplexer. The returned DSSampleBuffer will be continously updated with samples containing the entire transport stream, that is all stream, that may be in the current broadcast. Updates fire PropertyChangeEvents of type TS_BUFFER_FILLED and transfer the DSSampleBuffer in the oldValue field.
Windows 7: Preview might not restart unless you tune to another channel (which when done within the current broadcast will not affect sample transmission)
%flags can take the following values:
DSFiltergraph.PREVIEW - to continue rendering a local preview.


dumpSITables

public void dumpSITables(int PID,
                         int flags)
Creates an additional output on the demultiplexer and passes tables received on the given PID to java through PropertyChange events of type TABLE_RECEIVED. This is currently the only way to get EPG data on Windows 7. (Set %PID to 0x12 - if the flags parameter has DSBDAGraph.AUTO_PARSE set, now & next information will be parsed and delivered similiar to how the native IGuideData interface does on XP & Vista. Without autoparsing, resp. on other PIDs than 0x12, you will get full tables with extended program information).
Preview may not render after setting up the table dump, but usually does after tuneing to another channel.


getNetworkType

public int getNetworkType()

getPMT_PID

public int getPMT_PID()
Description copied from interface: MPEGSource
Returns the PMT PID of the currently playing program.

Specified by:
getPMT_PID in interface MPEGSource

getProgramPIDs

public int[] getProgramPIDs()
Description copied from interface: MPEGSource
Returns the elementary stream PIDs of the currently playing program.

Specified by:
getProgramPIDs in interface MPEGSource

getStreamTypes

public int[] getStreamTypes()
Description copied from interface: MPEGSource
Returns the elementary streamtypes of the currently playing program.

Specified by:
getStreamTypes in interface MPEGSource

getPrograms

public MPEGProgram[] getPrograms()
Description copied from interface: MPEGSource
Returns an array of all programs seen in a stream. This is primarily used with multi program broadcasts. Only the playing stream may have all fields set unless the source class has been instructed to uncover all stream PIDs and types.

Specified by:
getPrograms in interface MPEGSource