⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mp4.h

📁 AAC编解码源码
💻 H
📖 第 1 页 / 共 3 页
字号:
MP4TrackId MP4AddSceneTrack(
    MP4FileHandle hFile);

MP4TrackId MP4AddAudioTrack(
    MP4FileHandle hFile,
    u_int32_t timeScale,
    MP4Duration sampleDuration,
    u_int8_t audioType DEFAULT(MP4_MPEG4_AUDIO_TYPE));

MP4TrackId MP4AddEncAudioTrack(
    MP4FileHandle hFile,
    u_int32_t timeScale,
    MP4Duration sampleDuration,
    u_int8_t audioType DEFAULT(MP4_MPEG4_AUDIO_TYPE));

MP4TrackId MP4AddVideoTrack(
    MP4FileHandle hFile,
    u_int32_t timeScale,
    MP4Duration sampleDuration,
    u_int16_t width,
    u_int16_t height,
    u_int8_t videoType DEFAULT(MP4_MPEG4_VIDEO_TYPE));

MP4TrackId MP4AddEncVideoTrack(
    MP4FileHandle hFile,
    u_int32_t timeScale,
    MP4Duration sampleDuration,
    u_int16_t width,
    u_int16_t height,
    u_int8_t videoType DEFAULT(MP4_MPEG4_VIDEO_TYPE));

MP4TrackId MP4AddHintTrack(
    MP4FileHandle hFile,
    MP4TrackId refTrackId);

MP4TrackId MP4CloneTrack(
    MP4FileHandle srcFile,
    MP4TrackId srcTrackId,
    MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE));

MP4TrackId MP4EncAndCloneTrack(
    MP4FileHandle srcFile,
    MP4TrackId srcTrackId,
    MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE));

MP4TrackId MP4CopyTrack(
    MP4FileHandle srcFile,
    MP4TrackId srcTrackId,
    MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE),
    bool applyEdits DEFAULT(false));

MP4TrackId MP4EncAndCopyTrack(
    MP4FileHandle srcFile,
    MP4TrackId srcTrackId,
    MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE),
    bool applyEdits DEFAULT(false));

bool MP4DeleteTrack(
    MP4FileHandle hFile,
    MP4TrackId trackId);

u_int32_t MP4GetNumberOfTracks(
    MP4FileHandle hFile,
    const char* type DEFAULT(NULL),
    u_int8_t subType DEFAULT(0));

MP4TrackId MP4FindTrackId(
    MP4FileHandle hFile,
    u_int16_t index,
    const char* type DEFAULT(NULL),
    u_int8_t subType DEFAULT(0));

u_int16_t MP4FindTrackIndex(
    MP4FileHandle hFile,
    MP4TrackId trackId);

/* track properties */

/* specific track properties */

const char* MP4GetTrackType(
    MP4FileHandle hFile,
    MP4TrackId trackId);

MP4Duration MP4GetTrackDuration(
    MP4FileHandle hFile,
    MP4TrackId trackId);

u_int32_t MP4GetTrackTimeScale(
    MP4FileHandle hFile,
    MP4TrackId trackId);

bool MP4SetTrackTimeScale(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    u_int32_t value);

// Should not be used, replace with MP4GetTrackEsdsObjectTypeId
u_int8_t MP4GetTrackAudioType(
    MP4FileHandle hFile,
    MP4TrackId trackId);

u_int8_t MP4GetTrackAudioMpeg4Type(
    MP4FileHandle hFile,
    MP4TrackId trackId);

// Should not be used, replace with MP4GetTrackEsdsObjectTypeId
u_int8_t MP4GetTrackVideoType(
    MP4FileHandle hFile,
    MP4TrackId trackId);

u_int8_t MP4GetTrackEsdsObjectTypeId(
    MP4FileHandle hFile,
    MP4TrackId trackId);

/* returns MP4_INVALID_DURATION if track samples do not have a fixed duration */
MP4Duration MP4GetTrackFixedSampleDuration(
    MP4FileHandle hFile,
    MP4TrackId trackId);

u_int32_t MP4GetTrackBitRate(
    MP4FileHandle hFile,
    MP4TrackId trackId);

bool MP4GetTrackESConfiguration(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    u_int8_t** ppConfig,
    u_int32_t* pConfigSize);

bool MP4SetTrackESConfiguration(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const u_int8_t* pConfig,
    u_int32_t configSize);

MP4SampleId MP4GetTrackNumberOfSamples(
    MP4FileHandle hFile,
    MP4TrackId trackId);

u_int16_t MP4GetTrackVideoWidth(
    MP4FileHandle hFile,
    MP4TrackId trackId);

u_int16_t MP4GetTrackVideoHeight(
    MP4FileHandle hFile,
    MP4TrackId trackId);

float MP4GetTrackVideoFrameRate(
    MP4FileHandle hFile,
    MP4TrackId trackId);

