OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 30 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
31 #include "webrtc/rtc_base/asyncinvoker.h" | 31 #include "webrtc/rtc_base/asyncinvoker.h" |
32 #include "webrtc/rtc_base/criticalsection.h" | 32 #include "webrtc/rtc_base/criticalsection.h" |
33 #include "webrtc/rtc_base/networkroute.h" | 33 #include "webrtc/rtc_base/networkroute.h" |
34 #include "webrtc/rtc_base/optional.h" | 34 #include "webrtc/rtc_base/optional.h" |
35 #include "webrtc/rtc_base/thread_annotations.h" | 35 #include "webrtc/rtc_base/thread_annotations.h" |
36 #include "webrtc/rtc_base/thread_checker.h" | 36 #include "webrtc/rtc_base/thread_checker.h" |
37 | 37 |
38 namespace webrtc { | 38 namespace webrtc { |
39 class VideoDecoder; | 39 class VideoDecoder; |
| 40 class VideoDecoderFactory; |
40 class VideoEncoder; | 41 class VideoEncoder; |
| 42 class VideoEncoderFactory; |
41 struct MediaConfig; | 43 struct MediaConfig; |
42 } | 44 } |
43 | 45 |
44 namespace rtc { | 46 namespace rtc { |
45 class Thread; | 47 class Thread; |
46 } // namespace rtc | 48 } // namespace rtc |
47 | 49 |
48 namespace cricket { | 50 namespace cricket { |
49 | 51 |
50 class DecoderFactoryAdapter; | 52 class DecoderFactoryAdapter; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 }; | 96 }; |
95 | 97 |
96 // WebRtcVideoEngine is used for the new native WebRTC Video API (webrtc:1667). | 98 // WebRtcVideoEngine is used for the new native WebRTC Video API (webrtc:1667). |
97 class WebRtcVideoEngine { | 99 class WebRtcVideoEngine { |
98 public: | 100 public: |
99 // Video engine does not take ownership of the video codec factories and the | 101 // Video engine does not take ownership of the video codec factories and the |
100 // caller needs to make sure they outlive the video engine. The external | 102 // caller needs to make sure they outlive the video engine. The external |
101 // video factories are separate from the internal software codecs. | 103 // video factories are separate from the internal software codecs. |
102 WebRtcVideoEngine(WebRtcVideoEncoderFactory* external_video_encoder_factory, | 104 WebRtcVideoEngine(WebRtcVideoEncoderFactory* external_video_encoder_factory, |
103 WebRtcVideoDecoderFactory* external_video_decoder_factory); | 105 WebRtcVideoDecoderFactory* external_video_decoder_factory); |
| 106 |
| 107 // These video codec factories represents all video codecs, i.e. both software |
| 108 // and external hardware codecs. |
| 109 WebRtcVideoEngine( |
| 110 std::unique_ptr<webrtc::VideoEncoderFactory> video_encoder_factory, |
| 111 std::unique_ptr<webrtc::VideoDecoderFactory> video_decoder_factory); |
| 112 |
104 virtual ~WebRtcVideoEngine(); | 113 virtual ~WebRtcVideoEngine(); |
105 | 114 |
106 WebRtcVideoChannel* CreateChannel(webrtc::Call* call, | 115 WebRtcVideoChannel* CreateChannel(webrtc::Call* call, |
107 const MediaConfig& config, | 116 const MediaConfig& config, |
108 const VideoOptions& options); | 117 const VideoOptions& options); |
109 | 118 |
110 std::vector<VideoCodec> codecs() const; | 119 std::vector<VideoCodec> codecs() const; |
111 RtpCapabilities GetCapabilities() const; | 120 RtpCapabilities GetCapabilities() const; |
112 | 121 |
113 private: | 122 private: |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 const std::string codec_name_; | 517 const std::string codec_name_; |
509 const int max_qp_; | 518 const int max_qp_; |
510 const int max_framerate_; | 519 const int max_framerate_; |
511 const bool is_screencast_; | 520 const bool is_screencast_; |
512 const bool conference_mode_; | 521 const bool conference_mode_; |
513 }; | 522 }; |
514 | 523 |
515 } // namespace cricket | 524 } // namespace cricket |
516 | 525 |
517 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE_H_ | 526 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE_H_ |
OLD | NEW |