TMediaPin¶
primo::avblocks::modern::TMediaPin
-
class TMediaPin : public primo::avblocks::modern::TParamsMixin<TMediaPin>¶
Fluent wrapper for
primo::avblocks::MediaPin, which represents an elementary media stream.A pin can exist for audio, video or any other kind of stream, but AVBlocks processes only audio and video streams. Pins are the inputs and outputs of a
TMediaSocketT. A transcoder matches input and output pins by their connection ID (seeconnection()). Codec parameters are added withaddParam().Owns the raw object through a
primo::ref. Not copyable, movable.Unnamed Group
Unnamed Group
-
inline TMediaPin &&streamInfo(const TAudioStreamInfo &info) &&¶
-
inline TMediaPin &streamInfo(const TAudioStreamInfo &info) &¶
-
inline TMediaPin &&streamInfo(const TVideoStreamInfo &info) &&¶
-
inline TMediaPin &streamInfo(const TVideoStreamInfo &info) &¶
Sets the stream info of the pin.
The pin retains the stream info object, so the pin and
infoshare it.- Parameters:
info – Audio or video stream info.
- Returns:
This object, for chaining. On a temporary the rvalue overload returns the object by rvalue reference.
Unnamed Group
-
inline TMediaPin &&connection(int32_t connectionID) &&¶
-
inline TMediaPin &connection(int32_t connectionID) &¶
Sets the connection ID of the pin.
A transcoder matches and connects input and output pins by their connection ID. Do not confuse it with the stream ID defined for certain stream types.
- Parameters:
connectionID –
PinConnection::Disabledto exclude the pin,PinConnection::Autofor automatic matching, or any positive integer to match with an output pin that has the same ID.- Returns:
This object, for chaining. On a temporary the rvalue overload returns the object by rvalue reference.
Public Functions
-
inline TMediaPin()¶
Creates an empty media pin.
-
inline explicit TMediaPin(primo::ref<primo::avblocks::MediaPin> pin)¶
Takes ownership of an existing
MediaPinreference.
-
inline explicit TMediaPin(primo::avblocks::MediaPin *pin)¶
Wraps a non-owned
MediaPinpointer, retaining it. Used byTMediaSocketT::pin().
-
inline TAudioStreamInfo audioStreamInfo() const¶
Returns the pin’s stream info cast to
TAudioStreamInfo, wrapping the existing pointer.
-
inline TVideoStreamInfo videoStreamInfo() const¶
Returns the pin’s stream info cast to
TVideoStreamInfo, wrapping the existing pointer.
-
inline TDataStreamInfo streamInfo() const¶
Returns the pin’s stream info as a
TDataStreamInfo(baseStreamInfoview), wrapping the existing pointer.Use to access
mediaType(),streamType(),ID(),programNumber()without knowing the concrete media type.
-
inline int32_t connection() const¶
Returns the pin’s current connection ID.
-
inline TMediaPin &&streamInfo(const TAudioStreamInfo &info) &&¶