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

Side by Side Diff: talk/media/base/mediaengine.h

Issue 1413483003: Added option to specify a maximum file size when recording an AEC dump. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed more review comments. Created 5 years, 1 month 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 * 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 virtual const std::vector<RtpHeaderExtension>& 112 virtual const std::vector<RtpHeaderExtension>&
113 audio_rtp_header_extensions() = 0; 113 audio_rtp_header_extensions() = 0;
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, a maximum file size in bytes can be
123 virtual bool StartAecDump(rtc::PlatformFile file) = 0; 123 // specified. Logging is stopped just before the size limit is exceeded.
124 // If max_size_bytes is set to a value <= 0, no limit will be used.
125 virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0;
124 126
125 // Starts RtcEventLog using existing file. 127 // Starts RtcEventLog using existing file.
126 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; 128 virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0;
127 129
128 // Stops recording an RtcEventLog. 130 // Stops recording an RtcEventLog.
129 virtual void StopRtcEventLog() = 0; 131 virtual void StopRtcEventLog() = 0;
130 }; 132 };
131 133
132 134
133 #if !defined(DISABLE_MEDIA_ENGINE_FACTORY) 135 #if !defined(DISABLE_MEDIA_ENGINE_FACTORY)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 return video_.rtp_header_extensions(); 216 return video_.rtp_header_extensions();
215 } 217 }
216 218
217 virtual void SetVoiceLogging(int min_sev, const char* filter) { 219 virtual void SetVoiceLogging(int min_sev, const char* filter) {
218 voice_.SetLogging(min_sev, filter); 220 voice_.SetLogging(min_sev, filter);
219 } 221 }
220 virtual void SetVideoLogging(int min_sev, const char* filter) { 222 virtual void SetVideoLogging(int min_sev, const char* filter) {
221 video_.SetLogging(min_sev, filter); 223 video_.SetLogging(min_sev, filter);
222 } 224 }
223 225
224 virtual bool StartAecDump(rtc::PlatformFile file) { 226 virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) {
225 return voice_.StartAecDump(file); 227 return voice_.StartAecDump(file, max_size_bytes);
226 } 228 }
227 229
228 virtual bool StartRtcEventLog(rtc::PlatformFile file) { 230 virtual bool StartRtcEventLog(rtc::PlatformFile file) {
229 return voice_.StartRtcEventLog(file); 231 return voice_.StartRtcEventLog(file);
230 } 232 }
231 233
232 virtual void StopRtcEventLog() { voice_.StopRtcEventLog(); } 234 virtual void StopRtcEventLog() { voice_.StopRtcEventLog(); }
233 235
234 protected: 236 protected:
235 VOICE voice_; 237 VOICE voice_;
(...skipping 19 matching lines...) Expand all
255 *level = 0; 257 *level = 0;
256 return true; 258 return true;
257 } 259 }
258 bool SetOutputVolume(int level) { return true; } 260 bool SetOutputVolume(int level) { return true; }
259 int GetInputLevel() { return 0; } 261 int GetInputLevel() { return 0; }
260 const std::vector<AudioCodec>& codecs() { return codecs_; } 262 const std::vector<AudioCodec>& codecs() { return codecs_; }
261 const std::vector<RtpHeaderExtension>& rtp_header_extensions() { 263 const std::vector<RtpHeaderExtension>& rtp_header_extensions() {
262 return rtp_header_extensions_; 264 return rtp_header_extensions_;
263 } 265 }
264 void SetLogging(int min_sev, const char* filter) {} 266 void SetLogging(int min_sev, const char* filter) {}
265 bool StartAecDump(rtc::PlatformFile file) { return false; } 267 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) {
268 return false;
269 }
266 bool StartRtcEventLog(rtc::PlatformFile file) { return false; } 270 bool StartRtcEventLog(rtc::PlatformFile file) { return false; }
267 void StopRtcEventLog() {} 271 void StopRtcEventLog() {}
268 272
269 private: 273 private:
270 std::vector<AudioCodec> codecs_; 274 std::vector<AudioCodec> codecs_;
271 std::vector<RtpHeaderExtension> rtp_header_extensions_; 275 std::vector<RtpHeaderExtension> rtp_header_extensions_;
272 }; 276 };
273 277
274 // NullVideoEngine can be used with CompositeMediaEngine in the case where only 278 // NullVideoEngine can be used with CompositeMediaEngine in the case where only
275 // a voice engine is desired. 279 // a voice engine is desired.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 class DataEngineInterface { 313 class DataEngineInterface {
310 public: 314 public:
311 virtual ~DataEngineInterface() {} 315 virtual ~DataEngineInterface() {}
312 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; 316 virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0;
313 virtual const std::vector<DataCodec>& data_codecs() = 0; 317 virtual const std::vector<DataCodec>& data_codecs() = 0;
314 }; 318 };
315 319
316 } // namespace cricket 320 } // namespace cricket
317 321
318 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_ 322 #endif // TALK_MEDIA_BASE_MEDIAENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698