TMediaSocketList¶
primo::avblocks::modern::TMediaSocketList
-
class TMediaSocketList¶
Non-owning view of a
MediaSocketList.Returned by
TMediaInfo::inputs()/outputs().Public Functions
-
inline explicit TMediaSocketList(primo::avblocks::MediaSocketList *list)¶
Wraps a non-owned
MediaSocketListpointer.
-
inline int32_t count() const¶
Returns the number of sockets in the collection.
-
inline TMediaSocket at(int32_t index) const¶
Returns the socket at
index, wrapping the existing (non-owned) pointer.
-
inline ItemRef operator[](int32_t index) &¶
Non-const lvalue subscript — returns a proxy supporting read and
setAtwrite.
-
inline TMediaSocket operator[](int32_t index) const &¶
Const subscript — same as
at(index).
-
inline bool setAt(int32_t index, TMediaSocket &&socket)¶
Replaces the socket at
indexwithsocket. Returnstrueon success.
-
inline bool insert(int32_t index, TMediaSocket &&socket)¶
Inserts
socketbeforeindex, shifting later items. Returnstrueon success.
-
inline bool immutable() const¶
Returns
truewhen the list (and its parentTranscoder) is immutable.
-
inline bool remove(int32_t index)¶
Removes the socket at
index. Returnstrueon success.
-
inline bool clear()¶
Removes all sockets from the list. Returns
trueon success.
-
struct ItemRef¶
Proxy returned by the non-const lvalue
operator[](int32_t).Supports both read (implicit conversion to
TMediaSocket) and write (operator=callssetAton the parent list).Public Functions
-
inline operator TMediaSocket() const¶
Read — implicit conversion to a non-owning socket wrapper.
-
inline bool operator=(TMediaSocket &&s)¶
Write — calls
setAt; returnstrueon success.
Public Members
-
TMediaSocketList &list_¶
The list this proxy refers to.
-
int32_t index_¶
Index of the item the proxy refers to.
-
inline operator TMediaSocket() const¶
-
inline explicit TMediaSocketList(primo::avblocks::MediaSocketList *list)¶