| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 687 |
| 688 // A base class for all of the shared parts between FakeVoiceEngine | 688 // A base class for all of the shared parts between FakeVoiceEngine |
| 689 // and FakeVideoEngine. | 689 // and FakeVideoEngine. |
| 690 class FakeBaseEngine { | 690 class FakeBaseEngine { |
| 691 public: | 691 public: |
| 692 FakeBaseEngine() | 692 FakeBaseEngine() |
| 693 : options_changed_(false), | 693 : options_changed_(false), |
| 694 fail_create_channel_(false) {} | 694 fail_create_channel_(false) {} |
| 695 void set_fail_create_channel(bool fail) { fail_create_channel_ = fail; } | 695 void set_fail_create_channel(bool fail) { fail_create_channel_ = fail; } |
| 696 | 696 |
| 697 const std::vector<RtpHeaderExtension>& rtp_header_extensions() const { | 697 RtpCapabilities GetCapabilities() const { return capabilities_; } |
| 698 return rtp_header_extensions_; | |
| 699 } | |
| 700 void set_rtp_header_extensions( | 698 void set_rtp_header_extensions( |
| 701 const std::vector<RtpHeaderExtension>& extensions) { | 699 const std::vector<RtpHeaderExtension>& extensions) { |
| 702 rtp_header_extensions_ = extensions; | 700 capabilities_.header_extensions = extensions; |
| 703 } | 701 } |
| 704 | 702 |
| 705 protected: | 703 protected: |
| 706 // Flag used by optionsmessagehandler_unittest for checking whether any | 704 // Flag used by optionsmessagehandler_unittest for checking whether any |
| 707 // relevant setting has been updated. | 705 // relevant setting has been updated. |
| 708 // TODO(thaloun): Replace with explicit checks of before & after values. | 706 // TODO(thaloun): Replace with explicit checks of before & after values. |
| 709 bool options_changed_; | 707 bool options_changed_; |
| 710 bool fail_create_channel_; | 708 bool fail_create_channel_; |
| 711 std::vector<RtpHeaderExtension> rtp_header_extensions_; | 709 RtpCapabilities capabilities_; |
| 712 }; | 710 }; |
| 713 | 711 |
| 714 class FakeVoiceEngine : public FakeBaseEngine { | 712 class FakeVoiceEngine : public FakeBaseEngine { |
| 715 public: | 713 public: |
| 716 FakeVoiceEngine() | 714 FakeVoiceEngine() |
| 717 : output_volume_(-1) { | 715 : output_volume_(-1) { |
| 718 // Add a fake audio codec. Note that the name must not be "" as there are | 716 // Add a fake audio codec. Note that the name must not be "" as there are |
| 719 // sanity checks against that. | 717 // sanity checks against that. |
| 720 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); | 718 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); |
| 721 } | 719 } |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 | 969 |
| 972 private: | 970 private: |
| 973 std::vector<FakeDataMediaChannel*> channels_; | 971 std::vector<FakeDataMediaChannel*> channels_; |
| 974 std::vector<DataCodec> data_codecs_; | 972 std::vector<DataCodec> data_codecs_; |
| 975 DataChannelType last_channel_type_; | 973 DataChannelType last_channel_type_; |
| 976 }; | 974 }; |
| 977 | 975 |
| 978 } // namespace cricket | 976 } // namespace cricket |
| 979 | 977 |
| 980 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 978 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
| OLD | NEW |