/* generic track properties */

u_int64_t MP4GetTrackIntegerProperty(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const char* propName);

float MP4GetTrackFloatProperty(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const char* propName);

const char* MP4GetTrackStringProperty(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const char* propName);

void MP4GetTrackBytesProperty(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const char* propName,
    u_int8_t** ppValue,
    u_int32_t* pValueSize);

bool MP4SetTrackIntegerProperty(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const char* propName,
    int64_t value);

bool MP4SetTrackFloatProperty(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const char* propName,
    float value);

bool MP4SetTrackStringProperty(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const char* propName,
    const char* value);

bool MP4SetTrackBytesProperty(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const char* propName,
    const u_int8_t* pValue,
    u_int32_t valueSize);

/* sample operations */

bool MP4ReadSample(
    /* input parameters */
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4SampleId sampleId,
    /* input/output parameters */
    u_int8_t** ppBytes,
    u_int32_t* pNumBytes,
    /* output parameters */
    MP4Timestamp* pStartTime DEFAULT(NULL),
    MP4Duration* pDuration DEFAULT(NULL),
    MP4Duration* pRenderingOffset DEFAULT(NULL),
    bool* pIsSyncSample DEFAULT(NULL));

/* uses (unedited) time to specify sample instead of sample id */
bool MP4ReadSampleFromTime(
    /* input parameters */
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4Timestamp when,
    /* input/output parameters */
    u_int8_t** ppBytes,
    u_int32_t* pNumBytes,
    /* output parameters */
    MP4Timestamp* pStartTime DEFAULT(NULL),
    MP4Duration* pDuration DEFAULT(NULL),
    MP4Duration* pRenderingOffset DEFAULT(NULL),
    bool* pIsSyncSample DEFAULT(NULL));

bool MP4WriteSample(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    const u_int8_t* pBytes,
    u_int32_t numBytes,
    MP4Duration duration DEFAULT(MP4_INVALID_DURATION),
    MP4Duration renderingOffset DEFAULT(0),
    bool isSyncSample DEFAULT(true));

bool MP4CopySample(
    MP4FileHandle srcFile,
    MP4TrackId srcTrackId,
    MP4SampleId srcSampleId,
    MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE),
    MP4TrackId dstTrackId DEFAULT(MP4_INVALID_TRACK_ID),
    MP4Duration dstSampleDuration DEFAULT(MP4_INVALID_DURATION));

/* Note this function is not yet implemented */
bool MP4ReferenceSample(
    MP4FileHandle srcFile,
    MP4TrackId srcTrackId,
    MP4SampleId srcSampleId,
    MP4FileHandle dstFile,
    MP4TrackId dstTrackId,
    MP4Duration dstSampleDuration DEFAULT(MP4_INVALID_DURATION));

u_int32_t MP4GetSampleSize(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4SampleId sampleId);

u_int32_t MP4GetTrackMaxSampleSize(
    MP4FileHandle hFile,
    MP4TrackId trackId);

MP4SampleId MP4GetSampleIdFromTime(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4Timestamp when,
    bool wantSyncSample DEFAULT(false));

MP4Timestamp MP4GetSampleTime(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4SampleId sampleId);

MP4Duration MP4GetSampleDuration(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4SampleId sampleId);

MP4Duration MP4GetSampleRenderingOffset(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4SampleId sampleId);

bool MP4SetSampleRenderingOffset(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4SampleId sampleId,
    MP4Duration renderingOffset);

int8_t MP4GetSampleSync(
    MP4FileHandle hFile,
    MP4TrackId trackId,
    MP4SampleId sampleId);

/* rtp hint track operations */

bool MP4GetHintTrackRtpPayload(
    MP4FileHandle hFile,
    MP4TrackId hintTrackId,
    char** ppPayloadName DEFAULT(NULL),
    u_int8_t* pPayloadNumber DEFAULT(NULL),
    u_int16_t* pMaxPayloadSize DEFAULT(NULL),
    char **ppEncodingParams DEFAULT(NULL));

#define MP4_SET_DYNAMIC_PAYLOAD 0xff

bool MP4SetHintTrackRtpPayload(
    MP4FileHandle hFile,
    MP4TrackId hintTrackId,
    const char* pPayloadName,
    u_int8_t* pPayloadNumber,
    u_int16_t maxPayloadSize DEFAULT(0),
    const char *encode_params DEFAULT(NULL),
    bool include_rtp_map DEFAULT(true),
    bool include_mpeg4_esid DEFAULT(true));

const char* MP4GetSessionSdp(
    MP4FileHandle hFile);

bool MP4SetSessionSdp(
    MP4FileHandle hFile,
    const char* sdpString);

bool MP4AppendSessionSdp(
    MP4FileHandle hFile,
    const char* sdpString);

const char* MP4GetHintTrackSdp(
    MP4FileHandle hFile,
    MP4TrackId hintTrackId);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -