1 #ifndef MP4V2_ISMA_H 2 #define MP4V2_ISMA_H 3 4 /**************************************************************************//** 5 * 6 * @defgroup mp4_isma MP4v2 ISMA (Internet Streaming Media Alliance) 7 * @{ 8 * 9 *****************************************************************************/ 10 11 /** something */ 12 typedef struct mp4v2_ismacryp_session_params { 13 uint32_t scheme_type; 14 uint16_t scheme_version; 15 uint8_t key_ind_len; 16 uint8_t iv_len; 17 uint8_t selective_enc; 18 const char* kms_uri; 19 } mp4v2_ismacrypParams; 20 21 /* 22 * API to initialize ismacryp properties to sensible defaults 23 * if input param is null then mallocs a params struct 24 */ 25 26 MP4V2_EXPORT 27 mp4v2_ismacrypParams* MP4DefaultISMACrypParams( mp4v2_ismacrypParams* ptr ); 28 29 MP4V2_EXPORT 30 MP4TrackId MP4AddEncAudioTrack( 31 MP4FileHandle hFile, 32 uint32_t timeScale, 33 MP4Duration sampleDuration, 34 mp4v2_ismacrypParams* icPp, 35 uint8_t audioType DEFAULT(MP4_MPEG4_AUDIO_TYPE) ); 36 37 MP4V2_EXPORT 38 MP4TrackId MP4AddEncVideoTrack( 39 MP4FileHandle hFile, 40 uint32_t timeScale, 41 MP4Duration sampleDuration, 42 uint16_t width, 43 uint16_t height, 44 mp4v2_ismacrypParams* icPp, 45 uint8_t videoType DEFAULT(MP4_MPEG4_VIDEO_TYPE), 46 const char* oFormat DEFAULT(NULL) ); 47 48 MP4V2_EXPORT 49 MP4TrackId MP4AddEncH264VideoTrack( 50 MP4FileHandle dstFile, 51 uint32_t timeScale, 52 MP4Duration sampleDuration, 53 uint16_t width, 54 uint16_t height, 55 MP4FileHandle srcFile, 56 MP4TrackId srcTrackId, 57 mp4v2_ismacrypParams* icPp ); 58 59 MP4V2_EXPORT 60 MP4TrackId MP4EncAndCloneTrack( 61 MP4FileHandle srcFile, 62 MP4TrackId srcTrackId, 63 mp4v2_ismacrypParams* icPp, 64 MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE), 65 MP4TrackId dstHintTrackReferenceTrack DEFAULT(MP4_INVALID_TRACK_ID) ); 66 67 MP4V2_EXPORT 68 MP4TrackId MP4EncAndCopyTrack( 69 MP4FileHandle srcFile, 70 MP4TrackId srcTrackId, 71 mp4v2_ismacrypParams* icPp, 72 encryptFunc_t encfcnp, 73 uint32_t encfcnparam1, 74 MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE), 75 bool applyEdits DEFAULT(false), 76 MP4TrackId dstHintTrackReferenceTrack DEFAULT(MP4_INVALID_TRACK_ID) ); 77 78 MP4V2_EXPORT 79 bool MP4MakeIsmaCompliant( 80 const char* fileName, 81 bool addIsmaComplianceSdp DEFAULT(true) ); 82 83 MP4V2_EXPORT 84 char* MP4MakeIsmaSdpIod( 85 uint8_t videoProfile, 86 uint32_t videoBitrate, 87 uint8_t* videoConfig, 88 uint32_t videoConfigLength, 89 uint8_t audioProfile, 90 uint32_t audioBitrate, 91 uint8_t* audioConfig, 92 uint32_t audioConfigLength ); 93 94 /** @} ***********************************************************************/ 95 96 #endif /* MP4V2_ISMA_H */ 97