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

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: StringPiece passed by value 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') | no next file with comments »
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..db6b12b3efd81c8c2b973d6d8e4c466fa16f3964 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,7 +58,11 @@ class CONTENT_EXPORT MediaRecorderHandler final
private:
friend class MediaRecorderHandlerTest;
- void WriteData(const base::StringPiece& data);
+ void OnEncodedVideo(const scoped_refptr<media::VideoFrame>& video_frame,
+ scoped_ptr<std::string> encoded_data,
+ base::TimeTicks timestamp,
+ bool is_key_frame);
+ void WriteData(base::StringPiece data);
void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame,
const base::TimeTicks& timestamp);
« no previous file with comments | « no previous file | content/renderer/media/media_recorder_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698