Rerun C++ SDK
|
Archetype: Video stream consisting of raw video chunks. More...
#include <rerun/archetypes/video_stream.hpp>
Public Member Functions | |
VideoStream (VideoStream &&other)=default | |
VideoStream (const VideoStream &other)=default | |
VideoStream & | operator= (const VideoStream &other)=default |
VideoStream & | operator= (VideoStream &&other)=default |
VideoStream (rerun::components::VideoCodec _codec) | |
VideoStream | with_codec (const rerun::components::VideoCodec &_codec) && |
The codec used to encode the video chunks. | |
VideoStream | with_many_codec (const Collection< rerun::components::VideoCodec > &_codec) && |
This method makes it possible to pack multiple codec in a single component batch. | |
VideoStream | with_sample (const rerun::components::VideoSample &_sample) && |
Video sample data (also known as "video chunk"). | |
VideoStream | with_many_sample (const Collection< rerun::components::VideoSample > &_sample) && |
This method makes it possible to pack multiple sample in a single component batch. | |
VideoStream | with_draw_order (const rerun::components::DrawOrder &_draw_order) && |
An optional floating point value that specifies the 2D drawing order. | |
VideoStream | with_many_draw_order (const Collection< rerun::components::DrawOrder > &_draw_order) && |
This method makes it possible to pack multiple draw_order in a single component batch. | |
Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
Partitions the component data into multiple sub-batches. | |
Collection< ComponentColumn > | columns () |
Partitions the component data into unit-length sub-batches. | |
Static Public Member Functions | |
static VideoStream | update_fields () |
Update only some specific fields of a VideoStream . | |
static VideoStream | clear_fields () |
Clear all the fields of a VideoStream . | |
Public Attributes | |
std::optional< ComponentBatch > | codec |
The codec used to encode the video chunks. | |
std::optional< ComponentBatch > | sample |
Video sample data (also known as "video chunk"). | |
std::optional< ComponentBatch > | draw_order |
An optional floating point value that specifies the 2D drawing order. | |
Static Public Attributes | |
static constexpr const char | ArchetypeName [] = "rerun.archetypes.VideoStream" |
The name of the archetype as used in ComponentDescriptor s. | |
static constexpr auto | Descriptor_codec |
ComponentDescriptor for the codec field. | |
static constexpr auto | Descriptor_sample |
ComponentDescriptor for the sample field. | |
static constexpr auto | Descriptor_draw_order |
ComponentDescriptor for the draw_order field. | |
Archetype: Video stream consisting of raw video chunks.
For logging video containers like mp4, refer to archetypes::AssetVideo
and archetypes::VideoFrameReference
. To learn more about video support in Rerun, check the video reference.
All components except sample
are typically logged statically once per entity. sample
is then logged repeatedly for each frame on the timeline.
TODO(#10422): archetypes::VideoFrameReference
does not yet work with archetypes::VideoStream
.
⚠ This type is unstable and may change significantly in a way that the data won't be backwards compatible.
|
inline |
The codec used to encode the video chunks.
This property is expected to be constant over time and is ideally logged statically once per stream.
|
inline |
This method makes it possible to pack multiple codec
in a single component batch.
This only makes sense when used in conjunction with columns
. with_codec
should be used when logging a single row's worth of data.
|
inline |
Video sample data (also known as "video chunk").
The current timestamp is used as presentation timestamp (PTS) for all data in this sample. There is currently no way to log differing decoding timestamps, meaning that there is no support for B-frames. See https://github.com/rerun-io/rerun/issues/10090 for more details.
Unlike any other data in Rerun, video samples are not allowed to be logged out of order, as this may break live video playback. I.e. any appended sample should have a timestamp greater than all previously logged samples.
The samples are expected to be encoded using the codec
field. Each video sample must contain enough data for exactly one video frame (this restriction may be relaxed in the future for some codecs).
Unless your stream consists entirely of key-frames (in which case you should consider archetypes::EncodedImage
) never log this component as static data as this means that you loose all information of previous samples which may be required to decode an image.
See components::VideoCodec
for codec specific requirements.
|
inline |
This method makes it possible to pack multiple sample
in a single component batch.
This only makes sense when used in conjunction with columns
. with_sample
should be used when logging a single row's worth of data.
|
inline |
An optional floating point value that specifies the 2D drawing order.
Objects with higher values are drawn on top of those with lower values. Defaults to -15.0
.
|
inline |
This method makes it possible to pack multiple draw_order
in a single component batch.
This only makes sense when used in conjunction with columns
. with_draw_order
should be used when logging a single row's worth of data.
Collection< ComponentColumn > rerun::archetypes::VideoStream::columns | ( | const Collection< uint32_t > & | lengths_ | ) |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch
data into ComponentColumn
s instead, via ComponentBatch::partitioned
.
This makes it possible to use RecordingStream::send_columns
to send columnar data directly into Rerun.
The specified lengths
must sum to the total length of the component batch.
Collection< ComponentColumn > rerun::archetypes::VideoStream::columns | ( | ) |
Partitions the component data into unit-length sub-batches.
This is semantically similar to calling columns
with std::vector<uint32_t>(n, 1)
, where n
is automatically guessed.
std::optional<ComponentBatch> rerun::archetypes::VideoStream::codec |
The codec used to encode the video chunks.
This property is expected to be constant over time and is ideally logged statically once per stream.
std::optional<ComponentBatch> rerun::archetypes::VideoStream::sample |
Video sample data (also known as "video chunk").
The current timestamp is used as presentation timestamp (PTS) for all data in this sample. There is currently no way to log differing decoding timestamps, meaning that there is no support for B-frames. See https://github.com/rerun-io/rerun/issues/10090 for more details.
Unlike any other data in Rerun, video samples are not allowed to be logged out of order, as this may break live video playback. I.e. any appended sample should have a timestamp greater than all previously logged samples.
The samples are expected to be encoded using the codec
field. Each video sample must contain enough data for exactly one video frame (this restriction may be relaxed in the future for some codecs).
Unless your stream consists entirely of key-frames (in which case you should consider archetypes::EncodedImage
) never log this component as static data as this means that you loose all information of previous samples which may be required to decode an image.
See components::VideoCodec
for codec specific requirements.
std::optional<ComponentBatch> rerun::archetypes::VideoStream::draw_order |
An optional floating point value that specifies the 2D drawing order.
Objects with higher values are drawn on top of those with lower values. Defaults to -15.0
.
|
staticconstexpr |
ComponentDescriptor
for the codec
field.
|
staticconstexpr |
ComponentDescriptor
for the sample
field.
|
staticconstexpr |
ComponentDescriptor
for the draw_order
field.