Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/objcvideotracksource.h

Issue 2745193002: iOS: Add new RTCVideoSource interface (Closed)
Patch Set: Remove didStart/didStop callbacks. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 #import <WebRTC/RTCVideoFrame.h>
15
16 #include "webrtc/base/timestampaligner.h"
17 #include "webrtc/media/base/adaptedvideotracksource.h"
18
19 namespace webrtc {
20
21 class ObjcVideoTrackSource : public rtc::AdaptedVideoTrackSource {
22 public:
23 ObjcVideoTrackSource();
24
25 // This class can not be used for implementing screen casting. Hopefully, this
26 // function will be removed before we add that to iOS/Mac.
27 bool is_screencast() const override { return false; }
28
29 // Indicates that the encoder should denoise video before encoding it.
30 // If it is not set, the default configuration is used which is different
31 // depending on video codec.
32 rtc::Optional<bool> needs_denoising() const override {
33 return rtc::Optional<bool>(false);
34 }
35
36 SourceState state() const override { return SourceState::kLive; }
37
38 bool remote() const override { return false; }
39
40 // Called by RTCVideoSource.
41 void OnCapturedFrame(RTCVideoFrame* frame);
42 void OnOutputFormatRequest(int width, int height, int fps);
43
44 private:
45 rtc::VideoBroadcaster broadcaster_;
46 rtc::TimestampAligner timestamp_aligner_;
47 };
48
49 } // namespace webrtc
50
51 #endif // WEBRTC_SDK_OBJC_FRAMEWORK_CLASSES_OBJCVIDEOTRACKSOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698