Skip to main content
Version: 1.x

Class MediaCollection

Internal collection of available media streams

Declaration
public class MediaCollection : IReadOnlyCollection<MediaStream>, IEqualityComparer<MediaStream>

Implements:
Global.IEqualityComparer<OdinNative.Odin.Media.MediaStream>

Properties

this[long]

Try to get a media stream by ID

Declaration
public MediaStream this[long key] { get; }

Count

Count of streams in the collection

Declaration
public int Count { get; }

IsReadOnly

Indicates whether elements can be added or removed from the collection

Declaration
public bool IsReadOnly { get; }

Methods

Add(MediaStream)

Add a stream to the collection

Declaration
public bool Add(MediaStream item)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
OdinNative.Odin.Media.MediaStreamitemstream to add

Clear()

Free and empty the collection

Declaration
public void Clear()

Contains(long)

Determines whether the stream by id is in the collection

Declaration
public bool Contains(long id)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
System.Int64idhandle id of the stream

Contains(MediaStream)

Determines whether the media is in the collection

Declaration
public bool Contains(MediaStream item)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
OdinNative.Odin.Media.MediaStreamitemstream

CopyTo(MediaStream[], int)

Copies stream of the collection to an array

Declaration
public void CopyTo(MediaStream[] array, int arrayIndex)
Parameters
TypeNameDescription
OdinNative.Odin.Media.MediaStream[]arraytarget array
System.Int32arrayIndexarray offset

Equals(MediaStream, MediaStream)

Determines whether the streams are equal

Declaration
public bool Equals(MediaStream x, MediaStream y)
Returns

System.Boolean: true if equal or false

Parameters
TypeNameDescription
OdinNative.Odin.Media.MediaStreamxstream
OdinNative.Odin.Media.MediaStreamystream

GetEnumerator()

Get enumerator for iteration

Declaration
public IEnumerator<MediaStream> GetEnumerator()
Returns

Global.IEnumerator<OdinNative.Odin.Media.MediaStream>: enumerator### GetHashCode(MediaStream) Default GetHashCode

Declaration
public int GetHashCode(MediaStream obj)
Returns

System.Int32: hash code

Parameters
TypeNameDescription
OdinNative.Odin.Media.MediaStreamobjstream

Remove(long)

Remove a stream by handle id from the collection

Declaration
public bool Remove(long id)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
System.Int64idhandle id of the stream to remove

Remove(MediaStream)

Remove a stream from the collection

Declaration
public bool Remove(MediaStream item)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
OdinNative.Odin.Media.MediaStreamitemstream to remove

Implements

  • Global.IEqualityComparer<OdinNative.Odin.Media.MediaStream>