Android-cuttlefish cvd tool
cvd_abgr_video_frame_buffer.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <stddef.h>
20#include <stdint.h>
21
22#include <memory>
23
25
26namespace cuttlefish {
27
29 public:
30 CvdAbgrVideoFrameBuffer(int width, int height, uint32_t format, int stride,
31 const uint8_t* data);
32 ~CvdAbgrVideoFrameBuffer() override = default;
33
34 int width() const override { return width_; }
35 int height() const override { return height_; }
36
37 uint8_t* Data() const override { return data_.get(); }
38 int Stride() const override { return stride_; }
39 std::size_t DataSize() const override { return size_; }
40 uint32_t PixelFormat() const override { return format_; }
41
42 std::unique_ptr<VideoFrameBuffer> Clone() const override;
43
44 private:
45 int width_;
47 uint32_t format_;
49 std::size_t size_;
50 std::unique_ptr<uint8_t[]> data_;
51};
52
53} // namespace cuttlefish
Definition: cvd_abgr_video_frame_buffer.h:28
uint32_t format_
Definition: cvd_abgr_video_frame_buffer.h:47
std::unique_ptr< VideoFrameBuffer > Clone() const override
Definition: cvd_abgr_video_frame_buffer.cpp:37
uint8_t * Data() const override
Definition: cvd_abgr_video_frame_buffer.h:37
std::unique_ptr< uint8_t[]> data_
Definition: cvd_abgr_video_frame_buffer.h:50
int height() const override
Definition: cvd_abgr_video_frame_buffer.h:35
int width_
Definition: cvd_abgr_video_frame_buffer.h:45
int width() const override
Definition: cvd_abgr_video_frame_buffer.h:34
~CvdAbgrVideoFrameBuffer() override=default
uint32_t PixelFormat() const override
Definition: cvd_abgr_video_frame_buffer.h:40
int Stride() const override
Definition: cvd_abgr_video_frame_buffer.h:38
int height_
Definition: cvd_abgr_video_frame_buffer.h:46
std::size_t size_
Definition: cvd_abgr_video_frame_buffer.h:49
std::size_t DataSize() const override
Definition: cvd_abgr_video_frame_buffer.h:39
CvdAbgrVideoFrameBuffer(int width, int height, uint32_t format, int stride, const uint8_t *data)
Definition: cvd_abgr_video_frame_buffer.cpp:25
int stride_
Definition: cvd_abgr_video_frame_buffer.h:48
Definition: video_frame_buffer.h:27
char data[Size]
Definition: incremental_server.cpp:1
EventFormat format
Definition: kernel_log_server.cc:61
Definition: alloc_driver.h:21