|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcom.wowza.wms.stream.MediaStreamMap
public class MediaStreamMap
MediaStreamMap: collection of IMediaStream object. This collection is usually attached to an IApplicationInstance object.
| Field Summary | |
|---|---|
protected IApplicationInstance |
appInstance
|
protected java.util.Map<String,ILiveStreamPacketizer> |
liveStreamPacketizers
|
static int |
MAXSTREAMINDEX
|
protected java.util.List<IMediaStreamNotify> |
mediaStreamListeners
|
protected int |
nameGroupId
|
protected java.util.List<com.wowza.wms.stream.MediaStreamMapGroup> |
nameGroups
|
protected java.util.concurrent.atomic.AtomicLong |
nextStreamId
|
protected edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock |
streamLock
|
protected java.util.Map<String,IMediaStream> |
streamNames
|
protected edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock |
streamNamesLock
|
protected java.util.Map<String,java.util.Set<com.wowza.wms.stream.MediaStreamMapGroup>> |
streamNameToGroup
|
protected java.util.Map<Long,IMediaStream> |
streams
|
| Constructor Summary | |
|---|---|
MediaStreamMap(IApplicationInstance appInstance)
Create empty MediaStreamMap collection |
|
| Method Summary | |
|---|---|
void |
addMediaStreamListener(IMediaStreamNotify mediaStreamListener)
Add a media stream listener. |
com.wowza.wms.stream.MediaStreamMapGroup |
addNameGroup(com.wowza.wms.stream.MediaStreamMapGroup newGroup)
|
void |
broadcasePlayMessage(IMediaStream stream,
long timecode,
java.nio.ByteBuffer msg,
int objectEncoding)
Send a broadcast message to all play stream that are listening to this live published stream. |
int |
broadcastGetObjectEncoding(IMediaStream stream)
Get the minimum object encoding level for the clients playing this stream. |
void |
clearStreamName(String name)
Unregister a published live media stream name. |
void |
clearStreamName(String name,
IMediaStream stream)
Unregister a published live media stream name. |
IApplicationInstance |
getAppInstance()
Get the parent applicationInstance. |
String |
getAppInstanceName()
Get the name of the parent applicationInstance. |
String |
getAppName()
Get the name of the parent application. |
int |
getCount()
Get the total number of streams stored in the mediaStreamMap |
ILiveStreamPacketizer |
getLiveStreamPacketizer(String streamName,
String packetizerName,
boolean doCreate)
Get a live stream packetizer by name and packetizer id |
Object |
getLiveStreamPacketizerLock()
Get the lock to the live stream packetizer system |
java.util.Set<com.wowza.wms.stream.MediaStreamMapGroup> |
getNameGroups()
|
java.util.Set<com.wowza.wms.stream.MediaStreamMapGroup> |
getNameGroups(String streamName)
|
java.util.Set<String> |
getNameGroupStreamNames(String streamName)
|
int |
getNextStreamIndex()
Reserve a clientless stream id for a new media stream. |
int |
getNextStreamIndex(IClient client)
Reserve a stream for a client connection. |
int |
getNextStreamIndex(com.wowza.wms.netconnection.INetConnection netConnection)
Reserve a stream for a netConnection connection. |
java.util.List<String> |
getPublishStreamNames()
Returns a List of published stream names |
IMediaStream |
getStream(IClient client,
int index)
Get a media stream reference by stream id. |
IMediaStream |
getStream(IClient client,
int index,
boolean doCreate)
Get a media stream reference by stream id. |
IMediaStream |
getStream(com.wowza.wms.netconnection.INetConnection netConnection,
int index)
Get a media stream object that is owned by a server to server netConnection object (not yet implemented). |
IMediaStream |
getStream(com.wowza.wms.netconnection.INetConnection netConnection,
int index,
boolean doCreate)
Get a media stream reference by stream id. |
IMediaStream |
getStream(String name)
Get a media stream by stream name. |
IMediaStream |
getStreamClientless(int index,
String streamTypeStr)
Get a media stream reference by stream id. |
edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock |
getStreamListLock()
Get the underlying read/write lock associated with the list of streams |
edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock |
getStreamNameLock()
Get the underlying read/write lock associated with the stream names list |
java.util.List<IMediaStream> |
getStreams()
Returns a list of IMediaStream objects |
IVHost |
getVHost()
Get the parent vHost. |
void |
notifyMediaStreamCreate(IMediaStream mediaStream)
Notify all media stream listeners that a new media stream object has been created. |
void |
notifyMediaStreamDestroy(IMediaStream mediaStream)
Notify all media stream listeners that a media stream object is being destroyed. |
void |
notifyPlayPublish(IMediaStream stream)
Notify all play streams that are listening to this stream that the stream is going into a state of publish (NetStream.Play.PublishNotify). |
void |
notifyPlayUnpublish(IMediaStream stream)
Notify all play streams that are listening to this stream that the stream is going into a state of unpublished (NetStream.Play.UnpublishNotify). |
void |
notifyPlayUnpublish(String streamName)
Notify all play streams that are listening to this stream name that the stream is going into a state of unpublished (NetStream.Play.UnpublishNotify). |
void |
removeLiveStreamPacketizer(String streamName)
Remove all live stream packetizers for this stream name |
ILiveStreamPacketizer |
removeLiveStreamPacketizer(String streamName,
String packetizerName)
Remove live stream packetizer |
void |
removeMediaStreamListener(IMediaStreamNotify mediaStreamListener)
Remove a media stream listener. |
com.wowza.wms.stream.MediaStreamMapGroup |
removeNameGroup(int groupId)
|
com.wowza.wms.stream.MediaStreamMapGroup |
removeNameGroup(com.wowza.wms.stream.MediaStreamMapGroup nameGroup)
|
void |
removeStream(IClient client,
int index)
Remove a stream associated with a client connection |
void |
removeStream(com.wowza.wms.netconnection.INetConnection netConnection,
int index)
Remove a stream associated with a netConnection object |
void |
removeStream(int index)
Remove a clientless media stream |
void |
setStreamName(IMediaStream stream,
String name)
Insert live media stream into the mediaStreamMap by name. |
long |
streamToIndex(IMediaStream stream)
Get the unique stream identifier for a given stream |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IApplicationInstance appInstance
protected java.util.Map<String,ILiveStreamPacketizer> liveStreamPacketizers
public static final int MAXSTREAMINDEX
protected java.util.List<IMediaStreamNotify> mediaStreamListeners
protected int nameGroupId
protected java.util.List<com.wowza.wms.stream.MediaStreamMapGroup> nameGroups
protected java.util.concurrent.atomic.AtomicLong nextStreamId
protected edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock streamLock
protected java.util.Map<String,IMediaStream> streamNames
protected edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock streamNamesLock
protected java.util.Map<String,java.util.Set<com.wowza.wms.stream.MediaStreamMapGroup>> streamNameToGroup
protected java.util.Map<Long,IMediaStream> streams
| Constructor Detail |
|---|
public MediaStreamMap(IApplicationInstance appInstance)
appInstance - parent applicationInstance| Method Detail |
|---|
public void addMediaStreamListener(IMediaStreamNotify mediaStreamListener)
mediaStreamListener - media stream listenerpublic com.wowza.wms.stream.MediaStreamMapGroup addNameGroup(com.wowza.wms.stream.MediaStreamMapGroup newGroup)
public void broadcasePlayMessage(IMediaStream stream,
long timecode,
java.nio.ByteBuffer msg,
int objectEncoding)
stream - media streamtimecode - timecode (milliseconds)msg - byte[] of data that will be deserialized as an AMFData object.objectEncoding - object encoding (AMF0 or AMF3)public int broadcastGetObjectEncoding(IMediaStream stream)
stream - publish stream
public void clearStreamName(String name)
name - stream name
public void clearStreamName(String name,
IMediaStream stream)
name - stream namestream - streampublic IApplicationInstance getAppInstance()
public String getAppInstanceName()
public String getAppName()
public int getCount()
public ILiveStreamPacketizer getLiveStreamPacketizer(String streamName,
String packetizerName,
boolean doCreate)
streamName - stream namepacketizerName - packetizer iddoCreate - create if does not exist
public Object getLiveStreamPacketizerLock()
public java.util.Set<com.wowza.wms.stream.MediaStreamMapGroup> getNameGroups()
public java.util.Set<com.wowza.wms.stream.MediaStreamMapGroup> getNameGroups(String streamName)
public java.util.Set<String> getNameGroupStreamNames(String streamName)
public int getNextStreamIndex()
public int getNextStreamIndex(IClient client)
getStream(IClient, int, boolean) to create stream.
client - parent client
public int getNextStreamIndex(com.wowza.wms.netconnection.INetConnection netConnection)
getStream(INetConnection, int, boolean) to create stream.
netConnection -
public java.util.List<String> getPublishStreamNames()
public IMediaStream getStream(IClient client,
int index)
client - clientindex - stream id
public IMediaStream getStream(IClient client,
int index,
boolean doCreate)
getNextStreamIndex(IClient) .
client - clientindex - stream iddoCreate - true to create if it does not exist
public IMediaStream getStream(com.wowza.wms.netconnection.INetConnection netConnection,
int index)
netConnection - netConnection to remote serverindex - stream id
public IMediaStream getStream(com.wowza.wms.netconnection.INetConnection netConnection,
int index,
boolean doCreate)
getNextStreamIndex(INetConnection) .
netConnection - netConnection to remote serverindex - stream iddoCreate - true to create if it does not exist
public IMediaStream getStream(String name)
name - stream name
public IMediaStream getStreamClientless(int index,
String streamTypeStr)
getNextStreamIndex() .
index - stream idstreamTypeStr - stream type
public edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock getStreamListLock()
public edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock getStreamNameLock()
public java.util.List<IMediaStream> getStreams()
public IVHost getVHost()
public void notifyMediaStreamCreate(IMediaStream mediaStream)
mediaStream - new media stream objectpublic void notifyMediaStreamDestroy(IMediaStream mediaStream)
mediaStream - media stream object being destroyedpublic void notifyPlayPublish(IMediaStream stream)
stream - live published stream that is being publishedpublic void notifyPlayUnpublish(IMediaStream stream)
stream - live published stream that is being unpublishedpublic void notifyPlayUnpublish(String streamName)
streamName - live published stream that is being unpublishedpublic void removeLiveStreamPacketizer(String streamName)
streamName - streamName
public ILiveStreamPacketizer removeLiveStreamPacketizer(String streamName,
String packetizerName)
streamName - stream namepacketizerName - packetizer id
public void removeMediaStreamListener(IMediaStreamNotify mediaStreamListener)
mediaStreamListener - media stream listenerpublic com.wowza.wms.stream.MediaStreamMapGroup removeNameGroup(int groupId)
public com.wowza.wms.stream.MediaStreamMapGroup removeNameGroup(com.wowza.wms.stream.MediaStreamMapGroup nameGroup)
public void removeStream(IClient client,
int index)
client - clientindex - stream index
public void removeStream(com.wowza.wms.netconnection.INetConnection netConnection,
int index)
netConnection - net connectionindex - stream indexpublic void removeStream(int index)
index - stream index
public void setStreamName(IMediaStream stream,
String name)
stream - mediea stream objectname - media stream namepublic long streamToIndex(IMediaStream stream)
stream - stream
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||