1syntax = "proto2";
2
3package android.os.statsd.media;
4
5import "frameworks/proto_logging/stats/atom_field_options.proto";
6import "frameworks/proto_logging/stats/enums/media/drm/enums.proto";
7
8option java_package = "com.android.os.media";
9
10/**
11 * Logs when a MediaDrm object is created.
12 *
13 * Logged from:
14 *   frameworks/av/drm/libmediadrm/DrmHal.cpp
15 */
16message MediaDrmCreated {
17  // Crypto scheme & UUID.
18  // Please see https://dashif.org/identifiers/content_protection/.
19  optional android.media.drm.DrmScheme scheme = 1;
20  optional int64 uuid_lsb = 2;
21  optional int64 uuid_msb = 3;
22  // App uid.
23  optional int32 uid = 4 [(is_uid) = true];
24  // DRM library (MediaDrm, NdkMediaDrm, or MediaPlayer).
25  optional android.media.drm.IDrmFrontend frontend = 5;
26  // MediaDrm#PROPERTY_VERSION.
27  optional string version = 6;
28}
29
30/**
31 * Logs when a MediaDrm object encountered an error.
32 *
33 * Logged from:
34 *   frameworks/av/drm/libmediadrm/DrmHal.cpp
35 */
36message MediaDrmErrored {
37  // Crypto scheme & UUID.
38  // Please see https://dashif.org/identifiers/content_protection/.
39  optional android.media.drm.DrmScheme scheme = 1;
40  optional int64 uuid_lsb = 2;
41  optional int64 uuid_msb = 3;
42  // App uid.
43  optional int32 uid = 4 [(is_uid) = true];
44  // DRM library (MediaDrm, NdkMediaDrm, or MediaPlayer).
45  optional android.media.drm.IDrmFrontend frontend = 5;
46  // MediaDrm#PROPERTY_VERSION.
47  optional string version = 6;
48  // Base64 encoding of a randomly generated, globally unique 128 bit number
49  // tied to a MediaDrm object; it has no device or user association.
50  optional string object_nonce = 7;
51  // Base64 encoding of a randomly generated, globally unique 128 bit number
52  // tied to a MediaDrm session; it has no device or user association.
53  optional string session_nonce = 8;
54  // Security level of the opened session.
55  optional android.media.drm.SecurityLevel security_level = 9;
56  // The API that triggered the error.
57  optional android.media.drm.DrmApi api = 10;
58  // The encountered framework error.
59  optional android.media.drm.Status error_code = 11;
60  // Underlying plugin-specific (content decryption module) error.
61  optional int32 cdm_err = 12;
62  // Underlying OEM-specific error.
63  optional int32 oem_err = 13;
64  // Plugin-specific (cdm) error context.
65  optional int32 error_context = 14;
66}
67
68/**
69 * Logs when a MediaDrm session is opened.
70 *
71 * Logged from:
72 *   frameworks/av/drm/libmediadrm/DrmHal.cpp
73 */
74message MediaDrmSessionOpened {
75  // Crypto scheme & UUID.
76  // Please see https://dashif.org/identifiers/content_protection/.
77  optional android.media.drm.DrmScheme scheme = 1;
78  optional int64 uuid_lsb = 2;
79  optional int64 uuid_msb = 3;
80  // App uid.
81  optional int32 uid = 4 [(is_uid) = true];
82  // DRM library (MediaDrm, NdkMediaDrm, or MediaPlayer).
83  optional android.media.drm.IDrmFrontend frontend = 5;
84  // MediaDrm#PROPERTY_VERSION.
85  optional string version = 6;
86  // Base64 encoding of a randomly generated, globally unique 128 bit number
87  // tied to a MediaDrm object; it has no device or user association.
88  optional string object_nonce = 7;
89  // Input security level to MediaDrm#openSession.
90  optional android.media.drm.SecurityLevel requested_security_level = 8;
91  // Actual security level of the opened session.
92  optional android.media.drm.SecurityLevel opened_security_level = 9;
93}
94
95/**
96 * Logs when a MediaDrm session is closed.
97 *
98 * Logged from:
99 *   frameworks/av/drm/libmediadrm/DrmHal.cpp
100 */
101message MediaDrmSessionClosed {
102  // Crypto scheme & UUID.
103  // Please see https://dashif.org/identifiers/content_protection/.
104  optional android.media.drm.DrmScheme scheme = 1;
105  optional int64 uuid_lsb = 2;
106  optional int64 uuid_msb = 3;
107  // App uid.
108  optional int32 uid = 4 [(is_uid) = true];
109  // DRM library (MediaDrm, NdkMediaDrm, or MediaPlayer).
110  optional android.media.drm.IDrmFrontend frontend = 5;
111  // MediaDrm#PROPERTY_VERSION.
112  optional string version = 6;
113  // Base64 encoding of a randomly generated, globally unique 128 bit number
114  // tied to a MediaDrm object; it has no device or user association.
115  optional string object_nonce  = 7;
116  // Base64 encoding of a randomly generated, globally unique 128 bit number
117  // tied to a MediaDrm session; it has no device or user association.
118  optional string session_nonce = 8;
119  // Security level of the opened session.
120  optional android.media.drm.SecurityLevel opened_security_level = 9;
121  // Duration between session open-close in milliseconds.
122  optional int64 session_lifespan_ms = 10;
123}
124
125