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

Unified Diff: webrtc/video/video_receive_stream.h

Issue 2303273002: Expose Ivf logging through the native API (Closed)
Patch Set: Nit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_quality_test.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_receive_stream.h
diff --git a/webrtc/video/video_receive_stream.h b/webrtc/video/video_receive_stream.h
index 3cffb4b38585e83f8300c9b649ac7372e05d1e1f..416cfe993cc29d959d94e318d85da626e994b697 100644
--- a/webrtc/video/video_receive_stream.h
+++ b/webrtc/video/video_receive_stream.h
@@ -84,6 +84,14 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream,
// Implements KeyFrameRequestSender.
void RequestKeyFrame() override;
+ // Takes ownership of the file, is responsible for closing it later.
+ // Calling this method will close and finalize any current log.
+ // Giving rtc::kInvalidPlatformFileValue disables logging.
+ // If a frame to be written would make the log too large the write fails and
+ // the log is closed and finalized. A |byte_limit| of 0 means no limit.
+ void EnableEncodedFrameRecording(rtc::PlatformFile file,
+ size_t byte_limit) override;
+
private:
static bool DecodeThreadFunction(void* ptr);
void Decode();
@@ -105,7 +113,8 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream,
std::unique_ptr<VideoStreamDecoder> video_stream_decoder_;
RtpStreamsSynchronizer rtp_stream_sync_;
- std::unique_ptr<IvfFileWriter> ivf_writer_;
+ rtc::CriticalSection ivf_writer_lock_;
+ std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_);
};
} // namespace internal
} // namespace webrtc
« no previous file with comments | « webrtc/video/video_quality_test.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698