OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 // WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667). | 106 // WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667). |
107 class WebRtcVideoEngine2 { | 107 class WebRtcVideoEngine2 { |
108 public: | 108 public: |
109 WebRtcVideoEngine2(); | 109 WebRtcVideoEngine2(); |
110 ~WebRtcVideoEngine2(); | 110 ~WebRtcVideoEngine2(); |
111 | 111 |
112 // Basic video engine implementation. | 112 // Basic video engine implementation. |
113 void Init(); | 113 void Init(); |
114 | 114 |
115 bool SetDefaultEncoderConfig(const VideoEncoderConfig& config); | |
116 | |
117 WebRtcVideoChannel2* CreateChannel(webrtc::Call* call, | 115 WebRtcVideoChannel2* CreateChannel(webrtc::Call* call, |
118 const VideoOptions& options); | 116 const VideoOptions& options); |
119 | 117 |
120 const std::vector<VideoCodec>& codecs() const; | 118 const std::vector<VideoCodec>& codecs() const; |
121 RtpCapabilities GetCapabilities() const; | 119 RtpCapabilities GetCapabilities() const; |
122 | 120 |
123 // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does | 121 // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does |
124 // not take the ownership of |decoder_factory|. The caller needs to make sure | 122 // not take the ownership of |decoder_factory|. The caller needs to make sure |
125 // that |decoder_factory| outlives the video engine. | 123 // that |decoder_factory| outlives the video engine. |
126 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory); | 124 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory); |
127 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does | 125 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does |
128 // not take the ownership of |encoder_factory|. The caller needs to make sure | 126 // not take the ownership of |encoder_factory|. The caller needs to make sure |
129 // that |encoder_factory| outlives the video engine. | 127 // that |encoder_factory| outlives the video engine. |
130 virtual void SetExternalEncoderFactory( | 128 virtual void SetExternalEncoderFactory( |
131 WebRtcVideoEncoderFactory* encoder_factory); | 129 WebRtcVideoEncoderFactory* encoder_factory); |
132 | 130 |
133 bool EnableTimedRender(); | 131 bool EnableTimedRender(); |
134 | 132 |
135 bool FindCodec(const VideoCodec& in); | 133 bool FindCodec(const VideoCodec& in); |
136 bool CanSendCodec(const VideoCodec& in, | |
137 const VideoCodec& current, | |
138 VideoCodec* out); | |
139 // Check whether the supplied trace should be ignored. | 134 // Check whether the supplied trace should be ignored. |
140 bool ShouldIgnoreTrace(const std::string& trace); | 135 bool ShouldIgnoreTrace(const std::string& trace); |
141 | 136 |
142 private: | 137 private: |
143 std::vector<VideoCodec> GetSupportedCodecs() const; | 138 std::vector<VideoCodec> GetSupportedCodecs() const; |
144 | 139 |
145 std::vector<VideoCodec> video_codecs_; | 140 std::vector<VideoCodec> video_codecs_; |
146 | 141 |
147 bool initialized_; | 142 bool initialized_; |
148 | 143 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 VideoOptions options_; | 529 VideoOptions options_; |
535 // TODO(deadbeef): Don't duplicate information between | 530 // TODO(deadbeef): Don't duplicate information between |
536 // send_params/recv_params, rtp_extensions, options, etc. | 531 // send_params/recv_params, rtp_extensions, options, etc. |
537 VideoSendParameters send_params_; | 532 VideoSendParameters send_params_; |
538 VideoRecvParameters recv_params_; | 533 VideoRecvParameters recv_params_; |
539 }; | 534 }; |
540 | 535 |
541 } // namespace cricket | 536 } // namespace cricket |
542 | 537 |
543 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ | 538 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |