OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #ifndef WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_ |
| 12 #define WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_ |
| 13 |
| 14 #include "WebRTC/RTCMacros.h" |
| 15 #include "webrtc/base/timestampaligner.h" |
| 16 #include "webrtc/media/base/adaptedvideotracksource.h" |
| 17 |
| 18 RTC_FWD_DECL_OBJC_CLASS(RTCVideoFrame); |
| 19 |
| 20 namespace webrtc { |
| 21 |
| 22 class ObjcVideoTrackSource : public rtc::AdaptedVideoTrackSource { |
| 23 public: |
| 24 ObjcVideoTrackSource(); |
| 25 |
| 26 // This class can not be used for implementing screen casting. Hopefully, this |
| 27 // function will be removed before we add that to iOS/Mac. |
| 28 bool is_screencast() const override { return false; } |
| 29 |
| 30 // Indicates that the encoder should denoise video before encoding it. |
| 31 // If it is not set, the default configuration is used which is different |
| 32 // depending on video codec. |
| 33 rtc::Optional<bool> needs_denoising() const override { |
| 34 return rtc::Optional<bool>(false); |
| 35 } |
| 36 |
| 37 SourceState state() const override { return SourceState::kLive; } |
| 38 |
| 39 bool remote() const override { return false; } |
| 40 |
| 41 // Called by RTCVideoSource. |
| 42 void OnCapturedFrame(RTCVideoFrame* frame); |
| 43 void OnOutputFormatRequest(int width, int height, int fps); |
| 44 |
| 45 private: |
| 46 rtc::VideoBroadcaster broadcaster_; |
| 47 rtc::TimestampAligner timestamp_aligner_; |
| 48 }; |
| 49 |
| 50 } // namespace webrtc |
| 51 |
| 52 #endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_ |
OLD | NEW |