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/analytics/i_metadata_packet.h>
6 #include <nx/sdk/analytics/i_uncompressed_media_frame.h>
7 #include <nx/sdk/i_list.h>
8 #include <nx/sdk/interface.h>
9 
10 namespace nx::sdk::analytics {
11 
13  public Interface<IUncompressedVideoFrame0, IUncompressedMediaFrame0>
14 {
15 public:
16  static auto interfaceId() { return makeId("nx::sdk::analytics::IUncompressedVideoFrame"); }
17 
18  enum class PixelFormat: int
19  {
20  yuv420,
21  argb,
22  abgr,
23  rgba,
24  bgra,
25  rgb,
26  bgr,
27  count
28  };
29 
31  {
32  int numerator;
33  int denominator;
34  };
35 
39  virtual int width() const = 0;
40 
44  virtual int height() const = 0;
45 
47  protected: virtual void getPixelAspectRatio(PixelAspectRatio* outValue) const = 0;
52  {
53  PixelAspectRatio value;
54  getPixelAspectRatio(&value);
55  return value;
56  }
57 
58  virtual PixelFormat pixelFormat() const = 0;
59 
64  virtual int lineSize(int plane) const = 0;
65 };
66 
70 class IUncompressedVideoFrame: public Interface<IUncompressedVideoFrame, IUncompressedVideoFrame0>
71 {
72 public:
73  static auto interfaceId() { return makeId("nx::sdk::analytics::IUncompressedVideoFrame1"); }
74 
76  protected: virtual IList<IMetadataPacket>* getMetadataList() const = 0;
77  public: Ptr<IList<IMetadataPacket>> metadataList() const
78  {
79  return Ptr(getMetadataList());
80  }
81 };
83 
84 } // 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:51
Definition: ptr.h:18
Definition: consuming_device_agent.cpp:22
Definition: i_uncompressed_video_frame.h:12
Definition: i_uncompressed_video_frame.h:70
virtual IList< IMetadataPacket > * getMetadataList() const =0
Definition: i_list.h:10
Definition: i_uncompressed_video_frame.h:30