| 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 TGCALLS_DARWIN_VIDEO_SOURCE_H |
| 12 | #define TGCALLS_DARWIN_VIDEO_SOURCE_H |
| 13 | //#ifdef WEBRTC_IOS |
| 14 |
| 15 | #import "base/RTCVideoCapturer.h" |
| 16 |
| 17 | #include "base/RTCMacros.h" |
| 18 | #include "media/base/adapted_video_track_source.h" |
| 19 | #include "rtc_base/timestamp_aligner.h" |
| 20 |
| 21 | RTC_FWD_DECL_OBJC_CLASS(RTC_OBJC_TYPE(RTCVideoFrame)); |
| 22 |
| 23 | namespace tgcalls { |
| 24 |
| 25 | class DarwinVideoTrackSource : public rtc::AdaptedVideoTrackSource { |
| 26 | public: |
| 27 | DarwinVideoTrackSource(); |
| 28 |
| 29 | // This class can not be used for implementing screen casting. Hopefully, this |
| 30 | // function will be removed before we add that to iOS/Mac. |
| 31 | bool is_screencast() const override; |
| 32 |
| 33 | // Indicates that the encoder should denoise video before encoding it. |
| 34 | // If it is not set, the default configuration is used which is different |
| 35 | // depending on video codec. |
| 36 | absl::optional<bool> needs_denoising() const override; |
| 37 |
| 38 | SourceState state() const override; |
| 39 |
| 40 | bool remote() const override; |
| 41 |
| 42 | void OnCapturedFrame(RTC_OBJC_TYPE(RTCVideoFrame) * frame); |
| 43 | bool OnCapturedFrame(const webrtc::VideoFrame& frame); |
| 44 |
| 45 | // Called by RTCVideoSource. |
| 46 | void OnOutputFormatRequest(int width, int height, int fps); |
| 47 |
| 48 | private: |
| 49 | rtc::VideoBroadcaster broadcaster_; |
| 50 | rtc::TimestampAligner timestamp_aligner_; |
| 51 |
| 52 | }; |
| 53 |
| 54 | } // namespace tgcalls |
| 55 |
| 56 | //#endif //WEBRTC_IOS |
| 57 | #endif |
| 58 |