AV800API
av800api.h
#define export_bool_func extern "c" bool pascal export
#define export_int_func extern "c" int pascal export
#define export_void_func extern "c" void pascal export
#define export_bstr_func extern "c" unsigned char * pascal export
#define export_long_func extern "c" long pascal export
#define export_pvoid_func extern "c" void * pascal export
#define export_dble_func extern "c" double pascal export
#define md_code_create 1
#define md_code_write 2
#define md_code_close 3
#define stream_to_file 1
#define stream_to_buffer 2
#define state_preview 1
#define state_capture 2
#define state_pausecapture 3
#define state_playback 4
#define state_pauseplayback 5
#define state_preview_capture 6
#define state_preview_pausecapture 7
#define brightness_min 0
#define brightness_max 255
#define contrast_min 0
#define contrast_max 127
#define hue_min -128
#define hue_max 127
#define saturation_min 0
#define saturation_max 127
#define sharpness_min 0
#define sharpness_max 15
#define chrimagain_min 0
#define chrimagain_max 127
#ifndef need_source
typedef enum
{
source_tvtuner = 0,
source_1394 = 1,
source_composite = 2,
source_composite2 = 3,
source_composite3 = 4,
source_svideo = 5,
source_yuv = 6,
};
#endif
typedef enum
{
deviceid_av800 = 1,
deviceid_av800tv,
deviceid_av800plus,
deviceid_av800dvpro,
};
typedef enum
{
audio_sample_441n = 0,
audio_sample_48,
audio_sample_32
};
typedef enum
{
audio_bitrate_128 = 0,
audio_bitrate_224,
audio_bitrate_384
};
//export_void_func ts_assigndevice (int deviceid);
export_int_func ts_getdeviceid ();
export_bool_func ts_initdevice (hwnd hwnd);
export_bool_func ts_initdevicenopreview ();
export_void_func ts_uninitdevice();
export_int_func ts_getstate ();
export_void_func ts_fullscreen(bool fullscreen);
export_bool_func ts_openpreview (hwnd hwnd);
export_void_func ts_closepreview ();
export_void_func ts_setvideowindowpos (int x, int y, int cx, int cy);
export_void_func ts_tvtuning();
export_int_func ts_gettvchannel();
export_void_func ts_settvchannel(int ntvchannel);
export_int_func ts_getvideosource();
export_void_func ts_setvideosource(int nvideosource);
export_int_func ts_getvideosystem();
export_void_func ts_setvideosystem(int nvideosystem);
export_bool_func ts_getdisplayuseoverlay();
export_void_func ts_setdisplayuseoverlay(bool boverlay);
export_int_func ts_getbrightness();
export_void_func ts_setbrightness(int nbrightness);
export_int_func ts_getcontrast();
export_void_func ts_setcontrast(int ncontrast);
export_int_func ts_gethue();
export_void_func ts_sethue(int nhue);
export_int_func ts_getsaturation();
export_void_func ts_setsaturation(int nsaturation);
export_int_func ts_getsharpness();
export_void_func ts_setsharpness(int nsharpness);
export_int_func ts_getchromagain();
export_void_func ts_setchromagain(int ngain);
export_int_func ts_getsourcegain();
export_void_func ts_setsourcegain (int ngain);
export_int_func ts_gettotalencodemode();
export_int_func ts_getencodemode();
export_void_func ts_setencodemode(int nencodemode);
export_int_func ts_getgopsize();
export_void_func ts_setgopsize(int ngopsize);
export_bool_func ts_gethhr();
export_void_func ts_sethhr(bool bhhr);
export_int_func ts_getoffsetfield1();
export_void_func ts_setoffsetfield1(int nfield1offset);
export_int_func ts_getoffsetfield2();
export_void_func ts_setoffsetfield2(int nfield2offset);
export_int_func ts_getpdistance();
export_void_func ts_setpdistance(int npdistance);
export_int_func ts_getprefilterno();
export_void_func ts_setprefilterno(int nprefilterno);
export_int_func ts_getratectrl();
export_void_func ts_setratectrl(int nratectrl);
export_int_func ts_getresolution();
export_void_func ts_setresolution(int nresolution);
export_bool_func ts_gettopfieldfirst();
export_void_func ts_settopfieldfirst(bool btopfieldfirst);
export_long_func ts_getvideobitrate();
export_void_func ts_setvideobitrate(long nvidbitrate);
export_void_func ts_getencodemodename(int encmode, cstring & encmodename);
export_void_func ts_setencodemodename(int encmode, cstring encmodename);
export_void_func ts_readencodeparameters(int encmode);
export_void_func ts_updateencodeparameter();
export_long_func ts_getaudiobitrate();
export_void_func ts_setaudiobitrate(long naudbitrate);
export_long_func ts_getaudiosamplerate();
export_void_func ts_setaudiosamplerate(long naudsamplerate);
export_long_func ts_getmuxvideodts ();
export_void_func ts_setmuxvideodts (long muxdts);
export_long_func ts_getmuxaudiopts ();
export_void_func ts_setmuxaudiopts (long muxpts);
export_void_func ts_setcapturefile(lpctstr filepath);
export_bool_func ts_startcapture(uint streammode, lpctstr filepath, long callbackaddress);
export_bool_func ts_startavcapture(lpctstr vidfilepath, lpctstr audfilepath);
export_bool_func ts_startvidcapture(uint streammode, lpctstr filepath, long callbackaddress);
export_bool_func ts_startaudcapture(uint streammode, lpctstr filepath, long callbackaddress);
export_bool_func ts_stopcapture();
export_bool_func ts_pausecapture();
export_bool_func ts_resumecapture();
export_dble_func ts_getfilelength (lpctstr filepath);
export_bool_func ts_startplayback(lpctstr filepath);
export_bool_func ts_pauseplayback();
export_bool_func ts_resumeplayback();
export_bool_func ts_stopplayback();
export_dble_func ts_getplaybackpos ();
export_dble_func ts_setplaybackpos (double pos);
export_long_func ts_getimagesize();
export_long_func ts_grabimage(char * imagebus, long bufsize);
export_void_func ts_grabimagefile(char * imagefilepath);
export_bool_func ts_i2cread (uint address, uint subaddress, uint *data);
export_bool_func ts_i2cwrite (uint address, uint subaddress, uint *data);
export_bool_func ts_getprivateid (uint index, uint *data);
export_bool_func ts_setprivateid (uint index, uint *data);
与av800 初始化相关的函数
bool ts_initdevice (hwnd hwnd)
功能:初始化av800 api 软件组件并建立视频窗。建立后av800 处于preview 方式。
参数:无
返回值:true 成功,false 失败
bool ts_initdevicenopreview ()
功能:初始化av800 api 软件组件。不建立preview,可在在后续的操作中通过 ts_openpreview 和ts_closepreview 打开或关闭preview。
参数:无
返回值:true 成功,false 失败
void ts_uninitdevice()
功能:清除av800 api 软件组件。
参数: 无
返回值:无
int ts_getdeviceid()
功能:获得av800 卡系列编号。
参数: 无
返回值:返回av800 卡系列编号:
1:av800
2: av800/tv
3: av800 plus
4: av800 dvpro
int ts_getstate ()
功能:获得av800 当前状态。
参数: 无
返回值:state_preview,处于preview 状态。
state_capture,处于采集mpeg 状态但非preview 状态。
state_playback,处于播放mpeg 文件状态。
state_pausecapture 处于采集暂停但非preview 状态状态。
state_pauseplayback 处于播放暂停状态
state_preview_capture 处于采集和preview 状态。
state_preview_pausecapture 处于采集暂停和preview 状态。
与视频显示相关的函数
bool ts_openpreview (hwnd hwnd)
功能:打开preview 使可观察到输入视频。
参数:hwnd hwnd: 视频窗的窗口句柄
返回值:true 成功,false 失败
void ts_closepreview ()
功能:关闭preview。
参数:无。
返回值:无。
void ts_setvideowindowpos (int x, int y, int cx, int cy)
功能:设置视频窗的位置及大小。
参数: int x 视频窗的左上角屏幕坐标,
int y 视频窗的右上角屏幕坐标,
int cx 视频窗的宽度,
int cy 视频窗的高度
返回值:无
void ts_fullscreen(bool fullscreen)
功能:设置视频显示为全屏幕或正常。
参数: bool fullscreen
true: 全屏幕显示,
false:正常显示
返回值:无
void ts_tvtuning()
功能:tv tuner 自动调谐。(仅适用于av800/tv)
参数: 无
返回值:无
int ts_gettvchannel()
功能:获得当前选择的电视频道号。(仅适用于av800/tv)
参数: 无
返回值:0 _ 100
void ts_settvchannel(int channel)
功能:设置电视频道号。(仅适用于av800/tv)
参数: int channel: 0 -100
返回值:无
int ts_getvideosource()
功能:获得当前选择的输入视频源
参数: 无
返回值:source_tvtuner 输入源为tv tuner。(仅对av800/tv有效)
source_composite 输入源为复合视频。
source_composite2 第二个复合输入源。(仅对av800 dvpro 有效)
source_composite3 第三个复合输入源。(仅对av800 dvpro 有效)
source_svideo 输入源为s-video
source_1394 输入源为dv(1394)。(仅对av800 dvpro 有效)
source_yuv 输入源为yuv 分量。(仅对av800 dvpro 有效)
void ts_setvideosource(int videosource)
功能:设置视频输入源
参数: int videosource 的取值分别为:
source_composite 输入源为复合视频。
source_composite2 第二个复合输入源。(仅对av800 dvpro 有效)
source_composite3 第三个复合输入源。(仅对av800 dvpro 有效)
source_svideo 输入源为s-video
source_1394 输入源为dv(1394)。(仅对av800 dvpro 有效)
source_yuv 输入源为yuv 分量。(仅对av800 dvpro 有效)
返回值:无
int ts_getvideosystem ()
功能:获得当前输入视频制式
参数: 无
返回值:1:pal
2:ntsc
void ts_setvideosystem(int videosystem)
功能:设置视频输入输出制式
参数: int videosystem 的取值分别为:
1: pal
2: ntsc
返回值:无
对于输入视频制式,av800 由硬件自动检测,即使设置了不同制式,在采集时仍然会按照实际输入信号的制式编码mpeg。av800 的视频输出制式可以由此函数设置。
bool ts_getdisplayuseoverlay()
功能:获得当前视频显示是否使用了directdraw overlay。
参数: true 使用overlay
false 未使用overlay
返回值:无
void ts_setdisplayuseoverlay(bool boverlay)
功能:设置视频显示是否使用directx overlay。
参数: bool boverlay: true 使用overlay, fasle 不使用overlay
返回值:无
int ts_getbrightness()
功能:获得当前设置的亮度值。
参数: 无
返回值:brightness_min 至brightness_max
void ts_setbrightness(int nbrightness)
功能:设置亮度值
参数: int nbrightness: brightness_min 至brightness_max
返回值:无
int ts_getcontrast()
功能:获得当前设置的对比度值。
参数: 无
返回值:contrast_min 至contrast_max
void ts_setcontrast(int ncontrast)
功能:设置对比度值
参数: int ncontrast:contrast_min 至contrast_max
返回值:无
int ts_gethue()
功能:获得当前设置的色度值
参数: 无
返回值:hue_min 至hue_max
void ts_sethue(int nhue)
功能:设置色度值
参数: int nhue: hue_min 至hue_max
返回值:无
int ts_getsaturation()
功能:获得当前设置的色饱和度值
参数: 无
返回值:saturation_min 至saturation_max
void ts_setsaturation(int nsaturation)
功能:设置色饱和度值
参数: int nsaturation: saturation_min 至saturation_max
返回值:无
int ts_getsharpness()
功能:获得当前设置的色锐度值
参数: 无
返回值:sharpness_min 至sharpness_max
void ts_setsharpness(int nsharpness)
功能:设置色锐度值
参数: int nsharpness: sharpness_min 至sharpness_max
返回值:无
long ts_getimagesize()
功能:获得捕捉图像的大小。应用程序应根据返回值分配相应的缓冲区,调用ts_grabimage(char * imagebus, long bufsize)获得dib 图像。只有在非overlay 显示方式下才能使用本函数捕获图像。
参数:无
返回值:图像的大小。
void ts_grabimage(char * imagebus, long bufsize)
功能:捕捉图像当前显示的图像。只有在非overlay 显示方式下才能使用本函数捕获图像。
参数: char * imagebuf: 接收图像的缓冲区指针。
long bufsize: 缓冲区大小。
返回值:无。
void ts_grabimagefile(char * imagefilepath)
功能:捕捉图像当前显示的图像并存为bmp 文件。
只有在非overlay 显示方式下才能使用本函数捕获图像。
参数: char * imagefilepath: 文件名。
返回值:无。
与mpeg 编码相关的函数
av800 的mpeg 编码参数包括:
video bitrate: 视频位速率,可以通过ts_setvideobitrate 和
ts_getvideobitrate 改变或查询。有效值为512000 _
15000000。
gop size: mpeg gop (group of picture)的i 帧间隔,通过
ts_setgopsize 和ts_getgopsize 改变或查询。有效值为1
-15 并且必须是p 帧间隔的整倍数,一般取值为12 或15。
p frame distance: mpeg gop 中的p 帧间隔,通过ts_setpdistance 和
ts_setpdistance 改变或查询。有效值为1 _ 3。
rate control: 这是关于mpeg 的编码方式,可供选择的是cbr(constant
bitrate)和vbr(variable bitrate),通过ts_setratectrl 和
ts_getratectrl 改变或查询。有效值为0: cbr, 1: vbr。
topfieldfirst: 用于在解码时通知解码器首先解码哪一场图像,有效值
为:true 表示先解码a field,false 表示先解码b field。可
以通过ts_settopfieldfirst 和ts_gettopfieldfirst 改变或
查询,一般情况下应设置为true。
hhrfilter: hhr(half horizontal resolution) 用于指出当水平分辨率为
352 或480 时对输入图像分辨率进行变换, 可以通过
ts_sethhr 和ts_gethhr 改变或查询。一般说,当采集
dvd 时禁止hhr,当采集vcd,svcd 时应允许hhr。有效值
为true:允许, false:禁止。
offsetfield1: 第一场第一条扫描线的位移量。有效值为/0 _ 31,目前固定设
置为2 。尽管这里提供了ts_setoffsetfield1 和
ts_setoffsetfield1 但用户最好不要改变它,否则将影响到视
频播放时的图像稳定性。
offsetfield2: 第二场第一条扫描线的位移量。有效值为/0 _ 31,目前固定设
置为2 。尽管这里提供了ts_setoffsetfield2 和
ts_setoffsetfield2 但用户最好不要改变它,否则将影响到视
频播放时的图像稳定性。
resolution: mpeg 编码分辨率。通过ts_setresolution 和
ts_setresolution 改变或查询,有效值为:
0: cif(sif) 352 x 288 或352 x 240,用于vcd/mpeg-1 编码
1: 1/2 d1 352 x 576 或352 x 480,用于cvd/mpeg-2 编码
2: 2/3 d1 480 x 576 或480 x 480,用于svcd/mpeg-2 编码
3: full d1 704 x 576 或704 x 480,用于dvd/mpeg-2 编码
prefilterno: 预处理滤波器编号。通过ts_ setprefilterno 和
ts_getprefilterno 改变或查询,有效值为0 -7。
int ts_gettotalencodemode()
功能:获得预定义编码参数组个数。为了方便用户操作目前av800 dll 预置了5 组
mpeg 编码参数。分别为:vcd, svcd, dvd, mpeg-1, mpeg-2。
参数: 无
返回值:预定义编码参数组个数
int ts_getencodemode()
功能:获得当前的参数组索引。
参数: 无
返回值:当前参数组索引
void ts_setencodemode(int nindex)
功能:改变参数组。
参数: int nindex: 参数组索引,应大于0 并小于ts_gettotalencodemode 的返回值。
返回值:无
void ts_getencodemodename(int nindex, cstring & encmodename)
功能:获得某参数组名称。
参数: int nindex: 参数组索引.
cstring & encmodename:通过此参数返回指定参数组名称。
返回值:无
void ts_setencodemodename(int nindex, cstring encmodename)
功能:
参数: int nindex: 参数组索引。
cstring & encmodename:参数组名称。
返回值:无
void ts_readencodeparameters(int nindex)
功能:获得指定参数组的参数值。在调用此函数后可以通过ts_getvideobitrate 等函数获得每一个参数的当前值。在调用ts_initdevice 时ts_initde vice 会以最近一次调用ts_setencodemode 设置的参数组索引调用ts_readencodeparameters,所以在调用ts_initdevice 后可以直接通过ts_getvideobitrate 等函数获得每一个参数的当前值。
参数: int nindex: 参数组索引。
返回值:无
void ts_updateencodeparameter()
功能: 在调用ts_getvideobitrate 等函数改变了mpeg 编码参数后,
ts_setencodemode 通知av800 dll 更新参数值。
参数: 无
返回值:无
int ts_getgopsize()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_setgopsize(int ngopsize)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
bool ts_gethhr()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_sethhr(bool bhhr)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
int ts_getoffsetfield1()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_setoffsetfield1(int nfield1offset)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
int ts_getoffsetfield2()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_setoffsetfield2(int nfield2offset)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
int ts_getpdistance()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_setpdistance(int npdistance)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
int ts_getprefilterno()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_setprefilterno(int nprefilterno)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
int ts_getratectrl()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_setratectrl(int nratectrl)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
int ts_getresolution()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_setresolution(int nresolution)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
bool ts_gettopfieldfirst()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_settopfieldfirst(bool bnewvalue)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
long ts_getvideobitrate()
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
void ts_setvideobitrate(long nvideobitrate)
功能:参考前面关于av800 的mpeg 编码参数说明。
参数:
返回值:
int ts_getaudiobitrate()
功能:获得当前设置的mpeg audio bitrate。
参数: 无
返回值:当前av800 支持的mpeg 音频位速率为128k bps,224k bps,384k bps。
ts_getaudiobitrate()返回的是音频位速率的索引值,即:0 表示128k,1 表示224k,2表示384k。
void ts_setaudiobitrate(long naudiobitrateindex)
功能:设置mpeg 音频编码位速率。
参数: long naudiobitrateindex:有效值为:
0 表示128k bps
1 表示224k bps
2 表示384k bps
返回值:无
ts_setaudiobitrate 是属于”立即生效”操作,当调用该函数后,音频编码器即刻设置为相应参数, 而mpeg 参数设置属于”缓冲方式”, 要在调用ts_updateencodeparameter 后才能生效。
int ts_getaudiosamplerate()
功能:获得当前设置的mpeg audio 采样频率。
参数: 无
返回值:当前av800 支持的mpeg 音频采样频率为44.1khz,48khz,32khz。
ts_getaudiobitrate()返回的是音频采样频率的索引值,即:0 表示44.1k,1 表示48k,2表示32k。
void ts_setaudiosamplerate(long naudiosamplerateindex)
功能:设置mpeg 音频采样频率。
参数: long naudiosamplerateindex:有效值为:
0 表示44.1khz
1 表示48khz
2 表示32khz
返回值:无
ts_setaudiosamplerate 是属于”立即生效”操作,当调用该函数后,音频编码器即刻设置为相应参数, 而mpeg 参数设置属于”缓冲方式”, 要在调用ts_updateencodeparameter 后才能生效。
采集、播放控制函数
bool ts_startcapture(int streammode, lpctstr filepath,
long callbackaddress)
功能:调用此函数启动采集mpeg,可以通过此函数采集mpeg 文件或mpeg 数据流,或二者同时。
参数:int streammode:stream_to_file 表示采集到文件,第二个参数为文件名,
第三个参数无效可以为null。stream_to_buffer 表示
采集mpeg 流。这时第二个参数无效可以为null,第三个参
数为回调函数地址。stream_to_file |
stream_to_buffer 表示同时采集文件和mpeg 流。
lpctstr filepath: 文件路径。
long callbackaddress:回调函数地址
返回值:true:成功,false:出错。
回调函数定义为:typedef dword (callback *md_callback) (byte bmsg,dword dwparam1, dword dwparam2)。第一参数hmsg 为回调时传递的消息,有效的消息有三个,分别为:
md_code_create 这是第一次回调时传递的消息, 表明数据开始, 这时dwparam1 和dwparam2 无意义
md_code_write 此消息表明传递给回调函数的第二个参数为mpeg 数据缓冲区地址,第三个参数为数据长度
md_code_close 当停止采集(通过调用ts_stopcapture)时传递此消息。
bool ts_startvidcapture(int streammode, lpctstr filepath,long callbackaddress)
功能:调用此函数启动采集mpeg 视频,可以通过此函数采集mpeg 视频文件或mpeg 视频数据流,或二者同时。
参数:int streammode:stream_to_file 表示采集到文件,第二个参数为文件名,
第三个参数无效可以为null。stream_to_buffer 表示
采集mpeg 流。这时第二个参数无效可以为null,第三个参
数为回调函数地址。stream_to_file |
stream_to_buffer 表示同时采集文件和mpeg 流。
lpctstr filepath: 文件路径。
long callbackaddress: 回调函数地址
返回值:true:成功,false:出错。
此函数仅仅采集mpeg 视频流。
bool ts_startaudcapture(int streammode, lpctstr filepath,
long callbackaddress)
功能:调用此函数启动采集mpeg 音频,可以通过此函数采集mpeg 音频文件或mpeg 音频数据流,或二者同时。
参数:int streammode:stream_to_file 表示采集到文件,第二个参数为文件名,
第三个参数无效可以为null。stream_to_buffer 表示
采集mpeg 流。这时第二个参数无效可以为null,第三个参
数为回调函数地址。stream_to_file |
stream_to_buffer 表示同时采集文件和mpeg 流。
lpctstr filepath: 文件路径。
long callbackaddress: 回调函数地址
返回值:true:成功,false:出错。
此函数仅仅采集mpeg 音频流,编码方式为mpeg-1 audio layer-ii。
bool ts_startavcapture(lpctstr vidfilepath, lpctstr audfilepath)
功能:调用此函数启动采集mpeg 并分离为两个文件,一个为mpeg 视频文件,一个为mpeg 音频文件。
参数: lpctstr vidfilepath:mpeg 视频文件路径。
lpctstr audfilepath:mpeg 音频文件路径。
返回值:true:成功,false:出错。
此函数不支持回调。
bool ts_stopcapture()
功能:停止采集。
参数: 无
返回值:true:成功,false:出错。
bool ts_pausecapture()
功能:暂停采集。
参数: 无
返回值:true:成功,false:出错。
bool ts_resumecapture()
功能:恢复继续采集。
参数: 无
返回值:true:成功,false:出错。
double ts_getfilelength(lpctstr filepath)
功能:获取mpeg 文件的时间长度。
参数: lpctstr filepath:mpeg 文件名路径。
返回值:mpeg 文件的时间长度,以秒为单位。
bool ts_startplayback(lpctstr filepath)
功能:播放mpeg 文件。
参数: lpctstr filepath:mpeg 文件名路径。
返回值:true:成功,false:出错。
bool ts_pauseplayback()
功能:暂停播放mpeg 文件。
参数:无
返回值:true:成功,false:出错。
bool ts_resumeplayback()
功能:恢复播放mpeg 文件。
参数:无
返回值:true:成功,false:出错。
bool ts_stopplayback()
功能:停止播放mpeg 文件。
参数:无
返回值:true:成功,false:出错。
与用户id 相关的函数
bool ts_getprivateid(int index, int * data)
功能:在用户私有数据区读取一个字节
参数: int index 数据索引
int * data 返回的数据
返回值:true:成功,false:失败
bool ts_setprivateid(int index, int * data)
功能:在用户私有数据区读取一个字节
参数: int index 数据索引
int * data 欲写入用户私有数据区的数据指针
返回值:true:成功,false:失败
用户可以在用户私有数据区维护私有数据,该数据区大小为128 字节。可以用来写入用户软件的id。