#ifndef MP4V2_SAMPLE_H
#define MP4V2_SAMPLE_H
/**************************************************************************//**
*
* @defgroup mp4_sample MP4v2 Sample
* @{
*
*****************************************************************************/
/** Sample dependency types.
*
* Bit combinations 0x03, 0x30, 0xc0 are reserved.
*/
typedef enum MP4SampleDependencyType_e {
MP4_SDT_UNKNOWN = 0x00, /**< unknown */
MP4_SDT_HAS_REDUNDANT_CODING = 0x01, /**< contains redundant coding */
MP4_SDT_HAS_NO_REDUNDANT_CODING = 0x02, /**< does not contain redundant coding */
MP4_SDT_HAS_DEPENDENTS = 0x04, /**< referenced by other samples */
MP4_SDT_HAS_NO_DEPENDENTS = 0x08, /**< not referenced by other samples */
MP4_SDT_IS_DEPENDENT = 0x10, /**< references other samples */
MP4_SDT_IS_INDEPENDENT = 0x20, /**< does not reference other samples */
MP4_SDT_EARLIER_DISPLAY_TIMES_ALLOWED = 0x40, /**< subequent samples in GOP may display earlier */
_MP4_SDT_RESERVED = 0x80 /**< reserved */
} MP4SampleDependencyType;
/** Read a track sample.
*
* MP4ReadSample reads the specified sample from the specified track.
* Typically this sample is then decoded in a codec dependent fashion and
* rendered in an appropriate fashion.
*
* The argument <b>ppBytes</b> allows for two possible approaches for
* buffering:
*
* If the calling application wishes to handle its own buffering it can set
* *ppBytes to the buffer it wishes to use. The calling application is
* responsible for ensuring that the buffer is large enough to hold the
* sample. This can be done by using either MP4GetSampleSize() or
* MP4GetTrackMaxSampleSize() to determine before-hand how large the
* receiving buffer must be.
*
* If the value of *ppBytes is NULL, then an appropriately sized buffer is
* automatically malloc'ed for the sample data and *ppBytes set to this
* pointer. The calling application is responsible for free'ing this
* memory.
*
* The last four arguments are pointers to variables that can receive
* optional sample information.
*
* Typically for audio none of these are needed. MPEG audio such as MP3 or
* AAC has a fixed sample duration and every sample can be accessed at
* random.
*
* For video, all of these optional values could be needed. MPEG video can
* be encoded at a variable frame rate, with only occasional random access
* points, and with "B frames" which cause the rendering (display) order
* of the video frames to differ from the storage/decoding order.
*
* Other media types fall between these two extremes.
*
* @param hFile handle of file for operation.
* @param trackId id of track for operation.
* @param sampleId specifies which sample is to be read.
* Caveat: the first sample has id <b>1</b> not <b>0</b>.
* @param ppBytes pointer to the pointer to the sample data.
* @param pNumBytes pointer to variable that will be hold the size in bytes
* of the sample.
* @param pStartTime if non-NULL, pointer to variable that will receive the
* starting timestamp for this sample. Caveat: The timestamp is in
* <b>trackId</b>'s timescale.
* @param pDuration if non-NULL, pointer to variable that will receive the
* duration for this sample. Caveat: The duration is in
* <b>trackId</b>'s timescale.
* @param pRenderingOffset if non-NULL, pointer to variable that will
* receive the rendering offset for this sample. Currently the only
* media type that needs this feature is MPEG video. Caveat: The offset
* is in <b>trackId</b>'s timescale.
* @param pIsSyncSample if non-NULL, pointer to variable that will receive
* the state of the sync/random access flag for this sample.
*
* @return <b>true</b> on success, <b>false</b> on failure.
*
* @see MP4GetSampleSize().
* @see MP4GetTrackMaxSampleSize().
*/
MP4V2_EXPORT
bool MP4ReadSample(
/* input parameters */
MP4FileHandle hFile,
MP4TrackId trackId,
MP4SampleId sampleId,
/* input/output parameters */
uint8_t** ppBytes,
uint32_t* pNumBytes,
/* output parameters */
MP4Timestamp* pStartTime DEFAULT(NULL),
MP4Duration* pDuration DEFAULT(NULL),
MP4Duration* pRenderingOffset DEFAULT(NULL),
bool* pIsSyncSample DEFAULT(NULL) );
/** Read a track sample based on a specified time.
*
* MP4ReadSampleFromTime is similar to MP4ReadSample() except the sample
* is specified by using a timestamp instead of sampleId.
* Typically this sample is then decoded in a codec dependent fashion and
* rendered in an appropriate fashion.
*
* The argument <b>ppBytes</b> allows for two possible approaches for
* buffering:
*
* If the calling application wishes to handle its own buffering it can set
* *ppBytes to the buffer it wishes to use. The calling application is
* responsible for ensuring that the buffer is large enough to hold the
* sample. This can be done by using either MP4GetSampleSize() or
* MP4GetTrackMaxSampleSize() to determine before-hand how large the
* receiving buffer must be.
*
* If the value of *ppBytes is NULL, then an appropriately sized buffer is
* automatically malloc'ed for the sample data and *ppBytes set to this
* pointer. The calling application is responsible for free'ing this
* memory.
*
* The last four arguments are pointers to variables that can receive
* optional sample information.
*
* Typically for audio none of these are needed. MPEG audio such as MP3 or
* AAC has a fixed sample duration and every sample can be accessed at
* random.
*
* For video, all of these optional values could be needed. MPEG video can
* be encoded at a variable frame rate, with only occasional random access
* points, and with "B frames" which cause the rendering (display) order
* of the video frames to differ from the storage/decoding order.
*
* Other media types fall between these two extremes.
*
* @param hFile handle of file for operation.
* @param trackId id of track for operation.
* @param when specifies which sample is to be read based on a time in the
* track timeline. See MP4GetSampleIdFromTime() for details.
* @param ppBytes pointer to the pointer to the sample data.
* @param pNumBytes pointer to variable that will be hold the size in bytes
* of the sample.
* @param pStartTime if non-NULL, pointer to variable that will receive the
* starting timestamp for this sample. Caveat: The timestamp is in
* <b>trackId</b>'s timescale.
* @param pDuration if non-NULL, pointer to variable that will receive the
* duration for this sample. Caveat: The duration is in
* <b>trackId</b>'s timescale.
* @param pRenderingOffset if non-NULL, pointer to variable that will
* receive the rendering offset for this sample. Currently the only
* media type that needs this feature is MPEG video. Caveat: The offset
* is in <b>trackId</b>'s timescale.
* @param pIsSyncSample if non-NULL, pointer to variable that will receive
* the state of the sync/random access flag for this sample.
*
* @return <b>true</b> on success, <b>false</b> on failure.
*
* @see MP4ReadSample().
* @see MP4GetSampleIdFromTime().
* @see MP4GetSampleSize().
* @see MP4GetTrackMaxSampleSize().
*/
MP4V2_EXPORT
bool MP4ReadSampleFromTime(
/* input parameters */
MP4FileHandle hFile,
MP4TrackId trackId,
MP4Timestamp when,
/* input/output parameters */
uint8_t** ppBytes,
uint32_t* pNumBytes,
/* output parameters */
MP4Timestamp* pStartTime DEFAULT(NULL),
MP4Duration* pDuration DEFAULT(NULL),
MP4Duration* pRenderingOffs
没有合适的资源?快使用搜索试试~ 我知道了~
mp4v2库 libmp4v2.dll
共121个文件
pdb:39个
exe:36个
ilk:20个
需积分: 13 39 下载量 150 浏览量
2018-01-10
10:12:39
上传
评论 1
收藏 15.53MB ZIP 举报
温馨提示
mp4v2库 libmp4v2.dll win32 win64及头文件 mp4v2库 libmp4v2.dll win32 win64及头文件
资源推荐
资源详情
资源评论
收起资源包目录
mp4v2库 libmp4v2.dll (121个子文件)
libmp4v2.dll 2.37MB
libmp4v2.dll 2MB
libmp4v2.dll 1.72MB
libmp4v2.dll 603KB
mp4chaps.exe 141KB
mp4track.exe 139KB
mp4track.exe 113KB
mp4chaps.exe 111KB
mp4art.exe 103KB
mp4tags.exe 102KB
mp4info.exe 101KB
mp4art.exe 86KB
mp4info.exe 84KB
mp4tags.exe 83KB
mp4file.exe 79KB
mp4file.exe 67KB
mp4subtitle.exe 59KB
mp4track.exe 52KB
mp4subtitle.exe 51KB
mp4chaps.exe 45KB
mp4extract.exe 44KB
mp4trackdump.exe 44KB
mp4extract.exe 39KB
mp4track.exe 39KB
mp4trackdump.exe 36KB
mp4chaps.exe 35KB
mp4art.exe 32KB
mp4file.exe 26KB
mp4art.exe 25KB
mp4tags.exe 20KB
mp4file.exe 20KB
mp4tags.exe 19KB
mp4info.exe 17KB
mp4subtitle.exe 16KB
mp4info.exe 15KB
mp4subtitle.exe 13KB
mp4extract.exe 12KB
mp4extract.exe 11KB
mp4trackdump.exe 11KB
mp4trackdump.exe 11KB
libmp4v2.exp 101KB
libmp4v2.exp 101KB
libmp4v2.exp 101KB
libmp4v2.exp 101KB
sample.h 23KB
general.h 16KB
file.h 15KB
track.h 14KB
itmf_tags.h 11KB
track_prop.h 9KB
itmf_generic.h 9KB
chapter.h 6KB
streaming.h 4KB
file_prop.h 4KB
isma.h 3KB
mp4v2.h 3KB
platform.h 2KB
libmp4v2.ilk 7.37MB
libmp4v2.ilk 4.49MB
mp4chaps.ilk 757KB
mp4track.ilk 707KB
mp4chaps.ilk 699KB
mp4art.ilk 662KB
mp4track.ilk 658KB
mp4tags.ilk 618KB
mp4art.ilk 615KB
mp4info.ilk 590KB
mp4tags.ilk 578KB
mp4file.ilk 564KB
mp4info.ilk 537KB
mp4file.ilk 531KB
mp4subtitle.ilk 448KB
mp4subtitle.ilk 426KB
mp4extract.ilk 381KB
mp4extract.ilk 375KB
mp4trackdump.ilk 369KB
mp4trackdump.ilk 367KB
project.h.in 2KB
libmp4v2.lib 166KB
libmp4v2.lib 166KB
libmp4v2.lib 165KB
libmp4v2.lib 165KB
libmp4v2.pdb 9.85MB
libmp4v2.pdb 8.54MB
libmp4v2.pdb 5.52MB
mp4info.pdb 1.66MB
mp4info.pdb 1.63MB
mp4tags.pdb 1.33MB
mp4tags.pdb 1.32MB
mp4art.pdb 1.21MB
mp4art.pdb 1.19MB
mp4chaps.pdb 1.13MB
mp4chaps.pdb 1.11MB
mp4track.pdb 1.11MB
mp4track.pdb 1.1MB
mp4info.pdb 1.08MB
mp4file.pdb 1.06MB
mp4file.pdb 1.05MB
mp4info.pdb 1.05MB
mp4subtitle.pdb 947KB
共 121 条
- 1
- 2
资源评论
Funny88888
- 粉丝: 1
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功