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

Side by Side Diff: media/base/cdm_context.h

Issue 748473002: Introduce CdmContext interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@set_cdm
Patch Set: Created 6 years, 1 month 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 | « media/base/BUILD.gn ('k') | media/base/cdm_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_BASE_CDM_CONTEXT_H_
6 #define MEDIA_BASE_CDM_CONTEXT_H_
7
8 #include "base/callback.h"
9 #include "media/base/media_export.h"
10
11 namespace media {
12
13 class Decryptor;
14
15 // An interface representing the context that a media pipeline needs from a
16 // content decryption module (CDM) to decrypt (and decode) encrypted buffers.
17 class MEDIA_EXPORT CdmContext {
18 public:
19 #if defined(ENABLE_BROWSER_CDMS)
20 static const int kInvalidCdmId = 0;
21 #endif
22
23 CdmContext();
24 virtual ~CdmContext();
25
26 // Gets the Decryptor object associated with the CDM. Returns NULL if no
27 // Decryptor object is associated. The returned object is only guaranteed
28 // to be valid during the CDM's lifetime.
29 virtual Decryptor* GetDecryptor() = 0;
30
31 #if defined(ENABLE_BROWSER_CDMS)
xhwang 2014/11/20 19:08:06 I kind of hate having this #ifdef in so many place
32 // Returns the CDM ID associated with |this|. May be kInvalidCdmId if no CDM
33 // ID is associated.
34 virtual int GetCdmId() const = 0;
35 #endif
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(CdmContext);
39 };
40
41 } // namespace media
42
43 #endif // MEDIA_BASE_CDM_CONTEXT_H_
OLDNEW
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/cdm_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698