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

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

Issue 1351473006: WebmMuxer-MediaRecorderHandler: thread hopping and data ownership (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: miu@s comments Created 5 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 | « no previous file | content/renderer/media/media_recorder_handler.cc » ('j') | media/capture/webm_muxer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_recorder_handler.h
diff --git a/content/renderer/media/media_recorder_handler.h b/content/renderer/media/media_recorder_handler.h
index a97843bba757f81ed06da8c691718b4bf3962300..493f4d4d3fe598e42ceca019e2304994b26e89dd 100644
--- a/content/renderer/media/media_recorder_handler.h
+++ b/content/renderer/media/media_recorder_handler.h
@@ -28,22 +28,23 @@ namespace content {
class VideoTrackRecorder;
-// MediaRecorderHandler orchestrates the creation, lifetime mgmt and mapping
-// between:
+// MediaRecorderHandler orchestrates the creation, lifetime management and
+// mapping between:
// - MediaStreamTrack(s) providing data,
// - {Audio,Video}TrackRecorders encoding that data,
// - a WebmMuxer class multiplexing encoded data into a WebM container, and
// - a single recorder client receiving this contained data.
// All methods are called on the same thread as construction and destruction,
-// i.e. the Main Render thread.
-// TODO(mcasas): Implement audio recording.
+// i.e. the Main Render thread. (Note that a BindToCurrentLoop is used to
+// guarantee this, since VideoTrackRecorder sends back frames on IO thread.)
+// TODO(mcasas): http://crbug.com/528519 Implement audio recording.
class CONTENT_EXPORT MediaRecorderHandler final
: public NON_EXPORTED_BASE(blink::WebMediaRecorderHandler) {
public:
MediaRecorderHandler();
~MediaRecorderHandler() override;
- // See above, these methods should override blink::WebMediaRecorderHandler.
+ // blink::WebMediaRecorderHandler.
bool canSupportMimeType(const blink::WebString& mimeType) override;
bool initialize(blink::WebMediaRecorderHandlerClient* client,
const blink::WebMediaStream& media_stream,
@@ -57,6 +58,10 @@ class CONTENT_EXPORT MediaRecorderHandler final
private:
friend class MediaRecorderHandlerTest;
+ void OnEncodedVideo(const scoped_refptr<media::VideoFrame>& video_frame,
+ scoped_ptr<std::string> encoded_data,
+ base::TimeTicks timestamp,
+ bool is_key_frame);
void WriteData(const base::StringPiece& data);
void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame,
« no previous file with comments | « no previous file | content/renderer/media/media_recorder_handler.cc » ('j') | media/capture/webm_muxer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698