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/analytics/i_uncompressed_media_frame.h>
8
9 namespace nx {
10 namespace sdk {
11 namespace analytics {
12
13 class IUncompressedVideoFrame: public Interface<IUncompressedVideoFrame, IUncompressedMediaFrame>
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
30 struct PixelAspectRatio
31 {
32 int numerator;
33 int denominator;
34 };
35
39 virtual int width() const = 0;
40
44 virtual int height() const = 0;
45
49 protected: virtual void getPixelAspectRatio(PixelAspectRatio* outValue) const = 0;
50 public: PixelAspectRatio pixelAspectRatio() const
51 {
52 PixelAspectRatio value;
53 getPixelAspectRatio(&value);
54 return value;
55 }
56
57 virtual PixelFormat pixelFormat() const = 0;
58
63 virtual int lineSize(int plane) const = 0;
64 };
65
66 } // namespace analytics
67 } // namespace sdk
68 } // namespace nx
nx::sdk::Interface
Definition: interface.h:28
nx::sdk::analytics::IUncompressedVideoFrame::getPixelAspectRatio
virtual void getPixelAspectRatio(PixelAspectRatio *outValue) const =0
nx::sdk::analytics::IUncompressedVideoFrame::PixelAspectRatio
Definition: i_uncompressed_video_frame.h:30
nx::sdk::analytics::IUncompressedVideoFrame::width
virtual int width() const =0
nx
Definition: apple_utils.h:6
nx::sdk::analytics::IUncompressedVideoFrame::height
virtual int height() const =0
nx::sdk::analytics::IUncompressedVideoFrame
Definition: i_uncompressed_video_frame.h:13
nx::sdk::analytics::IUncompressedVideoFrame::lineSize
virtual int lineSize(int plane) const =0