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

Unified Diff: public/platform/WebMediaRecorderHandler.h

Issue 1255873002: MediaRecorder Blink part (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: esprehn@ last 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 | « public/platform/Platform.h ('k') | public/platform/WebMediaRecorderHandlerClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebMediaRecorderHandler.h
diff --git a/public/platform/WebMediaRecorderHandler.h b/public/platform/WebMediaRecorderHandler.h
new file mode 100644
index 0000000000000000000000000000000000000000..309f1da0af96f9c1b0ef237be3fb2655252e7256
--- /dev/null
+++ b/public/platform/WebMediaRecorderHandler.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebMediaRecorderHandler_h
+#define WebMediaRecorderHandler_h
+
+#include "WebCommon.h"
+
+namespace blink {
+
+class WebMediaRecorderHandlerClient;
+class WebMediaStream;
+class WebString;
+
+// Platform interface of a MediaRecorder.
+class BLINK_PLATFORM_EXPORT WebMediaRecorderHandler {
+public:
+ virtual ~WebMediaRecorderHandler() = default;
+ virtual bool initialize(WebMediaRecorderHandlerClient* client, const WebMediaStream& stream, const WebString& mimeType) { return false; }
+ virtual bool start() { return false; }
+ virtual bool start(int timeslice) { return false; }
+ virtual void stop() {}
+ virtual void pause() {}
+ virtual void resume() {}
+
+ // MediaRecorder API canRecordMimeType() is a tristate in which the returned
+ // value 'probably' means that "the user agent is confident that mimeType
+ // represents a type that it can record" [1], but a number of reasons might
+ // prevent a firm answer at this stage, so a boolean is a better option,
+ // because "Implementors are encouraged to return "maybe" unless the type
+ // can be confidently established as being supported or not." [1].
+ // [1] https://w3c.github.io/mediacapture-record/MediaRecorder.html#methods
+ virtual bool canSupportMimeType(const WebString& mimeType) { return false; }
+};
+
+} // namespace blink
+
+#endif // WebMediaRecorderHandler_h
« no previous file with comments | « public/platform/Platform.h ('k') | public/platform/WebMediaRecorderHandlerClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698