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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 virtual const std::vector<VideoCodec>& video_codecs() = 0; | 114 virtual const std::vector<VideoCodec>& video_codecs() = 0; |
115 virtual const std::vector<RtpHeaderExtension>& | 115 virtual const std::vector<RtpHeaderExtension>& |
116 video_rtp_header_extensions() = 0; | 116 video_rtp_header_extensions() = 0; |
117 | 117 |
118 // Logging control | 118 // Logging control |
119 virtual void SetVoiceLogging(int min_sev, const char* filter) = 0; | 119 virtual void SetVoiceLogging(int min_sev, const char* filter) = 0; |
120 virtual void SetVideoLogging(int min_sev, const char* filter) = 0; | 120 virtual void SetVideoLogging(int min_sev, const char* filter) = 0; |
121 | 121 |
122 // Starts AEC dump using existing file. | 122 // Starts AEC dump using existing file. |
123 virtual bool StartAecDump(rtc::PlatformFile file) = 0; | 123 virtual bool StartAecDump(rtc::PlatformFile file) = 0; |
| 124 |
| 125 // Starts RtcEventLog using existing file. |
| 126 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; |
| 127 |
| 128 // Stops recording an RtcEventLog. |
| 129 virtual void StopRtcEventLog() = 0; |
124 }; | 130 }; |
125 | 131 |
126 | 132 |
127 #if !defined(DISABLE_MEDIA_ENGINE_FACTORY) | 133 #if !defined(DISABLE_MEDIA_ENGINE_FACTORY) |
128 class MediaEngineFactory { | 134 class MediaEngineFactory { |
129 public: | 135 public: |
130 typedef cricket::MediaEngineInterface* (*MediaEngineCreateFunction)(); | 136 typedef cricket::MediaEngineInterface* (*MediaEngineCreateFunction)(); |
131 // Creates a media engine, using either the compiled system default or the | 137 // Creates a media engine, using either the compiled system default or the |
132 // creation function specified in SetCreateFunction, if specified. | 138 // creation function specified in SetCreateFunction, if specified. |
133 static MediaEngineInterface* Create(); | 139 static MediaEngineInterface* Create(); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 voice_.SetLogging(min_sev, filter); | 218 voice_.SetLogging(min_sev, filter); |
213 } | 219 } |
214 virtual void SetVideoLogging(int min_sev, const char* filter) { | 220 virtual void SetVideoLogging(int min_sev, const char* filter) { |
215 video_.SetLogging(min_sev, filter); | 221 video_.SetLogging(min_sev, filter); |
216 } | 222 } |
217 | 223 |
218 virtual bool StartAecDump(rtc::PlatformFile file) { | 224 virtual bool StartAecDump(rtc::PlatformFile file) { |
219 return voice_.StartAecDump(file); | 225 return voice_.StartAecDump(file); |
220 } | 226 } |
221 | 227 |
| 228 virtual bool StartRtcEventLog(rtc::PlatformFile file) { |
| 229 return voice_.StartRtcEventLog(file); |
| 230 } |
| 231 |
| 232 virtual void StopRtcEventLog() { voice_.StopRtcEventLog(); } |
| 233 |
222 protected: | 234 protected: |
223 VOICE voice_; | 235 VOICE voice_; |
224 VIDEO video_; | 236 VIDEO video_; |
225 }; | 237 }; |
226 | 238 |
227 // NullVoiceEngine can be used with CompositeMediaEngine in the case where only | 239 // NullVoiceEngine can be used with CompositeMediaEngine in the case where only |
228 // a video engine is desired. | 240 // a video engine is desired. |
229 class NullVoiceEngine { | 241 class NullVoiceEngine { |
230 public: | 242 public: |
231 bool Init(rtc::Thread* worker_thread) { return true; } | 243 bool Init(rtc::Thread* worker_thread) { return true; } |
(...skipping 12 matching lines...) Expand all Loading... |
244 return true; | 256 return true; |
245 } | 257 } |
246 bool SetOutputVolume(int level) { return true; } | 258 bool SetOutputVolume(int level) { return true; } |
247 int GetInputLevel() { return 0; } | 259 int GetInputLevel() { return 0; } |
248 const std::vector<AudioCodec>& codecs() { return codecs_; } | 260 const std::vector<AudioCodec>& codecs() { return codecs_; } |
249 const std::vector<RtpHeaderExtension>& rtp_header_extensions() { | 261 const std::vector<RtpHeaderExtension>& rtp_header_extensions() { |
250 return rtp_header_extensions_; | 262 return rtp_header_extensions_; |
251 } | 263 } |
252 void SetLogging(int min_sev, const char* filter) {} | 264 void SetLogging(int min_sev, const char* filter) {} |
253 bool StartAecDump(rtc::PlatformFile file) { return false; } | 265 bool StartAecDump(rtc::PlatformFile file) { return false; } |
| 266 bool StartRtcEventLog(rtc::PlatformFile file) { return false; } |
| 267 void StopRtcEventLog() {} |
254 | 268 |
255 private: | 269 private: |
256 std::vector<AudioCodec> codecs_; | 270 std::vector<AudioCodec> codecs_; |
257 std::vector<RtpHeaderExtension> rtp_header_extensions_; | 271 std::vector<RtpHeaderExtension> rtp_header_extensions_; |
258 }; | 272 }; |
259 | 273 |
260 // NullVideoEngine can be used with CompositeMediaEngine in the case where only | 274 // NullVideoEngine can be used with CompositeMediaEngine in the case where only |
261 // a voice engine is desired. | 275 // a voice engine is desired. |
262 class NullVideoEngine { | 276 class NullVideoEngine { |
263 public: | 277 public: |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 class DataEngineInterface { | 309 class DataEngineInterface { |
296 public: | 310 public: |
297 virtual ~DataEngineInterface() {} | 311 virtual ~DataEngineInterface() {} |
298 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 312 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; |
299 virtual const std::vector<DataCodec>& data_codecs() = 0; | 313 virtual const std::vector<DataCodec>& data_codecs() = 0; |
300 }; | 314 }; |
301 | 315 |
302 } // namespace cricket | 316 } // namespace cricket |
303 | 317 |
304 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_ | 318 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_ |
OLD | NEW |