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

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: Rename send_default_options_ --> default_send_options_. 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 bool rendering() const { return playout(); } 434 bool rendering() const { return playout(); }
435 const VideoOptions& options() const { return options_; } 435 const VideoOptions& options() const { return options_; }
436 const std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*>& sinks() 436 const std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*>& sinks()
437 const { 437 const {
438 return sinks_; 438 return sinks_;
439 } 439 }
440 int max_bps() const { return max_bps_; } 440 int max_bps() const { return max_bps_; }
441 virtual bool SetSendParameters(const VideoSendParameters& params) { 441 virtual bool SetSendParameters(const VideoSendParameters& params) {
442 return (SetSendCodecs(params.codecs) && 442 return (SetSendCodecs(params.codecs) &&
443 SetSendRtpHeaderExtensions(params.extensions) && 443 SetSendRtpHeaderExtensions(params.extensions) &&
444 SetMaxSendBandwidth(params.max_bandwidth_bps) && 444 SetMaxSendBandwidth(params.max_bandwidth_bps));
445 SetOptions(params.options));
446 } 445 }
447 446
448 virtual bool SetRecvParameters(const VideoRecvParameters& params) { 447 virtual bool SetRecvParameters(const VideoRecvParameters& params) {
449 return (SetRecvCodecs(params.codecs) && 448 return (SetRecvCodecs(params.codecs) &&
450 SetRecvRtpHeaderExtensions(params.extensions)); 449 SetRecvRtpHeaderExtensions(params.extensions));
451 } 450 }
452 virtual bool AddSendStream(const StreamParams& sp) { 451 virtual bool AddSendStream(const StreamParams& sp) {
453 return RtpHelper<VideoMediaChannel>::AddSendStream(sp); 452 return RtpHelper<VideoMediaChannel>::AddSendStream(sp);
454 } 453 }
455 virtual bool RemoveSendStream(uint32_t ssrc) { 454 virtual bool RemoveSendStream(uint32_t ssrc) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 535
537 FakeVideoEngine* engine_; 536 FakeVideoEngine* engine_;
538 std::vector<VideoCodec> recv_codecs_; 537 std::vector<VideoCodec> recv_codecs_;
539 std::vector<VideoCodec> send_codecs_; 538 std::vector<VideoCodec> send_codecs_;
540 std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*> sinks_; 539 std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*> sinks_;
541 std::map<uint32_t, VideoCapturer*> capturers_; 540 std::map<uint32_t, VideoCapturer*> capturers_;
542 VideoOptions options_; 541 VideoOptions options_;
543 int max_bps_; 542 int max_bps_;
544 }; 543 };
545 544
545 class DataOptions {};
pbos-webrtc 2016/03/15 18:40:15 Is this necessary? If so put a comment.
nisse-webrtc 2016/03/16 08:17:03 The DataTraits templatery in channel_unittest.cc w
546 class FakeDataMediaChannel : public RtpHelper<DataMediaChannel> { 546 class FakeDataMediaChannel : public RtpHelper<DataMediaChannel> {
547 public: 547 public:
548 explicit FakeDataMediaChannel(void* unused, const DataOptions& options) 548 explicit FakeDataMediaChannel(void* unused, const DataOptions& options)
549 : send_blocked_(false), max_bps_(-1) {} 549 : send_blocked_(false), max_bps_(-1) {}
550 ~FakeDataMediaChannel() {} 550 ~FakeDataMediaChannel() {}
551 const std::vector<DataCodec>& recv_codecs() const { return recv_codecs_; } 551 const std::vector<DataCodec>& recv_codecs() const { return recv_codecs_; }
552 const std::vector<DataCodec>& send_codecs() const { return send_codecs_; } 552 const std::vector<DataCodec>& send_codecs() const { return send_codecs_; }
553 const std::vector<DataCodec>& codecs() const { return send_codecs(); } 553 const std::vector<DataCodec>& codecs() const { return send_codecs(); }
554 int max_bps() const { return max_bps_; } 554 int max_bps() const { return max_bps_; }
555 555
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 866
867 private: 867 private:
868 std::vector<FakeDataMediaChannel*> channels_; 868 std::vector<FakeDataMediaChannel*> channels_;
869 std::vector<DataCodec> data_codecs_; 869 std::vector<DataCodec> data_codecs_;
870 DataChannelType last_channel_type_; 870 DataChannelType last_channel_type_;
871 }; 871 };
872 872
873 } // namespace cricket 873 } // namespace cricket
874 874
875 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ 875 #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_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698