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

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2.h

Issue 1646253004: Split out dscp option from VideoOptions to new struct MediaChannelOptions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix WebRtcVideoChannel2Test.TestSetDscpOptions. Created 4 years, 10 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
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667). 107 // WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667).
108 class WebRtcVideoEngine2 { 108 class WebRtcVideoEngine2 {
109 public: 109 public:
110 WebRtcVideoEngine2(); 110 WebRtcVideoEngine2();
111 ~WebRtcVideoEngine2(); 111 ~WebRtcVideoEngine2();
112 112
113 // Basic video engine implementation. 113 // Basic video engine implementation.
114 void Init(); 114 void Init();
115 115
116 WebRtcVideoChannel2* CreateChannel(webrtc::Call* call, 116 WebRtcVideoChannel2* CreateChannel(webrtc::Call* call,
117 const VideoOptions& options); 117 const MediaChannelOptions& options,
118 const VideoOptions& video_options);
118 119
119 const std::vector<VideoCodec>& codecs() const; 120 const std::vector<VideoCodec>& codecs() const;
120 RtpCapabilities GetCapabilities() const; 121 RtpCapabilities GetCapabilities() const;
121 122
122 // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does 123 // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does
123 // 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
124 // that |decoder_factory| outlives the video engine. 125 // that |decoder_factory| outlives the video engine.
125 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory); 126 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory);
126 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does 127 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does
127 // 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
(...skipping 16 matching lines...) Expand all
144 WebRtcVideoEncoderFactory* external_encoder_factory_; 145 WebRtcVideoEncoderFactory* external_encoder_factory_;
145 rtc::scoped_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_; 146 rtc::scoped_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_;
146 }; 147 };
147 148
148 class WebRtcVideoChannel2 : public rtc::MessageHandler, 149 class WebRtcVideoChannel2 : public rtc::MessageHandler,
149 public VideoMediaChannel, 150 public VideoMediaChannel,
150 public webrtc::Transport, 151 public webrtc::Transport,
151 public webrtc::LoadObserver { 152 public webrtc::LoadObserver {
152 public: 153 public:
153 WebRtcVideoChannel2(webrtc::Call* call, 154 WebRtcVideoChannel2(webrtc::Call* call,
154 const VideoOptions& options, 155 const MediaChannelOptions& options,
156 const VideoOptions& video_options,
155 const std::vector<VideoCodec>& recv_codecs, 157 const std::vector<VideoCodec>& recv_codecs,
156 WebRtcVideoEncoderFactory* external_encoder_factory, 158 WebRtcVideoEncoderFactory* external_encoder_factory,
157 WebRtcVideoDecoderFactory* external_decoder_factory); 159 WebRtcVideoDecoderFactory* external_decoder_factory);
158 ~WebRtcVideoChannel2() override; 160 ~WebRtcVideoChannel2() override;
159 161
160 // VideoMediaChannel implementation 162 // VideoMediaChannel implementation
163 rtc::DiffServCodePoint DscpValue() const override;
161 bool SetSendParameters(const VideoSendParameters& params) override; 164 bool SetSendParameters(const VideoSendParameters& params) override;
162 bool SetRecvParameters(const VideoRecvParameters& params) override; 165 bool SetRecvParameters(const VideoRecvParameters& params) override;
163 bool GetSendCodec(VideoCodec* send_codec) override; 166 bool GetSendCodec(VideoCodec* send_codec) override;
164 bool SetSendStreamFormat(uint32_t ssrc, const VideoFormat& format) override; 167 bool SetSendStreamFormat(uint32_t ssrc, const VideoFormat& format) override;
165 bool SetSend(bool send) override; 168 bool SetSend(bool send) override;
166 bool SetVideoSend(uint32_t ssrc, 169 bool SetVideoSend(uint32_t ssrc,
167 bool mute, 170 bool mute,
168 const VideoOptions* options) override; 171 const VideoOptions* options) override;
169 bool AddSendStream(const StreamParams& sp) override; 172 bool AddSendStream(const StreamParams& sp) override;
170 bool RemoveSendStream(uint32_t ssrc) override; 173 bool RemoveSendStream(uint32_t ssrc) override;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 VideoOptions options_; 535 VideoOptions options_;
533 // TODO(deadbeef): Don't duplicate information between 536 // TODO(deadbeef): Don't duplicate information between
534 // send_params/recv_params, rtp_extensions, options, etc. 537 // send_params/recv_params, rtp_extensions, options, etc.
535 VideoSendParameters send_params_; 538 VideoSendParameters send_params_;
536 VideoRecvParameters recv_params_; 539 VideoRecvParameters recv_params_;
537 }; 540 };
538 541
539 } // namespace cricket 542 } // namespace cricket
540 543
541 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ 544 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698