stub_analytics_plugin  1.6
Network Optix Video Analytics SDK
video_frame.h
1 #pragma once
2 
3 #include <plugins/metadata/media_frame.h>
4 #include <plugins/metadata/utils.h>
5 
6 namespace nx {
7 namespace sdk {
8 namespace analytics {
9 
14 static const nxpl::NX_GUID IID_VideoFrame =
15  {{0x46, 0xb3, 0x52, 0x7f, 0x17, 0xf1, 0x4e, 0x29, 0x98, 0x6f, 0xfa, 0x1a, 0xcc, 0x87, 0xac, 0x0d}};
16 
20 class VideoFrame: public MediaFrame
21 {
22 public:
23 
24  enum class PixelFormat
25  {
26  yuv420,
27  yuv422,
28  yuv444,
29  rgba,
30  rgb,
31  bgr,
32  bgra,
33  };
34 
35  enum class Handle
36  {
37  NoHandle,
38  GLTexture,
39  EGLImageHandle,
40  UserHandle = 1000
41  };
42 
46  virtual int width() const = 0;
47 
51  virtual int height() const = 0;
52 
56  virtual Ratio sampleAspectRatio() const = 0;
57 
58  virtual PixelFormat pixelFormat() const = 0;
59 
63  virtual Handle handleType() const = 0;
64 
68  virtual int handle() const = 0;
69 
70  // TODO: declare bits()
77  virtual bool map() = 0;
78  virtual void unmap() = 0;
79 };
80 
81 } // namespace analytics
82 } // namespace sdk
83 } // namespace nx
virtual Ratio sampleAspectRatio() const =0
virtual Handle handleType() const =0
handle type
Definition: common.h:40
virtual bool map()=0
maps the contents of a video frame to system (CPU addressable) memory.
GUID of plugin interface.
Definition: plugin_api.h:21
The VideoFrame class represents interface of decoded video frame.
Definition: video_frame.h:20
virtual int handle() const =0
Return handle number or 0 if handle is not used.
virtual int width() const =0
Definition: debug.cpp:14
Definition: media_frame.h:19
virtual int height() const =0