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 20 matching lines...) Expand all Loading... |
31 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" | 31 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" |
32 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 32 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
33 #include "webrtc/rtc_base/asyncinvoker.h" | 33 #include "webrtc/rtc_base/asyncinvoker.h" |
34 #include "webrtc/rtc_base/criticalsection.h" | 34 #include "webrtc/rtc_base/criticalsection.h" |
35 #include "webrtc/rtc_base/networkroute.h" | 35 #include "webrtc/rtc_base/networkroute.h" |
36 #include "webrtc/rtc_base/thread_annotations.h" | 36 #include "webrtc/rtc_base/thread_annotations.h" |
37 #include "webrtc/rtc_base/thread_checker.h" | 37 #include "webrtc/rtc_base/thread_checker.h" |
38 | 38 |
39 namespace webrtc { | 39 namespace webrtc { |
40 class VideoDecoder; | 40 class VideoDecoder; |
| 41 class VideoDecoderFactory; |
41 class VideoEncoder; | 42 class VideoEncoder; |
| 43 class VideoEncoderFactory; |
42 struct MediaConfig; | 44 struct MediaConfig; |
43 } | 45 } |
44 | 46 |
45 namespace rtc { | 47 namespace rtc { |
46 class Thread; | 48 class Thread; |
47 } // namespace rtc | 49 } // namespace rtc |
48 | 50 |
49 namespace cricket { | 51 namespace cricket { |
50 | 52 |
51 class DecoderFactoryAdapter; | 53 class DecoderFactoryAdapter; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 }; | 97 }; |
96 | 98 |
97 // WebRtcVideoEngine is used for the new native WebRTC Video API (webrtc:1667). | 99 // WebRtcVideoEngine is used for the new native WebRTC Video API (webrtc:1667). |
98 class WebRtcVideoEngine { | 100 class WebRtcVideoEngine { |
99 public: | 101 public: |
100 // Video engine does not take ownership of the video codec factories and the | 102 // Video engine does not take ownership of the video codec factories and the |
101 // caller needs to make sure they outlive the video engine. Internal SW video | 103 // caller needs to make sure they outlive the video engine. Internal SW video |
102 // codecs will be added on top of the external codecs. | 104 // codecs will be added on top of the external codecs. |
103 WebRtcVideoEngine(WebRtcVideoEncoderFactory* external_video_encoder_factory, | 105 WebRtcVideoEngine(WebRtcVideoEncoderFactory* external_video_encoder_factory, |
104 WebRtcVideoDecoderFactory* external_video_decoder_factory); | 106 WebRtcVideoDecoderFactory* external_video_decoder_factory); |
| 107 |
| 108 // These video codec factories represents all video codecs, i.e. both software |
| 109 // and external hardware codecs. |
| 110 WebRtcVideoEngine( |
| 111 std::unique_ptr<webrtc::VideoEncoderFactory> video_encoder_factory, |
| 112 std::unique_ptr<webrtc::VideoDecoderFactory> video_decoder_factory); |
| 113 |
105 virtual ~WebRtcVideoEngine(); | 114 virtual ~WebRtcVideoEngine(); |
106 | 115 |
107 WebRtcVideoChannel* CreateChannel(webrtc::Call* call, | 116 WebRtcVideoChannel* CreateChannel(webrtc::Call* call, |
108 const MediaConfig& config, | 117 const MediaConfig& config, |
109 const VideoOptions& options); | 118 const VideoOptions& options); |
110 | 119 |
111 std::vector<VideoCodec> codecs() const; | 120 std::vector<VideoCodec> codecs() const; |
112 RtpCapabilities GetCapabilities() const; | 121 RtpCapabilities GetCapabilities() const; |
113 | 122 |
114 private: | 123 private: |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 const std::string codec_name_; | 528 const std::string codec_name_; |
520 const int max_qp_; | 529 const int max_qp_; |
521 const int max_framerate_; | 530 const int max_framerate_; |
522 const bool is_screencast_; | 531 const bool is_screencast_; |
523 const bool conference_mode_; | 532 const bool conference_mode_; |
524 }; | 533 }; |
525 | 534 |
526 } // namespace cricket | 535 } // namespace cricket |
527 | 536 |
528 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE_H_ | 537 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE_H_ |
OLD | NEW |