de.humatic.dsj.src
Class HTTPStreamingSource

java.lang.Object
  extended by de.humatic.dsj.src.Source
      extended by de.humatic.dsj.src.NetworkSource
          extended by de.humatic.dsj.src.HTTPStreamingSource

public class HTTPStreamingSource
extends NetworkSource

HTTPStreamingSource plays streams as specified in Apple's IETF draft for HTTPStreaming. This approach uses segmented mpeg2 transport, program or audio elementary streams, mostly carrying H264/AVC video and AAC audio payloads. Streams are described by m3u playlists and can be served by most regular webservers. This is Apple's bid for the html video tag and will likely become "the standard" for Mac users for the next couple of years, but Apple is also using its latest iPhone OS to push the technology and is expected to also support it in Safari for Windows.
For a quick conceptual overview see Apple's iPhone streaming media overview dsj currently only supports transportstream content and it has to be noted that some DirectShow AAC decoders seem to have problems with AAC in transportstreams. libfaad and realaac based decoders in ffdShow & CoreAAC do not seem to work for these streams' audio at the time being. Commercial decoders from Elecard and MainConcept do work, as does the Monogram decoder. To cirumvent DirectShow's intelligent connect, consider using the createGraph method that takes decoder arguments.


Field Summary
 
Fields inherited from class de.humatic.dsj.src.NetworkSource
BUFFER_OVERFLOW, CONNECTION_TIMEOUT, FASTSTART, H264_FASTSTART, H264_FORCE_INLINE_SPS, H264_OMMIT_SPS, H264_PASS_INLINE_SPS, IDLE_TIMEOUT, KF_NOTIFY, LIVE_SRC, MAX_BUFFER_TIME, MAX_DURATION, MAX_FRAME_TIME, NO_USER_PROMPT, READ_USER_DATA, RECEIVE_TIMEOUT, RTCP_RECEIVE_ERROR, SEEK_FAILURE, SOCKET_ERROR, STARVING, UDP_UNCONNECTED
 
Fields inherited from class de.humatic.dsj.src.Source
ASYNC, AUTO_GC, DIRECT, ES, FILTER_SETUP_ERROR, FLV, HTTP, HTTP_AUDIO, JAS, MJPG, MKV, MP4, PSNET, PULL, PUSH, RAW, RTMP, RTP, RTSP, SHOUTCAST, SS_CLOSED, SS_CONNECT, SS_CONNECTED, SS_DONE, SS_EOS, SS_FORMAT_READ, SS_RUNNING, SS_SEEKING, SS_SETUP, SS_STREAMS_READ, SS_TCP_ROLLOVER, TIMEOUT, TSFILE, TSNET, UNKNOWN
 
Constructor Summary
HTTPStreamingSource(java.net.URL m3uURL, int flags, java.beans.PropertyChangeListener listener)
          Opens the m3u playlist at the given http:// URL.
 
Method Summary
 boolean canSeek()
          Overridden to return false, this source can not seek.
 void closeSource(boolean terminate)
          Closes down the source.
 DSGraph createGraph(int graphFlags)
          Creates a DSGraph object with CompressedJavaSource filters that are fed from this source.
 DSGraph createGraph(int graphFlags, DSFilterInfo videoDecoder, DSFilterInfo audioDecoder)
          Creates a DSGraph object with CompressedJavaSource filters, fed from this source and the given video and audio decoders.
 DSMediaType[] getMediaTypes()
          Returns the media types created by this source.
 int getNumChannels()
          Returns the number of media channels this source delivers (and thus the number of CompressedJavaSource filters it will create).
 int getSourceTime()
           
 void selectStream(java.lang.String bandWidthSpecificPath)
          To select a bandwith specific stream, this method can be called in reaction to a PLAYLIST_PARSED event, which will pass a String[] describing available streams.
 
Methods inherited from class de.humatic.dsj.src.NetworkSource
configurePasswordDialog, getDefaultInterfaceAddress, getPasswordDialogOptions, getServerInfo, getTimeConstraint, setConnectionTimeout, setHTTPConnector, setNetworkInterface, setSocketFactory, setTimeConstraint, setUserAgent
 
Methods inherited from class de.humatic.dsj.src.Source
addSourceFilter, asyncRead, createSourceFilter_async, createSourceFilter, getAvailable, getBuffered, getGraph, getID, getMaxTimeLoaded, getMinBufferTime, getOffsetTime, getPath, getSourceDuration, getSourceFilter, getSourceFilters, getSourceFlags, getTransport, getType, isLive, notifyChannelFailure, queryParameter_int, read, sendEvent, setOffsetTime, setSourceRate, setSourceTime, streamSeek, syncRead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPStreamingSource

public HTTPStreamingSource(java.net.URL m3uURL,
                           int flags,
                           java.beans.PropertyChangeListener listener)
                    throws java.lang.Exception
Opens the m3u playlist at the given http:// URL.

Throws:
java.lang.Exception
Method Detail

closeSource

public void closeSource(boolean terminate)
Description copied from class: Source
Closes down the source. When %terminate is true, all socket and stream resources etc. will also be freed. This method is called internally when disposing off the graph that was using this source and is not normally used by application code.

Overrides:
closeSource in class Source

getNumChannels

public int getNumChannels()
Description copied from class: Source
Returns the number of media channels this source delivers (and thus the number of CompressedJavaSource filters it will create). For an audio/video RTSP stream this will be two, while for a transport stream it will be only one as demultiplexing is done on the native side.

Overrides:
getNumChannels in class Source

canSeek

public boolean canSeek()
Overridden to return false, this source can not seek.

Overrides:
canSeek in class Source

getSourceTime

public int getSourceTime()
Overrides:
getSourceTime in class Source

createGraph

public DSGraph createGraph(int graphFlags)
Description copied from class: Source
Creates a DSGraph object with CompressedJavaSource filters that are fed from this source.

Overrides:
createGraph in class Source

createGraph

public DSGraph createGraph(int graphFlags,
                           DSFilterInfo videoDecoder,
                           DSFilterInfo audioDecoder)
Description copied from class: Source
Creates a DSGraph object with CompressedJavaSource filters, fed from this source and the given video and audio decoders. This is for special use cases where you know exactly what media formats to expect. Any decoder you do not want to specify may be null or DSFilterInfo.doNotRender(). Failure to put a given decoder into the graph will be announced via GRAPH_ERROR events and dsj will try to automatically pick an alternative (no exception will be thrown!).

Overrides:
createGraph in class Source

getMediaTypes

public DSMediaType[] getMediaTypes()
Description copied from class: Source
Returns the media types created by this source. Depending on the time of calling, this method needs to be taken with care as during format negotiation mediatype information may not yet or only be partially available.

Overrides:
getMediaTypes in class Source

selectStream

public void selectStream(java.lang.String bandWidthSpecificPath)
To select a bandwith specific stream, this method can be called in reaction to a PLAYLIST_PARSED event, which will pass a String[] describing available streams. The source will pick a stream automatically if this is not used.