MP4v2

isma.h
1#ifndef MP4V2_ISMA_H
2#define MP4V2_ISMA_H
3
4/**************************************************************************/
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, a params struct is allocated
24 */
25
26MP4V2_EXPORT
27 mp4v2_ismacrypParams* MP4DefaultISMACrypParams(
28 mp4v2_ismacrypParams* ptr );
29
30MP4V2_EXPORT
31MP4TrackId MP4AddEncAudioTrack(
32 MP4FileHandle hFile,
33 uint32_t timeScale,
34 MP4Duration sampleDuration,
35 mp4v2_ismacrypParams* icPp,
36 uint8_t audioType DEFAULT(MP4_MPEG4_AUDIO_TYPE) );
37
38MP4V2_EXPORT
39MP4TrackId MP4AddEncVideoTrack(
40 MP4FileHandle hFile,
41 uint32_t timeScale,
42 MP4Duration sampleDuration,
43 uint16_t width,
44 uint16_t height,
45 mp4v2_ismacrypParams* icPp,
46 uint8_t videoType DEFAULT(MP4_MPEG4_VIDEO_TYPE),
47 const char* oFormat DEFAULT(NULL) );
48
49MP4V2_EXPORT
50MP4TrackId MP4AddEncH264VideoTrack(
51 MP4FileHandle dstFile,
52 uint32_t timeScale,
53 MP4Duration sampleDuration,
54 uint16_t width,
55 uint16_t height,
56 MP4FileHandle srcFile,
57 MP4TrackId srcTrackId,
58 mp4v2_ismacrypParams* icPp );
59
60MP4V2_EXPORT
61MP4TrackId MP4EncAndCloneTrack(
62 MP4FileHandle srcFile,
63 MP4TrackId srcTrackId,
64 mp4v2_ismacrypParams* icPp,
65 MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE),
66 MP4TrackId dstHintTrackReferenceTrack DEFAULT(MP4_INVALID_TRACK_ID) );
67
68MP4V2_EXPORT
69MP4TrackId MP4EncAndCopyTrack(
70 MP4FileHandle srcFile,
71 MP4TrackId srcTrackId,
72 mp4v2_ismacrypParams* icPp,
73 encryptFunc_t encfcnp,
74 uint32_t encfcnparam1,
75 MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE),
76 bool applyEdits DEFAULT(false),
77 MP4TrackId dstHintTrackReferenceTrack DEFAULT(MP4_INVALID_TRACK_ID) );
78
100MP4V2_EXPORT
101 bool MP4MakeIsmaCompliant(
102 const char* fileName,
103 bool addIsmaComplianceSdp DEFAULT(true) );
104
105MP4V2_EXPORT
106 char* MP4MakeIsmaSdpIod(
107 uint8_t videoProfile,
108 uint32_t videoBitrate,
109 uint8_t* videoConfig,
110 uint32_t videoConfigLength,
111 uint8_t audioProfile,
112 uint32_t audioBitrate,
113 uint8_t* audioConfig,
114 uint32_t audioConfigLength );
115
118#endif /* MP4V2_ISMA_H */
MP4_INVALID_TRACK_ID
#define MP4_INVALID_TRACK_ID
Constant: invalid MP4TrackId.
Definition: general.h:49
encryptFunc_t
uint32_t(* encryptFunc_t)(uint32_t, uint32_t, uint8_t *, uint32_t *, uint8_t **)
Encryption function pointer.
Definition: general.h:44
MP4_INVALID_FILE_HANDLE
#define MP4_INVALID_FILE_HANDLE
Constant: invalid MP4FileHandle.
Definition: general.h:48
mp4v2_ismacrypParams
struct mp4v2_ismacryp_session_params mp4v2_ismacrypParams
something
MP4MakeIsmaCompliant
bool MP4MakeIsmaCompliant(const char *fileName, bool addIsmaComplianceSdp=true)
Add ISMA compliant OD and Scene tracks.
mp4v2_ismacryp_session_params
something
Definition: isma.h:12