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

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: 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 * 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 bool rendering() const { return playout(); } 436 bool rendering() const { return playout(); }
437 const VideoOptions& options() const { return options_; } 437 const VideoOptions& options() const { return options_; }
438 const std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*>& sinks() 438 const std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*>& sinks()
439 const { 439 const {
440 return sinks_; 440 return sinks_;
441 } 441 }
442 int max_bps() const { return max_bps_; } 442 int max_bps() const { return max_bps_; }
443 virtual bool SetSendParameters(const VideoSendParameters& params) { 443 virtual bool SetSendParameters(const VideoSendParameters& params) {
444 return (SetSendCodecs(params.codecs) && 444 return (SetSendCodecs(params.codecs) &&
445 SetSendRtpHeaderExtensions(params.extensions) && 445 SetSendRtpHeaderExtensions(params.extensions) &&
446 SetMaxSendBandwidth(params.max_bandwidth_bps) && 446 SetMaxSendBandwidth(params.max_bandwidth_bps));
447 SetOptions(params.options));
448 } 447 }
449 448
450 virtual bool SetRecvParameters(const VideoRecvParameters& params) { 449 virtual bool SetRecvParameters(const VideoRecvParameters& params) {
451 return (SetRecvCodecs(params.codecs) && 450 return (SetRecvCodecs(params.codecs) &&
452 SetRecvRtpHeaderExtensions(params.extensions)); 451 SetRecvRtpHeaderExtensions(params.extensions));
453 } 452 }
454 virtual bool AddSendStream(const StreamParams& sp) { 453 virtual bool AddSendStream(const StreamParams& sp) {
455 return RtpHelper<VideoMediaChannel>::AddSendStream(sp); 454 return RtpHelper<VideoMediaChannel>::AddSendStream(sp);
456 } 455 }
457 virtual bool RemoveSendStream(uint32_t ssrc) { 456 virtual bool RemoveSendStream(uint32_t ssrc) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 537
539 FakeVideoEngine* engine_; 538 FakeVideoEngine* engine_;
540 std::vector<VideoCodec> recv_codecs_; 539 std::vector<VideoCodec> recv_codecs_;
541 std::vector<VideoCodec> send_codecs_; 540 std::vector<VideoCodec> send_codecs_;
542 std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*> sinks_; 541 std::map<uint32_t, rtc::VideoSinkInterface<VideoFrame>*> sinks_;
543 std::map<uint32_t, VideoCapturer*> capturers_; 542 std::map<uint32_t, VideoCapturer*> capturers_;
544 VideoOptions options_; 543 VideoOptions options_;
545 int max_bps_; 544 int max_bps_;
546 }; 545 };
547 546
547 class DataOptions {};
548 class FakeDataMediaChannel : public RtpHelper<DataMediaChannel> { 548 class FakeDataMediaChannel : public RtpHelper<DataMediaChannel> {
549 public: 549 public:
550 explicit FakeDataMediaChannel(void* unused, const DataOptions& options) 550 explicit FakeDataMediaChannel(void* unused, const DataOptions& options)
551 : send_blocked_(false), max_bps_(-1) {} 551 : send_blocked_(false), max_bps_(-1) {}
552 ~FakeDataMediaChannel() {} 552 ~FakeDataMediaChannel() {}
553 const std::vector<DataCodec>& recv_codecs() const { return recv_codecs_; } 553 const std::vector<DataCodec>& recv_codecs() const { return recv_codecs_; }
554 const std::vector<DataCodec>& send_codecs() const { return send_codecs_; } 554 const std::vector<DataCodec>& send_codecs() const { return send_codecs_; }
555 const std::vector<DataCodec>& codecs() const { return send_codecs(); } 555 const std::vector<DataCodec>& codecs() const { return send_codecs(); }
556 int max_bps() const { return max_bps_; } 556 int max_bps() const { return max_bps_; }
557 557
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 868
869 private: 869 private:
870 std::vector<FakeDataMediaChannel*> channels_; 870 std::vector<FakeDataMediaChannel*> channels_;
871 std::vector<DataCodec> data_codecs_; 871 std::vector<DataCodec> data_codecs_;
872 DataChannelType last_channel_type_; 872 DataChannelType last_channel_type_;
873 }; 873 };
874 874
875 } // namespace cricket 875 } // namespace cricket
876 876
877 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ 877 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/base/mediachannel.h » ('j') | webrtc/media/base/videoengine_unittest.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698