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

Side by Side Diff: third_party/WebKit/public/platform/WebMediaRecorderHandler.h

Issue 1534553003: MediaRecorder: correct MIME type parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi@s comments Created 5 years 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebMediaRecorderHandler_h 5 #ifndef WebMediaRecorderHandler_h
6 #define WebMediaRecorderHandler_h 6 #define WebMediaRecorderHandler_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class WebMediaRecorderHandlerClient; 12 class WebMediaRecorderHandlerClient;
13 class WebMediaStream; 13 class WebMediaStream;
14 class WebString; 14 class WebString;
15 15
16 // Platform interface of a MediaRecorder. 16 // Platform interface of a MediaRecorder.
17 class BLINK_PLATFORM_EXPORT WebMediaRecorderHandler { 17 class BLINK_PLATFORM_EXPORT WebMediaRecorderHandler {
18 public: 18 public:
19 virtual ~WebMediaRecorderHandler() = default; 19 virtual ~WebMediaRecorderHandler() = default;
20 virtual bool initialize(WebMediaRecorderHandlerClient* client, const WebMedi aStream& stream, const WebString& mimeType) { return false; } 20 virtual bool initialize(WebMediaRecorderHandlerClient* client, const WebMedi aStream& stream, const WebString& type, const WebString& codecs) { return false; }
21 virtual bool start() { return false; } 21 virtual bool start() { return false; }
22 virtual bool start(int timeslice) { return false; } 22 virtual bool start(int timeslice) { return false; }
23 virtual void stop() {} 23 virtual void stop() {}
24 virtual void pause() {} 24 virtual void pause() {}
25 virtual void resume() {} 25 virtual void resume() {}
26 26
27 // MediaRecorder API canRecordMimeType() is a tristate in which the returned 27 // MediaRecorder API isTypeSupported(), which boils down to
28 // value 'probably' means that "the user agent is confident that mimeType 28 // canSupportMimeType() [1] "If true is returned from this method, it only
29 // represents a type that it can record" [1], but a number of reasons might 29 // indicates that the MediaRecorder implementation is capable of recording
30 // prevent a firm answer at this stage, so a boolean is a better option, 30 // Blob objects for the specified MIME type. Recording may still fail if
31 // because "Implementors are encouraged to return "maybe" unless the type 31 // sufficient resources are not available to support the concrete media
32 // can be confidently established as being supported or not." [1]. 32 // encoding."
33 // [1] https://w3c.github.io/mediacapture-record/MediaRecorder.html#methods 33 // [1] https://w3c.github.io/mediacapture-record/MediaRecorder.html#methods
34 virtual bool canSupportMimeType(const WebString& mimeType) { return false; } 34 virtual bool canSupportMimeType(const WebString& type, const WebString& code cs) { return false; }
35 }; 35 };
36 36
37 } // namespace blink 37 } // namespace blink
38 38
39 #endif // WebMediaRecorderHandler_h 39 #endif // WebMediaRecorderHandler_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698