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

📄 mp4.h

📁 mpeg4 video codec mpeg4 video codec
💻 H
📖 第 1 页 / 共 2 页
字号:
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 0xffbool 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);bool MP4SetHintTrackSdp(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    const char* sdpString);bool MP4AppendHintTrackSdp(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    const char* sdpString);MP4TrackId MP4GetHintTrackReferenceTrackId(    MP4FileHandle hFile,    MP4TrackId hintTrackId);bool MP4ReadRtpHint(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    MP4SampleId hintSampleId,    u_int16_t* pNumPackets DEFAULT(NULL));u_int16_t MP4GetRtpHintNumberOfPackets(    MP4FileHandle hFile,    MP4TrackId hintTrackId);int8_t MP4GetRtpPacketBFrame(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    u_int16_t packetIndex);int32_t MP4GetRtpPacketTransmitOffset(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    u_int16_t packetIndex);bool MP4ReadRtpPacket(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    u_int16_t packetIndex,    u_int8_t** ppBytes,    u_int32_t* pNumBytes,    u_int32_t ssrc DEFAULT(0),    bool includeHeader DEFAULT(true),    bool includePayload DEFAULT(true));MP4Timestamp MP4GetRtpTimestampStart(    MP4FileHandle hFile,    MP4TrackId hintTrackId);bool MP4SetRtpTimestampStart(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    MP4Timestamp rtpStart);bool MP4AddRtpHint(    MP4FileHandle hFile,    MP4TrackId hintTrackId);bool MP4AddRtpVideoHint(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    bool isBframe DEFAULT(false),    u_int32_t timestampOffset DEFAULT(0));bool MP4AddRtpPacket(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    bool setMbit DEFAULT(false),    int32_t transmitOffset DEFAULT(0));bool MP4AddRtpImmediateData(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    const u_int8_t* pBytes,    u_int32_t numBytes);bool MP4AddRtpSampleData(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    MP4SampleId sampleId,    u_int32_t dataOffset,    u_int32_t dataLength);bool MP4AddRtpESConfigurationPacket(    MP4FileHandle hFile,    MP4TrackId hintTrackId);bool MP4WriteRtpHint(    MP4FileHandle hFile,    MP4TrackId hintTrackId,    MP4Duration duration,    bool isSyncSample DEFAULT(true));/* ISMA specific utilities */bool MP4MakeIsmaCompliant(const char* fileName,    u_int32_t verbosity DEFAULT(0),    bool addIsmaComplianceSdp DEFAULT(true));char* MP4MakeIsmaSdpIod(    u_int8_t videoProfile,    u_int32_t videoBitrate,    u_int8_t* videoConfig,    u_int32_t videoConfigLength,    u_int8_t audioProfile,    u_int32_t audioBitrate,    u_int8_t* audioConfig,    u_int32_t audioConfigLength,    u_int32_t verbosity DEFAULT(0));/* edit list *//* NOTE this section of functionality * has not yet been fully tested */MP4EditId MP4AddTrackEdit(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId DEFAULT(MP4_INVALID_EDIT_ID),    MP4Timestamp startTime DEFAULT(0),    MP4Duration duration DEFAULT(0),    bool dwell DEFAULT(false));bool MP4DeleteTrackEdit(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId);u_int32_t MP4GetTrackNumberOfEdits(    MP4FileHandle hFile,    MP4TrackId trackId);MP4Timestamp MP4GetTrackEditStart(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId);MP4Duration MP4GetTrackEditTotalDuration(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId DEFAULT(MP4_INVALID_EDIT_ID));MP4Timestamp MP4GetTrackEditMediaStart(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId);bool MP4SetTrackEditMediaStart(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId,    MP4Timestamp startTime);MP4Duration MP4GetTrackEditDuration(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId);bool MP4SetTrackEditDuration(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId,    MP4Duration duration);int8_t MP4GetTrackEditDwell(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId);bool MP4SetTrackEditDwell(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4EditId editId,    bool dwell);bool MP4ReadSampleFromEditTime(    /* 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));MP4SampleId MP4GetSampleIdFromEditTime(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4Timestamp when,    MP4Timestamp* pStartTime DEFAULT(NULL),    MP4Duration* pDuration DEFAULT(NULL));/* time conversion utilties *//* predefined values for timeScale parameter below */#define MP4_SECONDS_TIME_SCALE      1#define MP4_MILLISECONDS_TIME_SCALE 1000#define MP4_MICROSECONDS_TIME_SCALE 1000000#define MP4_NANOSECONDS_TIME_SCALE  1000000000#define MP4_SECS_TIME_SCALE     MP4_SECONDS_TIME_SCALE#define MP4_MSECS_TIME_SCALE    MP4_MILLISECONDS_TIME_SCALE#define MP4_USECS_TIME_SCALE    MP4_MICROSECONDS_TIME_SCALE#define MP4_NSECS_TIME_SCALE    MP4_NANOSECONDS_TIME_SCALEu_int64_t MP4ConvertFromMovieDuration(    MP4FileHandle hFile,    MP4Duration duration,    u_int32_t timeScale);u_int64_t MP4ConvertFromTrackTimestamp(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4Timestamp timeStamp,    u_int32_t timeScale);MP4Timestamp MP4ConvertToTrackTimestamp(    MP4FileHandle hFile,    MP4TrackId trackId,    u_int64_t timeStamp,    u_int32_t timeScale);u_int64_t MP4ConvertFromTrackDuration(    MP4FileHandle hFile,    MP4TrackId trackId,    MP4Duration duration,    u_int32_t timeScale);MP4Duration MP4ConvertToTrackDuration(    MP4FileHandle hFile,    MP4TrackId trackId,    u_int64_t duration,    u_int32_t timeScale);char* MP4BinaryToBase16(    const u_int8_t* pData,    u_int32_t dataSize);char* MP4BinaryToBase64(    const u_int8_t* pData,    u_int32_t dataSize);/* iTunes metadata handling */bool MP4MetadataDelete(MP4FileHandle hFile);bool MP4GetMetadataByIndex(MP4FileHandle hFile, u_int32_t index,                           const char** ppName,                           u_int8_t** ppValue, u_int32_t* pValueSize);bool MP4SetMetadataName(MP4FileHandle hFile, const char* value);bool MP4GetMetadataName(MP4FileHandle hFile, char** value);bool MP4SetMetadataArtist(MP4FileHandle hFile, const char* value);bool MP4GetMetadataArtist(MP4FileHandle hFile, char** value);bool MP4SetMetadataWriter(MP4FileHandle hFile, const char* value);bool MP4GetMetadataWriter(MP4FileHandle hFile, char** value);bool MP4SetMetadataComment(MP4FileHandle hFile, const char* value);bool MP4GetMetadataComment(MP4FileHandle hFile, char** value);bool MP4SetMetadataTool(MP4FileHandle hFile, const char* value);bool MP4GetMetadataTool(MP4FileHandle hFile, char** value);bool MP4SetMetadataYear(MP4FileHandle hFile, const char* value);bool MP4GetMetadataYear(MP4FileHandle hFile, char** value);bool MP4SetMetadataAlbum(MP4FileHandle hFile, const char* value);bool MP4GetMetadataAlbum(MP4FileHandle hFile, char** value);bool MP4SetMetadataTrack(MP4FileHandle hFile,                         u_int16_t track, u_int16_t totalTracks);bool MP4GetMetadataTrack(MP4FileHandle hFile,                         u_int16_t* track, u_int16_t* totalTracks);bool MP4SetMetadataDisk(MP4FileHandle hFile,                        u_int16_t disk, u_int16_t totalDisks);bool MP4GetMetadataDisk(MP4FileHandle hFile,                        u_int16_t* disk, u_int16_t* totalDisks);bool MP4SetMetadataGenre(MP4FileHandle hFile, const char* genre);bool MP4GetMetadataGenre(MP4FileHandle hFile, char** genre);bool MP4SetMetadataTempo(MP4FileHandle hFile, u_int16_t tempo);bool MP4GetMetadataTempo(MP4FileHandle hFile, u_int16_t* tempo);bool MP4SetMetadataCompilation(MP4FileHandle hFile, u_int8_t cpl);bool MP4GetMetadataCompilation(MP4FileHandle hFile, u_int8_t* cpl);bool MP4SetMetadataCoverArt(MP4FileHandle hFile,                            u_int8_t *coverArt, u_int32_t size);bool MP4GetMetadataCoverArt(MP4FileHandle hFile,                            u_int8_t **coverArt, u_int32_t* size);bool MP4SetMetadataFreeForm(MP4FileHandle hFile, char *name,                            u_int8_t* pValue, u_int32_t valueSize);bool MP4GetMetadataFreeForm(MP4FileHandle hFile, char *name,                            u_int8_t** pValue, u_int32_t* valueSize);//#ifdef USE_FILE_CALLBACKStypedef u_int32_t (*MP4OpenCallback)(const char *pName, const char *mode, void *userData);typedef void (*MP4CloseCallback)(void *userData);typedef u_int32_t (*MP4ReadCallback)(void *pBuffer, unsigned int nBytesToRead, void *userData);typedef u_int32_t (*MP4WriteCallback)(void *pBuffer, unsigned int nBytesToWrite, void *userData);typedef int32_t (*MP4SetposCallback)(u_int32_t pos, void *userData);typedef int64_t (*MP4GetposCallback)(void *userData);typedef int64_t (*MP4FilesizeCallback)(void *userData);MP4FileHandle MP4CreateCb(u_int32_t verbosity,                          bool use64bits,                          bool useExtensibleFormat,                          MP4OpenCallback MP4fopen,                          MP4CloseCallback MP4fclose,                          MP4ReadCallback MP4fread,                          MP4WriteCallback MP4fwrite,                          MP4SetposCallback MP4fsetpos,                          MP4GetposCallback MP4fgetpos,                          MP4FilesizeCallback MP4filesize,                          void *userData);MP4FileHandle MP4ReadCb(u_int32_t verbosity,                        MP4OpenCallback MP4fopen,                        MP4CloseCallback MP4fclose,                        MP4ReadCallback MP4fread,                        MP4WriteCallback MP4fwrite,                        MP4SetposCallback MP4fsetpos,                        MP4GetposCallback MP4fgetpos,                        MP4FilesizeCallback MP4filesize,                        void *userData);MP4FileHandle MP4ModifyCb(int32_t verbosity,                          bool useExtensibleFormat,                          MP4OpenCallback MP4fopen, MP4CloseCallback MP4fclose,                          MP4ReadCallback MP4fread, MP4WriteCallback MP4fwrite,                          MP4SetposCallback MP4fsetpos, MP4GetposCallback MP4fgetpos,                          MP4FilesizeCallback MP4filesize, void *userData);//#endif#ifdef __cplusplus}#endif/* undefined our utlity macro to avoid conflicts */#undef DEFAULT#endif /* __MP4_INCLUDED__ */

⌨️ 快捷键说明

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