1 packagecom.bs.thread;2
3 importcom.bs.controller.BsDataController;4 importorg.bytedeco.javacv.FFmpegFrameGrabber;5 importorg.bytedeco.javacv.Frame;6 importorg.bytedeco.javacv.FrameGrabber;7 importorg.bytedeco.javacv.Java2DFrameConverter;8 importorg.slf4j.Logger;9 importorg.slf4j.LoggerFactory;10 importorg.springframework.scheduling.annotation.Async;11 importjavax.imageio.ImageIO;12 importjava.awt.image.BufferedImage;13 importjava.io.ByteArrayOutputStream;14 importjava.io.IOException;15
16 public class RtspToJpgThread extendsThread {17
18 public String FLAG="CLOSE";19
20 privateString rtspUrl;21
22 private String rtspTransportType="udp";23
24 privateFFmpegFrameGrabber grabber;25
26 private final Logger log = LoggerFactory.getLogger(this.getClass());27
28 private boolean isStart = false;29
30 /**
31 * 视频帧率32 */
33 private