mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00

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}
34 lines
1.1 KiB
C++
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_
|