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

Side by Side Diff: webrtc/media/base/fakemediaengine.h

Issue 1695663003: Drop VideoOptions from VideoSendParameters. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Let WebRtcVideoChannel2 keep construction-time default VideoOptions. Created 4 years, 9 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 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 bool rendering() const { return playout(); } 437 bool rendering() const { return playout(); }
438 const VideoOptions& options() const { return options_; } 438 const VideoOptions& options() const { return options_; }
439 const std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*>& sinks() 439 const std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*>& sinks()
440 const { 440 const {
441 return sinks_; 441 return sinks_;
442 } 442 }
443 int max_bps() const { return max_bps_; } 443 int max_bps() const { return max_bps_; }
444 virtual bool SetSendParameters(const VideoSendParameters& params) { 444 virtual bool SetSendParameters(const VideoSendParameters& params) {
445 return (SetSendCodecs(params.codecs) && 445 return (SetSendCodecs(params.codecs) &&
446 SetSendRtpHeaderExtensions(params.extensions) && 446 SetSendRtpHeaderExtensions(params.extensions) &&
447 SetMaxSendBandwidth(params.max_bandwidth_bps) && 447 SetMaxSendBandwidth(params.max_bandwidth_bps));
448 SetOptions(params.options));
449 } 448 }
450 449
451 virtual bool SetRecvParameters(const VideoRecvParameters& params) { 450 virtual bool SetRecvParameters(const VideoRecvParameters& params) {
452 return (SetRecvCodecs(params.codecs) && 451 return (SetRecvCodecs(params.codecs) &&
453 SetRecvRtpHeaderExtensions(params.extensions)); 452 SetRecvRtpHeaderExtensions(params.extensions));
454 } 453 }
455 virtual bool AddSendStream(const StreamParams& sp) { 454 virtual bool AddSendStream(const StreamParams& sp) {
456 return RtpHelper<VideoMediaChannel>::AddSendStream(sp); 455 return RtpHelper<VideoMediaChannel>::AddSendStream(sp);
457 } 456 }
458 virtual bool RemoveSendStream(uint32_t ssrc) { 457 virtual bool RemoveSendStream(uint32_t ssrc) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 538
540 FakeVideoEngine* engine_; 539 FakeVideoEngine* engine_;
541 std::vector<VideoCodec> recv_codecs_; 540 std::vector<VideoCodec> recv_codecs_;
542 std::vector<VideoCodec> send_codecs_; 541 std::vector<VideoCodec> send_codecs_;
543 std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*> sinks_; 542 std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*> sinks_;
544 std::map<uint32_t, VideoCapturer*> capturers_; 543 std::map<uint32_t, VideoCapturer*> capturers_;
545 VideoOptions options_; 544 VideoOptions options_;
546 int max_bps_; 545 int max_bps_;
547 }; 546 };
548 547
548 class DataOptions {};
549 class FakeDataMediaChannel : public RtpHelper<DataMediaChannel> { 549 class FakeDataMediaChannel : public RtpHelper<DataMediaChannel> {
550 public: 550 public:
551 explicit FakeDataMediaChannel(void* unused, const DataOptions& options) 551 explicit FakeDataMediaChannel(void* unused, const DataOptions& options)
552 : send_blocked_(false), max_bps_(-1) {} 552 : send_blocked_(false), max_bps_(-1) {}
553 ~FakeDataMediaChannel() {} 553 ~FakeDataMediaChannel() {}
554 const std::vector<DataCodec>& recv_codecs() const { return recv_codecs_; } 554 const std::vector<DataCodec>& recv_codecs() const { return recv_codecs_; }
555 const std::vector<DataCodec>& send_codecs() const { return send_codecs_; } 555 const std::vector<DataCodec>& send_codecs() const { return send_codecs_; }
556 const std::vector<DataCodec>& codecs() const { return send_codecs(); } 556 const std::vector<DataCodec>& codecs() const { return send_codecs(); }
557 int max_bps() const { return max_bps_; } 557 int max_bps() const { return max_bps_; }
558 558
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 869
870 private: 870 private:
871 std::vector<FakeDataMediaChannel*> channels_; 871 std::vector<FakeDataMediaChannel*> channels_;
872 std::vector<DataCodec> data_codecs_; 872 std::vector<DataCodec> data_codecs_;
873 DataChannelType last_channel_type_; 873 DataChannelType last_channel_type_;
874 }; 874 };
875 875
876 } // namespace cricket 876 } // namespace cricket
877 877
878 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ 878 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/base/mediachannel.h » ('j') | webrtc/media/engine/webrtcvideoengine2.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698