Package com.wowza.wms.stream.publish
Class PublishingProviderMediaReader
- Object
-
- com.wowza.wms.stream.publish.PublishingProviderBase
-
- com.wowza.wms.stream.publish.PublishingProviderMediaReader
-
- All Implemented Interfaces:
IPublishingProvider
public class PublishingProviderMediaReader extends PublishingProviderBase implements IPublishingProvider
PublishingProviderMediaReader: Publishing provider for media reader based stream (vod).
-
-
Field Summary
Fields Modifier and Type Field Description static long
ONMETADATA_FILTER_DURATION
static long
ONMETADATA_FILTER_NONE
-
Fields inherited from class com.wowza.wms.stream.publish.PublishingProviderBase
audioOffset, dataOffset, isDebugLog, previousSkippedTimecode, publisher, sendOnMetadata, streamName, tracksAreAligned, videoOffset
-
-
Constructor Summary
Constructors Constructor Description PublishingProviderMediaReader(Publisher publisher, long audioStart, long videoStart, String streamName)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Invoked on stream closebyte[]
filterMetadata(byte[] dataDataBytes)
String
getCaptionFilenameQueryParameter()
String
getCaptionFilenameStr()
String
getCaptionLanguageQueryParameter()
String
getCaptionLanguageStr()
long
getDuration()
Get the target playback duration (milliseconds)long
getOnMetadataFilter()
Filter that control what metadata items are removed from onMetaData event.double
getSpeed()
String
getTimedTextEventName()
void
getTimeTextedReader(IMediaReader mediaReader, IApplicationInstance appInstance, String mediaName, String mediaExtension, String queryStr, IMediaStream stream)
boolean
isTimedTextEnabled()
boolean
play(Publisher publisher)
Invoked on playboolean
seek(long timecode)
Invoked on seekboolean
seek(long timecode, int seekType)
Invoked on seekvoid
setCaptionFilenameQueryParameter(String captionFilenameQueryParameter)
void
setCaptionFilenameStr(String captionFilenameStr)
void
setCaptionLanguageQueryParameter(String captionLanguageQueryParameter)
void
setCaptionLanguageStr(String captionLanguageStr)
void
setDuration(long duration)
Set target duration for playback (milliseconds)void
setOnMetadataFilter(long onMetadataFilter)
Filter that control what metadata items are removed from onMetaData event.void
setRealTimeStartTime(long realTimeStartTime)
Set real start time (milliseconds)void
setSpeed(double speed)
void
setTimedTextEnabled(boolean timedTextEnabled)
void
setTimedTextEventName(String timedTextEventName)
-
Methods inherited from class com.wowza.wms.stream.publish.PublishingProviderBase
isSendOnMetadata, setSendOnMetadata
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.wowza.wms.stream.publish.IPublishingProvider
isSendOnMetadata, setSendOnMetadata
-
-
-
-
Field Detail
-
ONMETADATA_FILTER_NONE
public static final long ONMETADATA_FILTER_NONE
- See Also:
- Constant Field Values
-
ONMETADATA_FILTER_DURATION
public static final long ONMETADATA_FILTER_DURATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PublishingProviderMediaReader
public PublishingProviderMediaReader(Publisher publisher, long audioStart, long videoStart, String streamName)
Constructor- Parameters:
publisher
- publisheraudioStart
-videoStart
-streamName
- stream name
-
-
Method Detail
-
getTimeTextedReader
public void getTimeTextedReader(IMediaReader mediaReader, IApplicationInstance appInstance, String mediaName, String mediaExtension, String queryStr, IMediaStream stream)
-
seek
public boolean seek(long timecode)
Description copied from interface:IPublishingProvider
Invoked on seek- Specified by:
seek
in interfaceIPublishingProvider
- Parameters:
timecode
- target timecode- Returns:
- true, if seek successful
-
seek
public boolean seek(long timecode, int seekType)
Description copied from interface:IPublishingProvider
Invoked on seek- Specified by:
seek
in interfaceIPublishingProvider
- Parameters:
timecode
- target timecodeseekType
- seek type, see IMediaReader.SEEKTARGET_*- Returns:
- true, if seek successful
-
filterMetadata
public byte[] filterMetadata(byte[] dataDataBytes)
-
play
public boolean play(Publisher publisher)
Description copied from interface:IPublishingProvider
Invoked on play- Specified by:
play
in interfaceIPublishingProvider
- Parameters:
publisher
- publisher- Returns:
- true if successful
-
close
public void close()
Description copied from interface:IPublishingProvider
Invoked on stream close- Specified by:
close
in interfaceIPublishingProvider
-
getDuration
public long getDuration()
Get the target playback duration (milliseconds)- Returns:
- playback duration (milliseconds)
-
setDuration
public void setDuration(long duration)
Description copied from interface:IPublishingProvider
Set target duration for playback (milliseconds)- Specified by:
setDuration
in interfaceIPublishingProvider
- Parameters:
duration
- duration for playback (milliseconds)
-
setRealTimeStartTime
public void setRealTimeStartTime(long realTimeStartTime)
Description copied from interface:IPublishingProvider
Set real start time (milliseconds)- Specified by:
setRealTimeStartTime
in interfaceIPublishingProvider
- Parameters:
realTimeStartTime
- real start time (milliseconds)
-
getSpeed
public double getSpeed()
-
setSpeed
public void setSpeed(double speed)
-
getOnMetadataFilter
public long getOnMetadataFilter()
Filter that control what metadata items are removed from onMetaData event. Default is ONMETADATA_FILTER_DURATION. Value is a bit mask of ONMETADATA_FILTER_* value.- Returns:
- control what metadata items are removed from onMetaData event
-
setOnMetadataFilter
public void setOnMetadataFilter(long onMetadataFilter)
Filter that control what metadata items are removed from onMetaData event. Default is ONMETADATA_FILTER_DURATION. Value is a bit mask of ONMETADATA_FILTER_* value.- Parameters:
onMetadataFilter
- control what metadata items are removed from onMetaData event
-
getCaptionLanguageQueryParameter
public String getCaptionLanguageQueryParameter()
-
setCaptionLanguageQueryParameter
public void setCaptionLanguageQueryParameter(String captionLanguageQueryParameter)
-
getCaptionFilenameQueryParameter
public String getCaptionFilenameQueryParameter()
-
setCaptionFilenameQueryParameter
public void setCaptionFilenameQueryParameter(String captionFilenameQueryParameter)
-
getCaptionLanguageStr
public String getCaptionLanguageStr()
-
setCaptionLanguageStr
public void setCaptionLanguageStr(String captionLanguageStr)
-
getCaptionFilenameStr
public String getCaptionFilenameStr()
-
setCaptionFilenameStr
public void setCaptionFilenameStr(String captionFilenameStr)
-
getTimedTextEventName
public String getTimedTextEventName()
-
setTimedTextEventName
public void setTimedTextEventName(String timedTextEventName)
-
isTimedTextEnabled
public boolean isTimedTextEnabled()
-
setTimedTextEnabled
public void setTimedTextEnabled(boolean timedTextEnabled)
-
-