|
#include "web_api.h"
#include "lrw_custom_body.h"
vuser_init()
{
lr_load_dll("MATest.dll");
return 0;
}
#include "as_web.h"
Action()
{
//.............系统初始化...................
int iHandle,j,p;
iHandle=lr_IniConnect("UDP","rtsp://10.5.0.39:4554/twz.flv",100);
switch (iHandle){
case -2: lr_message("初始化config.xml失败,请检查配置文件各参数.");
break;
case -3: lr_message("CreateInstance失败,申请资源失败,请检查PlayMAT中前两个参数!");
break;
case -4: lr_message("参数设置失败,请检查PlayMAT中前两个参数!");
break;
case -5: lr_message("Connect连接失败");
break;
case -6: lr_message("setup(Handle)失败");
break;
case -7: lr_message("Play播放失败");
break;
default: break;
} //.............系统初始化...................
if (iHandle>=0)
{ int xx=0,judge;
do //.........循环取流.......................
{
judge=lr_MixReadData(iHandle);
lr_output_message("The packets Length is %d", judge);
xx+=1;
}
while (xx<10000); //.........循环取流.完......................
p=lr_CloseHandle(iHandle);
lr_output_message("Close Handle is %d", p); //....释放资源.......
}
if (iHandle<0)
return -1;
return 0;
}
#include "as_web.h"
vuser_end()
{
return 0;
} |
|