Chromium Code Reviews| 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..50d688ae8595432f17a089bdd6eb9e7fc4ea2a69 100644 |
| --- a/content/renderer/media/media_recorder_handler.h |
| +++ b/content/renderer/media/media_recorder_handler.h |
| @@ -8,7 +8,6 @@ |
| #include "base/compiler_specific.h" |
| #include "base/memory/scoped_vector.h" |
| #include "base/memory/weak_ptr.h" |
| -#include "base/strings/string_piece.h" |
| #include "base/threading/thread_checker.h" |
| #include "content/common/content_export.h" |
| #include "third_party/WebKit/public/platform/WebMediaRecorderHandler.h" |
| @@ -28,22 +27,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 +57,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(scoped_ptr<std::string> data); |
|
miu
2015/09/22 04:11:08
FWICT, there was no need to change the WriteData()
mcasas
2015/09/22 16:58:40
Acknowledged.
|
| void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame, |
| const base::TimeTicks& timestamp); |