DJI Onboard SDK  4.0
dji_camera_stream.hpp
Go to the documentation of this file.
1 
10 #ifndef DJICAMERASTREAM_H
11 #define DJICAMERASTREAM_H
12 
13 #include <string>
14 #include "dji_camera_image.hpp"
15 class DJICameraStreamLink;
16 class DJICameraStreamDecoder;
17 
18 class DJICameraStream
19 {
20 public:
21  DJICameraStream(CameraType camType = FPV_CAMERA);
22  ~DJICameraStream();
23 
24  bool newImageIsReady();
25 
31  bool getCurrentImage(CameraRGBImage& copyOfImage);
32 
33  bool startCameraStream(CameraImageCallback cb = NULL, void * cbParam = NULL);
34 
35  void stopCameraStream();
36 
37  bool startCameraH264(H264Callback cb = NULL, void * cbParam = NULL);
38 
39  void stopCameraH264();
40 
41 private:
42  DJICameraStreamLink *rawDataStream;
43  DJICameraStreamDecoder *decoder;
44 
45  CameraType cameraType;
46  std::string cameraNameStr;
47  CameraRGBImage latestImage;
48 };
49 
50 #endif // DJICAMERASTREAM_H
Data structure for the image frames from the FPV camera or main camera.
Definition: dji_camera_image.hpp:17