1#ifndef VIDEO_FRAME_OBSERVER_H_
2#define VIDEO_FRAME_OBSERVER_H_
34 I420Buffer(
const uint8_t* data_y,
const uint8_t* data_u,
const uint8_t* data_v,
35 int32_t stride_y, int32_t stride_u, int32_t stride_v, int32_t
width, int32_t
height);
99 const uint8_t* data_y_;
100 const uint8_t* data_u_;
101 const uint8_t* data_v_;
116 uint32_t timestamp_rtp,
156 std::shared_ptr<I420Buffer> i420_buffer_;
160 int64_t timestamp_us_;
162 int64_t ntp_time_ms_;
The I420Buffer class represents a buffer in I420 format.
Definition video_frame_observer.h:20
I420Buffer(const uint8_t *data_y, const uint8_t *data_u, const uint8_t *data_v, int32_t stride_y, int32_t stride_u, int32_t stride_v, int32_t width, int32_t height)
Constructs an I420Buffer object with the specified parameters.
const uint8_t * DataU()
Returns a pointer to the U plane data.
int32_t StrideV()
Returns the stride (number of bytes between consecutive rows) of the V plane.
int32_t height()
Returns the height of the buffer in pixels.
const uint8_t * DataY()
Returns a pointer to the Y plane data.
int32_t StrideY()
Returns the stride (number of bytes between consecutive rows) of the Y plane.
~I420Buffer()
Destructs the I420Buffer object.
const uint8_t * DataV()
Returns a pointer to the V plane data.
int32_t width()
Returns the width of the buffer in pixels.
int32_t StrideU()
Returns the stride (number of bytes between consecutive rows) of the U plane.
This class encapsulates video frame data.
Definition video_frame_observer.h:112
VideoRotation rotation() const
Get frame rotation.
int32_t width() const
Get frame width.
uint32_t size() const
Get frame size in pixels.
int64_t ntp_time_ms() const
Get capture ntp time in milliseconds.
int64_t timestamp_us() const
System monotonic clock, same timebase as rtc::TimeMicros().
VideoFrame(const std::shared_ptr< I420Buffer > buffer, int64_t timestamp_us, uint32_t timestamp_rtp, int64_t ntp_time_ms, VideoRotation rotation)
std::shared_ptr< I420Buffer > i420_buffer() const
Get I420Buffer.
int32_t height() const
Get frame height.
uint32_t timestamp() const
Get frame timestamp (90kHz).
This class is used to observe whether there is a callback for video frames.
Definition video_frame_observer.h:170
virtual void OnFrame(const VideoFrame &videoFrame)=0
The video frame will be called back through this function.
VideoRotation
Definition video_frame_observer.h:7
@ kVideoRotation_270
Definition video_frame_observer.h:11
@ kVideoRotation_0
Definition video_frame_observer.h:8
@ kVideoRotation_90
Definition video_frame_observer.h:9
@ kVideoRotation_180
Definition video_frame_observer.h:10