webrtc/modules/video_capture/raw_video_sink_interface.h
Michael Olbrich 079e93de17 Add callback for raw frames for video capture
This is needed for Chromium. The video capture API in Chromium expects the
raw frames and it will always convert or copy the frame. With the existing
API that would mean copying the frame twice.

Bug: webrtc:13177
Change-Id: I71f6e2dc6d5a812c3641ac691b75d50178fa0de7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264548
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39095}
2023-01-13 09:54:41 +00:00

34 lines
1.1 KiB
C++

/*
* Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
// This file contains interfaces used for creating the VideoCaptureModule
// and DeviceInfo.
#ifndef MODULES_VIDEO_CAPTURE_RAW_VIDEO_SINK_INTERFACE_H_
#define MODULES_VIDEO_CAPTURE_RAW_VIDEO_SINK_INTERFACE_H_
#include "modules/video_capture/video_capture_defines.h"
namespace webrtc {
class RawVideoSinkInterface {
public:
virtual ~RawVideoSinkInterface() = default;
virtual int32_t OnRawFrame(uint8_t* videoFrame,
size_t videoFrameLength,
const webrtc::VideoCaptureCapability& frameInfo,
VideoRotation rotation,
int64_t captureTime) = 0;
};
} // namespace webrtc
#endif // MODULES_VIDEO_CAPTURE_RAW_VIDEO_SINK_INTERFACE_H_