Skip to content

Commit

Permalink
Update starboard media header description
Browse files Browse the repository at this point in the history
This PR updates the description in drm.h, decode_target.h, media.h, and player.h.

b/326450058
  • Loading branch information
borongc committed Apr 17, 2024
1 parent 324b566 commit 69150a7
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions starboard/drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ typedef enum SbDrmStatus {
kSbDrmStatusNotSupportedError,
kSbDrmStatusInvalidStateError,
kSbDrmStatusQuotaExceededError,
// The following error can be used when the error status cannot be mapped to
// one of the above errors.
// The kSbDrmStatusUnknownError can be used when the error status cannot be
// mapped to one of the rest errors.
kSbDrmStatusUnknownError,
} SbDrmStatus;

// Status of a particular media key.
// https://w3c.github.io/encrypted-media/#idl-def-MediaKeyStatus
// https://www.w3.org/TR/encrypted-media/#idl-def-mediakeystatus
typedef enum SbDrmKeyStatus {
kSbDrmKeyStatusUsable,
kSbDrmKeyStatusExpired,
Expand Down Expand Up @@ -180,8 +180,14 @@ typedef void (*SbDrmSessionUpdatedFunc)(SbDrmSystem drm_system,
int session_id_size);

// A callback for notifications that the status of one or more keys in a session
// has been changed. All keys of the session and their new status will be
// passed along. Any keys not in the list is considered as deleted.
// has been changed. All keys |key_ids| of the session and their new status
// will be passed along. Any keys not in the list are considered as deleted.
//
// |number_of_keys| is the number of keys.
//
// |key_ids| is a pointer of a vector contains keys.
//
// |key_statuses| is a pointer of a vector contains the status of each key.
typedef void (*SbDrmSessionKeyStatusesChangedFunc)(
SbDrmSystem drm_system,
void* context,
Expand All @@ -191,7 +197,7 @@ typedef void (*SbDrmSessionKeyStatusesChangedFunc)(
const SbDrmKeyId* key_ids,
const SbDrmKeyStatus* key_statuses);

// A callback for signalling that a session has been closed by the SbDrmSystem
// A callback for signalling that a session has been closed by the SbDrmSystem.
typedef void (*SbDrmSessionClosedFunc)(SbDrmSystem drm_system,
void* context,
const void* session_id,
Expand Down Expand Up @@ -294,9 +300,11 @@ SB_EXPORT SbDrmSystem SbDrmCreateSystem(
// used.
//
// |type|: The case-sensitive type of the session update request payload. Must
// not be NULL.
// not be NULL.
//
// |initialization_data|: The data for which the session update
// request payload is created. Must not be NULL.
// request payload is created. Must not be NULL.
//
// |initialization_data_size|: The size of the session update request payload.
SB_EXPORT void SbDrmGenerateSessionUpdateRequest(
SbDrmSystem drm_system,
Expand Down Expand Up @@ -353,14 +361,17 @@ SB_EXPORT bool SbDrmIsServerCertificateUpdatable(SbDrmSystem drm_system);
// |SbDrmIsServerCertificateUpdatable| is called first and returned true.
//
// |drm_system|: The DRM system whose server certificate is being updated. Must
// not be |kSbDrmSystemInvalid|.
// not be |kSbDrmSystemInvalid|.
//
// |ticket|: The opaque ID that allows to distinguish callbacks from multiple
// concurrent calls to SbDrmUpdateServerCertificate(), which will be passed to
// |server_certificate_updated_callback| as-is. It is the responsibility of
// the caller to establish ticket uniqueness, issuing multiple requests with
// the same ticket may result in undefined behavior. The value
// |kSbDrmTicketInvalid| must not be used.
// concurrent calls to SbDrmUpdateServerCertificate(), which will be passed to
// |server_certificate_updated_callback| as-is. It is the responsibility of
// the caller to establish ticket uniqueness, issuing multiple requests with
// the same ticket may result in undefined behavior. The value
// |kSbDrmTicketInvalid| must not be used.
//
// |certificate|: Pointer to the server certificate data. Must not be NULL.
//
// |certificate_size|: Size of the server certificate data.
SB_EXPORT void SbDrmUpdateServerCertificate(SbDrmSystem drm_system,
int ticket,
Expand Down

0 comments on commit 69150a7

Please sign in to comment.