#include "modules/desktop_capture/desktop_frame.h"
#include <string.h>
#include <cmath>
#include <memory>
#include <utility>
#include "modules/desktop_capture/desktop_capture_types.h"
#include "modules/desktop_capture/desktop_geometry.h"
#include "rtc_base/checks.h"
#include "third_party/libyuv/include/libyuv/planar_functions.h"
namespace webrtc {
DesktopFrame::DesktopFrame(DesktopSize size,
int stride,
uint8_t* data,
SharedMemory* shared_memory)
: … { … }
DesktopFrame::~DesktopFrame() = default;
void DesktopFrame::CopyPixelsFrom(const uint8_t* src_buffer,
int src_stride,
const DesktopRect& dest_rect) { … }
void DesktopFrame::CopyPixelsFrom(const DesktopFrame& src_frame,
const DesktopVector& src_pos,
const DesktopRect& dest_rect) { … }
bool DesktopFrame::CopyIntersectingPixelsFrom(const DesktopFrame& src_frame,
double horizontal_scale,
double vertical_scale) { … }
DesktopRect DesktopFrame::rect() const { … }
float DesktopFrame::scale_factor() const { … }
uint8_t* DesktopFrame::GetFrameDataAtPos(const DesktopVector& pos) const { … }
void DesktopFrame::CopyFrameInfoFrom(const DesktopFrame& other) { … }
void DesktopFrame::MoveFrameInfoFrom(DesktopFrame* other) { … }
bool DesktopFrame::FrameDataIsBlack() const { … }
void DesktopFrame::SetFrameDataToBlack() { … }
BasicDesktopFrame::BasicDesktopFrame(DesktopSize size)
: … { … }
BasicDesktopFrame::~BasicDesktopFrame() { … }
DesktopFrame* BasicDesktopFrame::CopyOf(const DesktopFrame& frame) { … }
std::unique_ptr<DesktopFrame> SharedMemoryDesktopFrame::Create(
DesktopSize size,
SharedMemoryFactory* shared_memory_factory) { … }
SharedMemoryDesktopFrame::SharedMemoryDesktopFrame(DesktopSize size,
int stride,
SharedMemory* shared_memory)
: … { … }
SharedMemoryDesktopFrame::SharedMemoryDesktopFrame(
DesktopSize size,
int stride,
std::unique_ptr<SharedMemory> shared_memory)
: … { … }
SharedMemoryDesktopFrame::~SharedMemoryDesktopFrame() { … }
}