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

Unified Diff: content/renderer/media/recorder/media_recorder_handler.h

Issue 2697703003: MediaRecorder: make sure ondataavailable+onstop events are fired before onerror (Closed)
Patch Set: Created 3 years, 10 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: content/renderer/media/recorder/media_recorder_handler.h
diff --git a/content/renderer/media/recorder/media_recorder_handler.h b/content/renderer/media/recorder/media_recorder_handler.h
index 58d3d6ffc6382ef8f2817a4b80306ba9a7594ee0..e3522171c0e4745cb7dcbd68f0475d4737f3a514 100644
--- a/content/renderer/media/recorder/media_recorder_handler.h
+++ b/content/renderer/media/recorder/media_recorder_handler.h
@@ -74,6 +74,9 @@ class CONTENT_EXPORT MediaRecorderHandler final
base::TimeTicks timestamp);
void WriteData(base::StringPiece data);
+ // Updates |media_stream_num_tracks_| and returns true if it has changed.
+ bool CheckAndUpdateAmountOfTracks();
+
void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame,
const base::TimeTicks& timestamp);
void OnAudioBusForTesting(const media::AudioBus& audio_bus,
@@ -98,6 +101,7 @@ class CONTENT_EXPORT MediaRecorderHandler final
bool recording_;
blink::WebMediaStream media_stream_; // The MediaStream being recorded.
+ size_t media_stream_num_tracks_;
// |client_| is a weak pointer, and is valid for the lifetime of this object.
blink::WebMediaRecorderHandlerClient* client_;

Powered by Google App Engine
This is Rietveld 408576698