Commit 3f5ddde7 authored by Michael Froman's avatar Michael Froman
Browse files

Bug 1828517 - Vendor libwebrtc from 079e93de17

Upstream commit: https://webrtc.googlesource.com/src/+/079e93de17e5126676c729309adcf9d483486092
    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: default avatarIlya Nikolaevskiy <ilnik@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#39095}
parent f3ee2821
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20901,3 +20901,6 @@ e7e53feace
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
9795589f50
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
079e93de17
+2 −0
Original line number Diff line number Diff line
@@ -13956,3 +13956,5 @@ libwebrtc updated from /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-l
libwebrtc updated from /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-04-21T04:00:04.795717.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-04-21T04:00:59.627723.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-04-21T15:30:50.447890.
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ rtc_library("video_capture_module") {
  sources = [
    "device_info_impl.cc",
    "device_info_impl.h",
    "raw_video_sink_interface.h",
    "video_capture.h",
    "video_capture_config.h",
    "video_capture_defines.h",
+34 −0
Original line number Diff line number Diff line
/*
 *  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_
+3 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include "api/video/video_rotation.h"
#include "api/video/video_sink_interface.h"
#include "modules/desktop_capture/desktop_capture_types.h"
#include "modules/video_capture/raw_video_sink_interface.h"
#include "modules/video_capture/video_capture_defines.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"
@@ -117,6 +118,8 @@ class VideoCaptureModule : public rtc::RefCountInterface {
  //   Register capture data callback
  virtual void RegisterCaptureDataCallback(
      rtc::VideoSinkInterface<VideoFrame>* dataCallback) = 0;
  virtual void RegisterCaptureDataCallback(
      RawVideoSinkInterface* dataCallback) = 0;

  //  Remove capture data callback
  virtual void DeRegisterCaptureDataCallback(
Loading