| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); | 115 bool SetDefaultEncoderConfig(const VideoEncoderConfig& config); |
| 116 | 116 |
| 117 WebRtcVideoChannel2* CreateChannel(webrtc::Call* call, | 117 WebRtcVideoChannel2* CreateChannel(webrtc::Call* call, |
| 118 const VideoOptions& options); | 118 const VideoOptions& options); |
| 119 | 119 |
| 120 const std::vector<VideoCodec>& codecs() const; | 120 const std::vector<VideoCodec>& codecs() const; |
| 121 const std::vector<RtpHeaderExtension>& rtp_header_extensions() const; | 121 RtpCapabilities GetCapabilities() const; |
| 122 | 122 |
| 123 // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does | 123 // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does |
| 124 // not take the ownership of |decoder_factory|. The caller needs to make sure | 124 // not take the ownership of |decoder_factory|. The caller needs to make sure |
| 125 // that |decoder_factory| outlives the video engine. | 125 // that |decoder_factory| outlives the video engine. |
| 126 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory); | 126 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory); |
| 127 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does | 127 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does |
| 128 // not take the ownership of |encoder_factory|. The caller needs to make sure | 128 // not take the ownership of |encoder_factory|. The caller needs to make sure |
| 129 // that |encoder_factory| outlives the video engine. | 129 // that |encoder_factory| outlives the video engine. |
| 130 virtual void SetExternalEncoderFactory( | 130 virtual void SetExternalEncoderFactory( |
| 131 WebRtcVideoEncoderFactory* encoder_factory); | 131 WebRtcVideoEncoderFactory* encoder_factory); |
| 132 | 132 |
| 133 bool EnableTimedRender(); | 133 bool EnableTimedRender(); |
| 134 | 134 |
| 135 bool FindCodec(const VideoCodec& in); | 135 bool FindCodec(const VideoCodec& in); |
| 136 bool CanSendCodec(const VideoCodec& in, | 136 bool CanSendCodec(const VideoCodec& in, |
| 137 const VideoCodec& current, | 137 const VideoCodec& current, |
| 138 VideoCodec* out); | 138 VideoCodec* out); |
| 139 // Check whether the supplied trace should be ignored. | 139 // Check whether the supplied trace should be ignored. |
| 140 bool ShouldIgnoreTrace(const std::string& trace); | 140 bool ShouldIgnoreTrace(const std::string& trace); |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 std::vector<VideoCodec> GetSupportedCodecs() const; | 143 std::vector<VideoCodec> GetSupportedCodecs() const; |
| 144 | 144 |
| 145 std::vector<VideoCodec> video_codecs_; | 145 std::vector<VideoCodec> video_codecs_; |
| 146 std::vector<RtpHeaderExtension> rtp_header_extensions_; | |
| 147 | 146 |
| 148 bool initialized_; | 147 bool initialized_; |
| 149 | 148 |
| 150 WebRtcVideoDecoderFactory* external_decoder_factory_; | 149 WebRtcVideoDecoderFactory* external_decoder_factory_; |
| 151 WebRtcVideoEncoderFactory* external_encoder_factory_; | 150 WebRtcVideoEncoderFactory* external_encoder_factory_; |
| 152 rtc::scoped_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_; | 151 rtc::scoped_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_; |
| 153 }; | 152 }; |
| 154 | 153 |
| 155 class WebRtcVideoChannel2 : public rtc::MessageHandler, | 154 class WebRtcVideoChannel2 : public rtc::MessageHandler, |
| 156 public VideoMediaChannel, | 155 public VideoMediaChannel, |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 523 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
| 525 std::vector<VideoCodecSettings> recv_codecs_; | 524 std::vector<VideoCodecSettings> recv_codecs_; |
| 526 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 525 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 527 webrtc::Call::Config::BitrateConfig bitrate_config_; | 526 webrtc::Call::Config::BitrateConfig bitrate_config_; |
| 528 VideoOptions options_; | 527 VideoOptions options_; |
| 529 }; | 528 }; |
| 530 | 529 |
| 531 } // namespace cricket | 530 } // namespace cricket |
| 532 | 531 |
| 533 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ | 532 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ |
| OLD | NEW |