TParamsMixin¶
primo::avblocks::modern::TParamsMixin
-
template<typename Derived>
class TParamsMixin¶ CRTP mixin that adds the typed, fluent
addParam()to a class that owns aprimo::avblocks::ParameterList(TMediaPinandTMediaSocketT).Derivedmust provide a privateparamList()and declare this mixin a friend.Adds a codec parameter (fluent).
nameis a parameter name constant, e.g.Param::Video::Crop::LeftorParam::Encoder::Audio::AAC::StereoMode. The overload is chosen by the type ofvalue:integer or enum (e.g.
InterpolationMethod::Super) -> integer parameterfloat/double-> floating point parameterstd::string/std::wstring/ string literal -> string parameterTMediaBuffer-> media buffer parameterTVideoStreamInfo-> video stream info parameter
Each overload has an lvalue version (returns
Derived&) and an rvalue version (returnsDerived&&) so it can be used in the middle of a chain on a temporary.Subclassed by primo::avblocks::modern::TMediaSocketT< wchar_t >
Unnamed Group
Unnamed Group
Unnamed Group
-
inline Derived &addParam(const char *name, const std::string &value) &¶
-
inline Derived &&addParam(const char *name, const std::string &value) &&¶
-
inline Derived &addParam(const char *name, const std::wstring &value) &¶
-
inline Derived &&addParam(const char *name, const std::wstring &value) &&¶
Adds a string parameter.
Accepts
std::string,std::wstringand string literals.
Unnamed Group
-
inline Derived &addParam(const char *name, const TMediaBuffer &value) &¶
-
inline Derived &&addParam(const char *name, const TMediaBuffer &value) &&¶
Adds a media buffer parameter.
- Parameters:
name – Parameter name constant, e.g.
Param::Video::Crop::Left.value – The buffer to store in the parameter.
- Returns:
This object, for chaining. On a temporary the rvalue overload returns the object by rvalue reference.
Unnamed Group
-
inline Derived &addParam(const char *name, const TVideoStreamInfo &value) &¶
-
inline Derived &&addParam(const char *name, const TVideoStreamInfo &value) &&¶
Adds a video stream info parameter.
- Parameters:
name – Parameter name constant, e.g.
Param::Video::Crop::Left.value – The video stream info to store in the parameter.
- Returns:
This object, for chaining. On a temporary the rvalue overload returns the object by rvalue reference.