nx_metadata_sdk  1.0
Metadata SDK
i_uncompressed_video_frame.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #pragma once
4 
5 #include <nx/sdk/interface.h>
6 
7 #include <nx/sdk/i_list.h>
8 #include <nx/sdk/analytics/i_metadata_packet.h>
9 #include <nx/sdk/analytics/i_uncompressed_media_frame.h>
10 
11 namespace nx::sdk::analytics {
12 
14  public Interface<IUncompressedVideoFrame0, IUncompressedMediaFrame0>
15 {
16 public:
17  static auto interfaceId() { return makeId("nx::sdk::analytics::IUncompressedVideoFrame"); }
18 
19  enum class PixelFormat: int
20  {
21  yuv420,
22  argb,
23  abgr,
24  rgba,
25  bgra,
26  rgb,
27  bgr,
28  count
29  };
30 
32  {
33  int numerator;
34  int denominator;
35  };
36 
40  virtual int width() const = 0;
41 
45  virtual int height() const = 0;
46 
48  protected: virtual void getPixelAspectRatio(PixelAspectRatio* outValue) const = 0;
53  {
54  PixelAspectRatio value;
55  getPixelAspectRatio(&value);
56  return value;
57  }
58 
59  virtual PixelFormat pixelFormat() const = 0;
60 
65  virtual int lineSize(int plane) const = 0;
66 };
67 
71 class IUncompressedVideoFrame: public Interface<IUncompressedVideoFrame, IUncompressedVideoFrame0>
72 {
73 public:
74  static auto interfaceId() { return makeId("nx::sdk::analytics::IUncompressedVideoFrame1"); }
75 
77  protected: virtual IList<IMetadataPacket>* getMetadataList() const = 0;
78  public: Ptr<IList<IMetadataPacket>> metadataList() const
79  {
80  return Ptr(getMetadataList());
81  }
82 };
84 
85 } // namespace nx::sdk::analytics
virtual void getPixelAspectRatio(PixelAspectRatio *outValue) const =0
virtual int lineSize(int plane) const =0
Definition: interface.h:48
PixelAspectRatio pixelAspectRatio() const
Definition: i_uncompressed_video_frame.h:52
Definition: ptr.h:18
Definition: consuming_device_agent.cpp:21
Definition: i_uncompressed_video_frame.h:13
Definition: i_uncompressed_video_frame.h:71
virtual IList< IMetadataPacket > * getMetadataList() const =0
Definition: i_list.h:8
Definition: i_uncompressed_video_frame.h:31