增加rtsp的限制
parent
e80b72ec47
commit
02ace2769a
@ -1,57 +1,16 @@
|
||||
package com.zhehekeji.web.lib;
|
||||
|
||||
import com.sun.jna.Pointer;
|
||||
import com.zhehekeji.common.util.PathUtil;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.io.*;
|
||||
|
||||
public class Mp4ReceiveCB implements NetSDKLib.fTimeDownLoadPosCallBack {
|
||||
// @Override
|
||||
// public int invoke(NetSDKLib.LLong lRealHandle, int dwDataType, Pointer pBuf, int RevLen, Pointer dwUser) {
|
||||
// if(pBuf != null && RevLen > 0) {
|
||||
// byte[] buf = pBuf.getByteArray(0, RevLen);
|
||||
//
|
||||
// File file = PathUtil.getFile("d://qq/recive/qqq.mp4");
|
||||
// OutputStream os = null;
|
||||
// try {
|
||||
// os = new FileOutputStream(file);
|
||||
// } catch (FileNotFoundException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// for(int i = 0;i<buf.length;i++){
|
||||
// try {
|
||||
// os.write(buf[i]);
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// os.flush();
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// try {
|
||||
// os.close();
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void invoke(NetSDKLib.LLong lPlayHandle, int dwTotalSize, int dwDownLoadSize, int index, NetSDKLib.NET_RECORDFILE_INFO.ByValue recordfileinfo, Pointer dwUser) {
|
||||
System.out.println("ing...."+dwDownLoadSize+" totalSize:"+dwTotalSize+"id:"+lPlayHandle.longValue());
|
||||
System.out.println("ing.... dwDownLoadSize:"+dwDownLoadSize+" dwTotalSize:"+dwTotalSize+
|
||||
" lPlayHandle:"+lPlayHandle.longValue()+" index:"+index);
|
||||
if(dwDownLoadSize == -1) {
|
||||
System.out.println("下载结束");
|
||||
LoginModule.netsdk.CLIENT_StopDownload(lPlayHandle);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue