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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 VoiceProcessor* tx_processor_; | 849 VoiceProcessor* tx_processor_; |
850 AudioOptions options_; | 850 AudioOptions options_; |
851 | 851 |
852 friend class FakeMediaEngine; | 852 friend class FakeMediaEngine; |
853 }; | 853 }; |
854 | 854 |
855 class FakeVideoEngine : public FakeBaseEngine { | 855 class FakeVideoEngine : public FakeBaseEngine { |
856 public: | 856 public: |
857 FakeVideoEngine() : FakeVideoEngine(nullptr) {} | 857 FakeVideoEngine() : FakeVideoEngine(nullptr) {} |
858 explicit FakeVideoEngine(FakeVoiceEngine* voice) | 858 explicit FakeVideoEngine(FakeVoiceEngine* voice) |
859 : capture_(false), processor_(NULL) { | 859 : capture_(false) { |
860 // Add a fake video codec. Note that the name must not be "" as there are | 860 // Add a fake video codec. Note that the name must not be "" as there are |
861 // sanity checks against that. | 861 // sanity checks against that. |
862 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); | 862 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); |
863 } | 863 } |
864 void Init() {} | 864 void Init() {} |
865 bool GetOptions(VideoOptions* options) const { | 865 bool GetOptions(VideoOptions* options) const { |
866 *options = options_; | 866 *options = options_; |
867 return true; | 867 return true; |
868 } | 868 } |
869 bool SetOptions(const VideoOptions& options) { | 869 bool SetOptions(const VideoOptions& options) { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 capture_ = capture; | 918 capture_ = capture; |
919 return true; | 919 return true; |
920 } | 920 } |
921 | 921 |
922 private: | 922 private: |
923 std::vector<FakeVideoMediaChannel*> channels_; | 923 std::vector<FakeVideoMediaChannel*> channels_; |
924 std::vector<VideoCodec> codecs_; | 924 std::vector<VideoCodec> codecs_; |
925 VideoEncoderConfig default_encoder_config_; | 925 VideoEncoderConfig default_encoder_config_; |
926 std::string in_device_; | 926 std::string in_device_; |
927 bool capture_; | 927 bool capture_; |
928 VideoProcessor* processor_; | |
929 VideoOptions options_; | 928 VideoOptions options_; |
930 | 929 |
931 friend class FakeMediaEngine; | 930 friend class FakeMediaEngine; |
932 }; | 931 }; |
933 | 932 |
934 class FakeMediaEngine : | 933 class FakeMediaEngine : |
935 public CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine> { | 934 public CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine> { |
936 public: | 935 public: |
937 FakeMediaEngine() { | 936 FakeMediaEngine() { |
938 voice_ = FakeVoiceEngine(); | 937 voice_ = FakeVoiceEngine(); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 | 1052 |
1054 private: | 1053 private: |
1055 std::vector<FakeDataMediaChannel*> channels_; | 1054 std::vector<FakeDataMediaChannel*> channels_; |
1056 std::vector<DataCodec> data_codecs_; | 1055 std::vector<DataCodec> data_codecs_; |
1057 DataChannelType last_channel_type_; | 1056 DataChannelType last_channel_type_; |
1058 }; | 1057 }; |
1059 | 1058 |
1060 } // namespace cricket | 1059 } // namespace cricket |
1061 | 1060 |
1062 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 1061 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |