DrmAdpApi.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:2k
- /*
- // $Header: /I76/I76_Common/I76_Reference/Playcore/Nav_Clips/AviDrm/libDrmDecrypt/DrmAdpApi.h 2 2/15/04 7:41p Lotan $
- // Copyright (c) DivXNetworks, Inc. http://www.divxnetworks.com
- // All rights reserved.
- //
- // This software is the confidential and proprietary information of DivXNetworks
- // Inc. ("Confidential Information"). You shall not disclose such Confidential
- // Information and shall use it only in accordance with the terms of the license
- // agreement you entered into with DivXNetworks, Inc.
- */
- /*
- These functions are the top level interface to the Authorized Disconnected Playback (ADP)
- Digital Rights Management (DRM) capabilities. The names correspond to the DivX
- Authorized Disconnected Playback document and the user interface flow.
- */
- #ifndef DRMADPAPI_H_INCLUDE
- #define DRMADPAPI_H_INCLUDE
- #include "Config.h" // Global Configuration - do not remove!
- #ifdef AVI_DRM_SUPPORT
- #include "PlaycoreNav_ClipsAviDrmLibDrmCommonportable.h" /* uint8_t, uint16_t */
- #define DRM_CONTEXT_SIZE_BYTES 2226
- #define DRM_REGISTRATION_CODE_BYTES 9
- #define DRM_HEADER_SIZE_BYTES 2224
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Random number functions. */
- void drmSetRandomSample(); /* Call this at least 3 times from user input before
- call to drmGetRegistrationCode or drmInitPlayback. */
- uint32_t drmGetRandomSampleCounter(); /* Can be useful for making sure you have
- enough random samples. */
- /* Owner Registration Function. */
- uint8_t drmGetRegistrationCodeString(char *registrationCodeString);
- /* Playback functions. */
- uint8_t drmInitPlaybackContext(uint8_t *drmHeaderInfo /*, uint8_t *drmContext*/);
- //uint8_t drmInitPlaybackContext(uint8_t *drmHeaderFromFile, uint8_t *drmContext);
- uint8_t drmQueryRentalStatus(uint8_t *drmContext, uint8_t *useLimit,
- uint8_t *useCount); /* useLimit and useCount are out
- parameters. */
- #ifdef AVI_MALLOC_SIZE_DOWN
- uint8_t drmCommitPlayback(uint8_t *drmContext, DWORD dwClipStartAddr, DWORD pdwOffset);
- #else
- uint8_t drmCommitPlayback(uint8_t *drmContext);
- #endif
- uint8_t drmDecryptFrame(uint8_t *drmContext, uint8_t *frame, uint32_t frameSize,
- uint8_t *drmFrameInfo);
- #ifdef __cplusplus
- };
- #endif
- #endif // AVI_DRM_SUPPORT
- #endif DRMADPAPI_H_INCLUDE