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

Unified Diff: webrtc/video/video_receive_stream.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 side-by-side diff with in-line comments
Download patch
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..f13406c51b24f4d62373f6258c0113c5f4b04dc3 100644
--- a/webrtc/video/video_receive_stream.h
+++ b/webrtc/video/video_receive_stream.h
@@ -84,6 +84,12 @@ 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.
+ void SetLogFile(
+ rtc::PlatformFile file = rtc::kInvalidPlatformFileValue) override;
sprang_webrtc 2016/09/04 14:48:48 I think this needs a more descriptive name. Someth
+
private:
static bool DecodeThreadFunction(void* ptr);
void Decode();
@@ -105,6 +111,7 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream,
std::unique_ptr<VideoStreamDecoder> video_stream_decoder_;
RtpStreamsSynchronizer rtp_stream_sync_;
+ rtc::CriticalSection ivf_writer_crit_;
sprang_webrtc 2016/09/04 14:48:48 I personally prefer lock as name, rather than crit
std::unique_ptr<IvfFileWriter> ivf_writer_;
sprang_webrtc 2016/09/04 14:48:48 add GUARDED_BY
};
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698