TStreamInfo¶
primo::avblocks::modern::TStreamInfo
-
template<typename Derived, typename RawT>
class TStreamInfo¶ CRTP base for
TAudioStreamInfo,TVideoStreamInfo, andTDataStreamInfo.Holds the
primo::ref<RawT>and exposes all properties defined on the rawprimo::codecs::StreamInfointerface, with fluent setters that returnDerived&(on lvalues) orDerived&&(on temporaries) so chaining works naturally on the concrete subclass. The rvalue overloads let a chained temporary be returned or moved, e.g.returnTVideoStreamInfo().frameWidth(352).frameHeight(288);Unnamed Group
Unnamed Group
Unnamed Group
Unnamed Group
Unnamed Group
-
inline Derived &bitrateMode(int32_t mode) &¶
-
inline Derived &&bitrateMode(int32_t mode) &&¶
Sets the stream bitrate mode.
- Parameters:
mode – A
primo::codecs::BitrateMode::Enumconstant.- Returns:
This object, for chaining.
Unnamed Group
Unnamed Group
Unnamed Group
-
inline Derived &configData(primo::codecs::MediaBuffer *buf) &¶
-
inline Derived &&configData(primo::codecs::MediaBuffer *buf) &&¶
Sets decoder specific configuration data.
It is typically obtained from a demuxer and is required to decode certain stream types.
- Parameters:
buf – Buffer with the configuration data. Can be
nullptr.- Returns:
This object, for chaining.
Public Functions
-
inline primo::codecs::MediaType::Enum mediaType() const¶
Returns the media type of the stream. It cannot be changed.
-
inline double duration() const¶
Returns the stream duration in seconds.
-
inline int32_t bitrate() const¶
Returns the stream bitrate in bits per second.
-
inline int32_t bitrateMode() const¶
Returns the stream bitrate mode, a
primo::codecs::BitrateMode::Enumconstant.
-
inline int32_t ID() const¶
Returns the ID of the elementary stream.
-
inline int32_t programNumber() const¶
Returns the number of the program to which the elementary stream belongs.
-
inline bool immutable() const¶
Returns
trueif the object is immutable.An immutable object cannot be modified.
-
inline primo::codecs::MediaBuffer *configData() const¶
Returns the decoder specific configuration data, or
nullptrif not set.
-
inline bool reset()¶
Resets all fields to their defaults. Returns
falseif the object is immutable.
-
inline Derived &bitrateMode(int32_t mode) &¶