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

Unified Diff: media/muxers/webm_muxer.h

Issue 1830383003: WebmMuxer: add Pause()/Resume() methods and internal time-in-pause (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « content/renderer/media/media_recorder_handler.cc ('k') | media/muxers/webm_muxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/muxers/webm_muxer.h
diff --git a/media/muxers/webm_muxer.h b/media/muxers/webm_muxer.h
index 227ce5622fddc9d1ec65921d0fe1e87cd266dd4b..47141844978f5697cf8037cbd4b2ede9d3360f27 100644
--- a/media/muxers/webm_muxer.h
+++ b/media/muxers/webm_muxer.h
@@ -15,6 +15,7 @@
#include "base/strings/string_piece.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
+#include "base/timer/elapsed_timer.h"
#include "media/base/media_export.h"
#include "media/base/video_codecs.h"
#include "third_party/libwebm/source/mkvmuxer.hpp"
@@ -63,6 +64,9 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
scoped_ptr<std::string> encoded_data,
base::TimeTicks timestamp);
+ void Pause();
+ void Resume();
+
private:
friend class WebmMuxerTest;
@@ -103,6 +107,10 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
base::TimeTicks first_frame_timestamp_;
base::TimeDelta most_recent_timestamp_;
+ // Variables to measure and accumulate, respectively, the time in pause state.
+ scoped_ptr<base::ElapsedTimer> elapsed_time_in_pause_;
+ base::TimeDelta total_time_in_pause_;
+
// TODO(ajose): Change these when support is added for multiple tracks.
// http://crbug.com/528523
const bool has_video_;
« no previous file with comments | « content/renderer/media/media_recorder_handler.cc ('k') | media/muxers/webm_muxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698