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

Side by Side Diff: webrtc/media/engine/fakewebrtccall.h

Issue 2303273002: Expose Ivf logging through the native API (Closed)
Patch Set: Fix memory leak Created 4 years, 3 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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
11 // This file contains fake implementations, for use in unit tests, of the 11 // This file contains fake implementations, for use in unit tests, of the
12 // following classes: 12 // following classes:
13 // 13 //
14 // webrtc::Call 14 // webrtc::Call
15 // webrtc::AudioSendStream 15 // webrtc::AudioSendStream
16 // webrtc::AudioReceiveStream 16 // webrtc::AudioReceiveStream
17 // webrtc::VideoSendStream 17 // webrtc::VideoSendStream
18 // webrtc::VideoReceiveStream 18 // webrtc::VideoReceiveStream
19 19
20 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ 20 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_
21 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ 21 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_
22 22
23 #include <memory> 23 #include <memory>
24 #include <string>
24 #include <vector> 25 #include <vector>
25 26
26 #include "webrtc/api/call/audio_receive_stream.h" 27 #include "webrtc/api/call/audio_receive_stream.h"
27 #include "webrtc/api/call/audio_send_stream.h" 28 #include "webrtc/api/call/audio_send_stream.h"
28 #include "webrtc/base/buffer.h" 29 #include "webrtc/base/buffer.h"
29 #include "webrtc/call.h" 30 #include "webrtc/call.h"
30 #include "webrtc/video_frame.h" 31 #include "webrtc/video_frame.h"
31 #include "webrtc/video_receive_stream.h" 32 #include "webrtc/video_receive_stream.h"
32 #include "webrtc/video_send_stream.h" 33 #include "webrtc/video_send_stream.h"
33 34
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 int GetNumberOfSwappedFrames() const; 116 int GetNumberOfSwappedFrames() const;
116 int GetLastWidth() const; 117 int GetLastWidth() const;
117 int GetLastHeight() const; 118 int GetLastHeight() const;
118 int64_t GetLastTimestamp() const; 119 int64_t GetLastTimestamp() const;
119 void SetStats(const webrtc::VideoSendStream::Stats& stats); 120 void SetStats(const webrtc::VideoSendStream::Stats& stats);
120 int num_encoder_reconfigurations() const { 121 int num_encoder_reconfigurations() const {
121 return num_encoder_reconfigurations_; 122 return num_encoder_reconfigurations_;
122 } 123 }
123 124
125 void SetLogFiles(
126 rtc::PlatformFile file1 = rtc::kInvalidPlatformFileValue,
127 rtc::PlatformFile file2 = rtc::kInvalidPlatformFileValue,
128 rtc::PlatformFile file3 = rtc::kInvalidPlatformFileValue) override;
129
124 private: 130 private:
125 void IncomingCapturedFrame(const webrtc::VideoFrame& frame) override; 131 void IncomingCapturedFrame(const webrtc::VideoFrame& frame) override;
126 132
127 // webrtc::VideoSendStream implementation. 133 // webrtc::VideoSendStream implementation.
128 void Start() override; 134 void Start() override;
129 void Stop() override; 135 void Stop() override;
130 webrtc::VideoSendStream::Stats GetStats() override; 136 webrtc::VideoSendStream::Stats GetStats() override;
131 void ReconfigureVideoEncoder(webrtc::VideoEncoderConfig config) override; 137 void ReconfigureVideoEncoder(webrtc::VideoEncoderConfig config) override;
132 webrtc::VideoCaptureInput* Input() override; 138 webrtc::VideoCaptureInput* Input() override;
133 139
(...skipping 16 matching lines...) Expand all
150 explicit FakeVideoReceiveStream(webrtc::VideoReceiveStream::Config config); 156 explicit FakeVideoReceiveStream(webrtc::VideoReceiveStream::Config config);
151 157
152 const webrtc::VideoReceiveStream::Config& GetConfig(); 158 const webrtc::VideoReceiveStream::Config& GetConfig();
153 159
154 bool IsReceiving() const; 160 bool IsReceiving() const;
155 161
156 void InjectFrame(const webrtc::VideoFrame& frame); 162 void InjectFrame(const webrtc::VideoFrame& frame);
157 163
158 void SetStats(const webrtc::VideoReceiveStream::Stats& stats); 164 void SetStats(const webrtc::VideoReceiveStream::Stats& stats);
159 165
166 void SetLogFile(
167 rtc::PlatformFile file = rtc::kInvalidPlatformFileValue) override;
168
160 private: 169 private:
161 // webrtc::VideoReceiveStream implementation. 170 // webrtc::VideoReceiveStream implementation.
162 void Start() override; 171 void Start() override;
163 void Stop() override; 172 void Stop() override;
164 173
165 webrtc::VideoReceiveStream::Stats GetStats() const override; 174 webrtc::VideoReceiveStream::Stats GetStats() const override;
166 175
167 webrtc::VideoReceiveStream::Config config_; 176 webrtc::VideoReceiveStream::Config config_;
168 bool receiving_; 177 bool receiving_;
169 webrtc::VideoReceiveStream::Stats stats_; 178 webrtc::VideoReceiveStream::Stats stats_;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 std::vector<FakeVideoSendStream*> video_send_streams_; 254 std::vector<FakeVideoSendStream*> video_send_streams_;
246 std::vector<FakeAudioSendStream*> audio_send_streams_; 255 std::vector<FakeAudioSendStream*> audio_send_streams_;
247 std::vector<FakeVideoReceiveStream*> video_receive_streams_; 256 std::vector<FakeVideoReceiveStream*> video_receive_streams_;
248 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; 257 std::vector<FakeAudioReceiveStream*> audio_receive_streams_;
249 258
250 int num_created_send_streams_; 259 int num_created_send_streams_;
251 int num_created_receive_streams_; 260 int num_created_receive_streams_;
252 }; 261 };
253 262
254 } // namespace cricket 263 } // namespace cricket
255 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_ 264 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/fakewebrtccall.cc » ('j') | webrtc/modules/video_coding/utility/ivf_file_writer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698