📄 bitstream.h
字号:
/*******************************************************************
bit stream low level interface
*******************************************************************/
#ifndef BITSTREAM_H
#define BITSTREAM_H
#include <stdio.h>
#include "multi_file.h"
#define BITSTREAM_BUFFER_SIZE 524288
#define BITSTREAM_BUFFER_MARGIN 8
typedef struct {
MULTI_FILE *mf;
char path[FILENAME_MAX];
unsigned char buffer[BITSTREAM_BUFFER_MARGIN*2+BITSTREAM_BUFFER_SIZE];
unsigned char *current;
unsigned int bits;
int buffer_size;
int bits_rest;
__int64 file_length;
} BITSTREAM;
#ifdef __cplusplus
extern "C" {
#endif
#ifndef BITSTREAM_C
extern BITSTREAM *bs_open(const char *filename);
extern void bs_close(BITSTREAM *in);
extern int bs_read(BITSTREAM *in, unsigned char *out, int length);
extern int bs_next_packet_prefix(BITSTREAM *in);
extern int bs_prev_packet_prefix(BITSTREAM *in);
extern int bs_read_bits(BITSTREAM *in, int num_of_bits);
extern int bs_erase_bits(BITSTREAM *in, int num_of_bits);
extern int bs_get_bits(BITSTREAM *in, int num_of_bits);
extern int bs_read_next_packet_prefix(BITSTREAM *in, unsigned char *out, int length);
extern __int64 bs_seek(BITSTREAM *in, __int64 offset, int origin);
extern __int64 bs_tell(BITSTREAM *in);
#endif
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -