📄 avistream.h
字号:
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the AVISTREAM_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// AVISTREAM_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef AVISTREAM_EXPORTS
#define AVISTREAM_API __declspec(dllexport)
#else
#define AVISTREAM_API __declspec(dllimport)
#endif
// This class is exported from the AVIStream.dll
class AVISTREAM_API CAVIStream {
public:
CAVIStream(void);
// TODO: add your methods here.
};
#ifdef __cplusplus
extern "C" {
#endif
#ifndef AVI_DECAPS_H
#define AVI_DECAPS_H
/*
* includes
*/
#include <windows.h>
#include <windowsx.h>
#include <malloc.h>
#include <stdlib.h>
#include "../avinterface.h"
/*
* SOME USEFUL MACROS
*/
#define PAD_EVEN(x) ( ((x)+1) & ~1 )
#define AVIIF_KEYFRAME 0x00000010L
/*
* INDEX TYPES
*/
typedef struct
{
long pos;
long len;
long flags;
} video_index_entry;
typedef struct
{
long pos;
long len;
long tot;
} audio_index_entry;
/*
* Main Class
*/
typedef struct _aviinfo
{
long video_strn;
long audio_strn;
long audio_chunks;
long audio_posc;
long audio_posb;
long pos;
long n_idx;
long max_idx;
char (*idx)[16];
video_index_entry *video_index;
audio_index_entry *audio_index;
long last_pos;
long last_len;
long movi_start;
HANDLE hIOMutex;
TCHAR m_lpFilename[200];
int m_type;
video_index_entry currentframe;
audio_index_entry currentchunk;
} aviinfo;
int AVIDecaps_IsAVI();
int AVIDecaps_FillHeader(int getIndex);
int AVIDecaps_AddIndexEntry(char *tag,
long flags,
long pos,
long len);
BOOL AVIDecaps_isKeyframe(long frame);
AVISTREAM_API int AVIDecaps_ReadAudio(char *audbuf, int bytes);
AVISTREAM_API int AVIDecaps_Open(LPTSTR lpFilename, int type, int size,videoinfo** info);
AVISTREAM_API double AVIDecaps_FrameRate();
AVISTREAM_API int AVIDecaps_NextVideoFrame(char *buffer,int drop);
int AVIDecaps_VideoSeek(long frame);
int AVIDecaps_AudioSeek(long bytes);
int AVIDecaps_NextKeyFrame();
int AVIDecaps_PreviousKeyFrame();
AVISTREAM_API int AVIDecaps_Seek(int percent, int isFrame);
AVISTREAM_API int AVIDecaps_ReSeekAudio();
int AVIDecaps_SampleSize();
AVISTREAM_API int AVIDecaps_Rewind();
AVISTREAM_API double AVIDecaps_GetProgress();
AVISTREAM_API int AVIDecaps_Close();
AVISTREAM_API void InitializeReader(reader* rd);
#endif
#ifdef __cplusplus
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -