MeiCam SDK For iOS  3.7.2
NvsCommonDef.h
Go to the documentation of this file.
1 //================================================================================
2 //
3 // (c) Copyright China Digital Video (Beijing) Limited, 2016. All rights reserved.
4 //
5 // This code and information is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the implied
7 // warranties of merchantability and/or fitness for a particular purpose.
8 //
9 //--------------------------------------------------------------------------------
10 // Birth Date: Dec 29. 2016
11 // Author: NewAuto video team
12 //================================================================================
13 
16 #pragma once
17 
18 #include <stdint.h>
19 
20 #define NVS_EXPORT __attribute__((visibility("default")))
21 
28 typedef enum {
35 
41 
44 
51 typedef enum {
57 
64 typedef enum
65 {
71 
78 typedef enum
79 {
84 
91 typedef enum
92 {
93  NvsVideoColorTransfer_SDR_VIDEO = 0, //SMPTE 170M transfer characteristic curve used by BT.601/BT.709/BT.2020. This is the curve used by most non-HDR video content.
94  NvsVideoColorTransfer_ST2084, //SMPTE ST 2084 transfer function. This is used by some HDR video content
95  NvsVideoColorTransfer_HLG //ARIB STD-B67 hybrid-log-gamma transfer function. This is used by some HDR video content.
97 
104 typedef enum NvsRoleInTheme
105 {
110 
117 typedef enum NvsTextAlignment
118 {
126 
134 {
138 
146 {
150 
157 typedef enum NvsCategory
158 {
163 
171 {
176 
184 {
189 
190 
197 typedef enum {
209 
221 
234 
235 
242 typedef enum {
247 
254 typedef struct {
255  int num;
256  int den;
257 } NvsRational;
258 
265 typedef struct {
266  int width;
267  int height;
268 } NvsSize;
269 
276 typedef struct {
277  float left;
278  float right;
279  float bottom;
280  float top;
281 } NvsRect;
282 
289 typedef struct {
290  unsigned int sampleRate;
292  unsigned int channelCount;
294 
301 typedef struct {
302  unsigned int imageWidth;
303  unsigned int imageHeight;
307 
318 typedef struct {
319  float r, g, b, a;
320 } NvsColor;
321 
328 typedef struct {
329  float x, y;
330 } NvsPosition2D;
331 
338 typedef struct {
339  float x, y, z;
340 } NvsPosition3D;
341 
348 typedef struct {
349  double x;
350  double y;
351 } NvsPointD;
352 
353 #define NVS_VIDEO_FRAME_MAX_PLANES 4
354 
361 typedef struct{
364  int planeRowPitch[NVS_VIDEO_FRAME_MAX_PLANES];
365  void* planePtr[NVS_VIDEO_FRAME_MAX_PLANES];
367  int64_t frameTimestamp;
368  bool isRec601;
370 
374 
375 #ifndef NV_AUDIO_MAX_CHANNEL_COUNT
376  #define NV_AUDIO_MAX_CHANNEL_COUNT 8
377 #endif
378 
379 typedef struct{
381  int planeSizeInBytes; // For planar audio: size in bytes of each plane(channel)
382  // For packed audio: size in bytes of total samples
387  int64_t timeStamp;
389 
397 typedef struct{
NvsAudSmpFmt_S32P
@ NvsAudSmpFmt_S32P
signed 32 bit,planer
Definition: NvsCommonDef.h:38
NvsVideoColorTransfer_ST2084
@ NvsVideoColorTransfer_ST2084
Definition: NvsCommonDef.h:94
NvsTextAlignmentBottom
@ NvsTextAlignmentBottom
Definition: NvsCommonDef.h:123
NvsRoleInTheme
NvsRoleInTheme
The role of the clip in the theme.
Definition: NvsCommonDef.h:105
NvsPixelFormat_YUV420
@ NvsPixelFormat_YUV420
YUV 4:2:0 12bpp (Three channels, one luminance channel, the other two are U component and V component...
Definition: NvsCommonDef.h:173
NvsAudioSampleBuffers::sampleRate
int sampleRate
audio sample rate
Definition: NvsCommonDef.h:383
NvsThemeCategory
@ NvsThemeCategory
Theme category.
Definition: NvsCommonDef.h:161
NvsAudioResolution::sampleRate
unsigned int sampleRate
Sampling rate.
Definition: NvsCommonDef.h:290
NvsRoleInThemeGeneral
@ NvsRoleInThemeGeneral
General.
Definition: NvsCommonDef.h:106
NvsVideoColorTransfer_HLG
@ NvsVideoColorTransfer_HLG
Definition: NvsCommonDef.h:95
NvsRoleInThemeTrailer
@ NvsRoleInThemeTrailer
Trailer.
Definition: NvsCommonDef.h:108
NvsLiveWindowHDRDisplayMode_TONE_MAP_SDR
@ NvsLiveWindowHDRDisplayMode_TONE_MAP_SDR
If the device supports HDR, use HDR display, and use NO HDR mode display if it is not supported.
Definition: NvsCommonDef.h:245
NvsLiveWindowHDRDisplayMode_Device
@ NvsLiveWindowHDRDisplayMode_Device
If the device supports HDR, use HDR display.
Definition: NvsCommonDef.h:244
NvsVideoFrameInfo::isRec601
bool isRec601
Whether color space is BT.601.
Definition: NvsCommonDef.h:368
NvsPointD::y
double y
Definition: NvsCommonDef.h:350
NvsLetterSpacingType
NvsLetterSpacingType
letter spacing type
Definition: NvsCommonDef.h:134
NvsVideoResolutionBitDepth_Auto
@ NvsVideoResolutionBitDepth_Auto
The bit depth of processing pixel is adaptive. For example, for videos with HDR in editing,...
Definition: NvsCommonDef.h:187
NvsLiveWindowFillModePreserveAspectFit
@ NvsLiveWindowFillModePreserveAspectFit
The image is evenly scaled to fit the window, without cropping.
Definition: NvsCommonDef.h:220
NvsVideoFrameInfo::flipHorizontally
bool flipHorizontally
Shows whether current image requires horizontal flip or not.
Definition: NvsCommonDef.h:372
NvsTextAlignmentTop
@ NvsTextAlignmentTop
Definition: NvsCommonDef.h:122
NvsLiveWindowFillModePreserveAspectCrop
@ NvsLiveWindowFillModePreserveAspectCrop
The image is evenly filled and cropped if necessary (default mode).
Definition: NvsCommonDef.h:208
NvsRect
Rectangle.
Definition: NvsCommonDef.h:276
NvsAVFileType_Unknown
@ NvsAVFileType_Unknown
Unknown.
Definition: NvsCommonDef.h:52
NvsVideoFrameInfo
Video frame information.
Definition: NvsCommonDef.h:361
NvsLetterSpacingTypeAbsolute
@ NvsLetterSpacingTypeAbsolute
Definition: NvsCommonDef.h:136
NvsTextAlignmentLeft
@ NvsTextAlignmentLeft
Definition: NvsCommonDef.h:119
NOT_USE_ASSET_DEFAULT_PARAM
@ NOT_USE_ASSET_DEFAULT_PARAM
Definition: NvsCommonDef.h:148
NvsCapturedAudioSampleInfo
Audio sample info from capturing.
Definition: NvsCommonDef.h:397
NvsRect::right
float right
Right.
Definition: NvsCommonDef.h:278
NvsAudioResolution::sampleFormat
NvsAudioSampleFormat sampleFormat
Sampling format.
Definition: NvsCommonDef.h:291
NvsAVFileType_Image
@ NvsAVFileType_Image
Image.
Definition: NvsCommonDef.h:55
NvsRational
Rational value.
Definition: NvsCommonDef.h:254
NvsAudSmpFmt_DBL
@ NvsAudSmpFmt_DBL
double precision float
Definition: NvsCommonDef.h:34
NvsPosition3D
3D coordinate structure
Definition: NvsCommonDef.h:338
USE_ASSET_DEFAULT_PARAM
@ USE_ASSET_DEFAULT_PARAM
Definition: NvsCommonDef.h:147
NvsAudSmpFmt_FLTP
@ NvsAudSmpFmt_FLTP
single precision float,planar
Definition: NvsCommonDef.h:39
NvsRect::bottom
float bottom
Bottom.
Definition: NvsCommonDef.h:279
NvsRect::left
float left
Left.
Definition: NvsCommonDef.h:277
NvsVideoRotation_270
@ NvsVideoRotation_270
Definition: NvsCommonDef.h:69
NvsVideoCodecType
NvsVideoCodecType
Video codec type.
Definition: NvsCommonDef.h:79
NvsAudioSampleBuffers::planeSizeInBytes
int planeSizeInBytes
Definition: NvsCommonDef.h:381
NvsSize::height
int height
Height.
Definition: NvsCommonDef.h:267
NvsLiveWindowHDRDisplayMode_SDR
@ NvsLiveWindowHDRDisplayMode_SDR
Forced to use SDR display, regardless of whether the device supports HDR display.
Definition: NvsCommonDef.h:243
NvsVideoFrameInfo::frameTimestamp
int64_t frameTimestamp
The captured image's timestamp (in microseconds)
Definition: NvsCommonDef.h:367
NvsVideoRotation_180
@ NvsVideoRotation_180
Definition: NvsCommonDef.h:68
NvsVideoFrameInfo::frameHeight
int frameHeight
The captured image's height (in pixel)
Definition: NvsCommonDef.h:363
NvsAudSmpFmt_S32
@ NvsAudSmpFmt_S32
signed 32 bit
Definition: NvsCommonDef.h:32
NvsAudSmpFmt_DBLP
@ NvsAudSmpFmt_DBLP
double precision float,olanar
Definition: NvsCommonDef.h:40
NvsPointD
2D coordinate point structure. The parameter type is double.
Definition: NvsCommonDef.h:348
NvsAudSmpFmt_S16
@ NvsAudSmpFmt_S16
signed 16 bit
Definition: NvsCommonDef.h:31
NvsAudSmpFmt_U8
@ NvsAudSmpFmt_U8
unsigned 8 bit
Definition: NvsCommonDef.h:30
NvsRational::den
int den
Denominator.
Definition: NvsCommonDef.h:256
NvsAudioSampleBuffers::sampleFormat
NvsAudioSampleFormat sampleFormat
audio sample fromat
Definition: NvsCommonDef.h:385
NvsAVFileType
NvsAVFileType
File type.
Definition: NvsCommonDef.h:51
NvsUserCategory
@ NvsUserCategory
User-defined type.
Definition: NvsCommonDef.h:160
NvsPointD::x
double x
Definition: NvsCommonDef.h:349
NvsLiveWindowFillModeStretch
@ NvsLiveWindowFillModeStretch
The image is scaled to fit the window.
Definition: NvsCommonDef.h:232
NvsAVFileType_Audio
@ NvsAVFileType_Audio
Audio.
Definition: NvsCommonDef.h:54
NvsVideoFrameInfo::isFullRangeYUV
bool isFullRangeYUV
Whether the yuv value range is full range(0-255)
Definition: NvsCommonDef.h:369
NvsVideoRotation
NvsVideoRotation
Video rotation.
Definition: NvsCommonDef.h:65
NvsLiveWindowHDRDisplayMode
NvsLiveWindowHDRDisplayMode
Live Window fill mode.
Definition: NvsCommonDef.h:242
NvsVideoFramePixelFormat
NvsVideoFramePixelFormat
Video frame pixel format.
Definition: NvsCommonDef.h:171
NvsVideoCodecType_H264
@ NvsVideoCodecType_H264
Definition: NvsCommonDef.h:81
NvsAudSmpFmt_Count
@ NvsAudSmpFmt_Count
Definition: NvsCommonDef.h:42
NvsColor
Self-defined color.
Definition: NvsCommonDef.h:318
NvsVideoCodecType_H265
@ NvsVideoCodecType_H265
Definition: NvsCommonDef.h:82
NvsVideoColorTransfer
NvsVideoColorTransfer
Color Transfer Characteristic.
Definition: NvsCommonDef.h:92
NvsPosition2D::y
float y
Definition: NvsCommonDef.h:329
NvsTextAlignmentCenter
@ NvsTextAlignmentCenter
Definition: NvsCommonDef.h:120
NvsPosition3D::z
float z
Definition: NvsCommonDef.h:339
NvsCapturedAudioSampleInfo::sampleRate
int sampleRate
audio sample rate
Definition: NvsCommonDef.h:398
NvsAudioResolution::channelCount
unsigned int channelCount
Channel count.
Definition: NvsCommonDef.h:292
NvsAudSmpFmt_None
@ NvsAudSmpFmt_None
None.
Definition: NvsCommonDef.h:29
NvsLetterSpacingTypePercentage
@ NvsLetterSpacingTypePercentage
Definition: NvsCommonDef.h:135
NvsDefaultCategory
@ NvsDefaultCategory
Default type.
Definition: NvsCommonDef.h:159
NvsAudSmpFmt_S16P
@ NvsAudSmpFmt_S16P
signed 16 bit,planer
Definition: NvsCommonDef.h:37
NvsVideoFrameInfo::frameWidth
int frameWidth
The captured image's width (in pixel)
Definition: NvsCommonDef.h:362
NvsTextAlignment
NvsTextAlignment
Text alignment style.
Definition: NvsCommonDef.h:118
NvsColor::r
float r
Definition: NvsCommonDef.h:319
NvsAudSmpFmt_FLT
@ NvsAudSmpFmt_FLT
single precision float
Definition: NvsCommonDef.h:33
NvsVideoCodecType_Unknown
@ NvsVideoCodecType_Unknown
Definition: NvsCommonDef.h:80
NvsVideoResolutionBitDepth_16Bit_Float
@ NvsVideoResolutionBitDepth_16Bit_Float
The bit depth of processing pixel is half float.
Definition: NvsCommonDef.h:186
NvsVideoResolutionBitDepth_8Bit
@ NvsVideoResolutionBitDepth_8Bit
The bit depth of processing pixel is 8bit.
Definition: NvsCommonDef.h:185
NvsLiveWindowFillMode
NvsLiveWindowFillMode
Live Window fill mode.
Definition: NvsCommonDef.h:197
NVS_VIDEO_FRAME_MAX_PLANES
#define NVS_VIDEO_FRAME_MAX_PLANES
Definition: NvsCommonDef.h:353
NvsAudioResolution
Audio resolution.
Definition: NvsCommonDef.h:289
NvsAudioSampleBuffers::channelCount
int channelCount
audio channel count
Definition: NvsCommonDef.h:384
NvsSize::width
int width
Width.
Definition: NvsCommonDef.h:266
NvsTextAlignmentVCenter
@ NvsTextAlignmentVCenter
Definition: NvsCommonDef.h:124
NvsPixelFormat_BGRA
@ NvsPixelFormat_BGRA
BGRA.
Definition: NvsCommonDef.h:174
NvsAudioSampleFormat
NvsAudioSampleFormat
Audio sampling format.
Definition: NvsCommonDef.h:28
NvsTextAlignmentRight
@ NvsTextAlignmentRight
Definition: NvsCommonDef.h:121
NvsVideoResolution
Video resolution.
Definition: NvsCommonDef.h:301
NvsVideoResolution::bitDepth
NvsVideoResolutionBitDepth bitDepth
Default is 8Bit.
Definition: NvsCommonDef.h:305
NvsVideoRotation_0
@ NvsVideoRotation_0
Definition: NvsCommonDef.h:66
NvsAssetDefaultParam
NvsAssetDefaultParam
Uses the default caption package.
Definition: NvsCommonDef.h:146
NvsAudSmpFmt_U8P
@ NvsAudSmpFmt_U8P
unsigned 8 bit,planer
Definition: NvsCommonDef.h:36
NvsPixelFormat_Nv12
@ NvsPixelFormat_Nv12
YUV 4:2:0 12bpp (Two channels, one channel is a continuous luminance channel, and the other channel i...
Definition: NvsCommonDef.h:172
NvsPosition2D
2D coordinate structure
Definition: NvsCommonDef.h:328
NvsRect::top
float top
Top.
Definition: NvsCommonDef.h:280
NvsAudioSampleBuffers::timeStamp
int64_t timeStamp
the timestamp of the audio sample buffer in microseconds
Definition: NvsCommonDef.h:387
NvsAudioSampleBuffers::actualSampleCount
int actualSampleCount
actual audio sample count in audioBuffer
Definition: NvsCommonDef.h:386
NvsAudioSampleBuffers
Definition: NvsCommonDef.h:379
NvsVideoRotation_90
@ NvsVideoRotation_90
Definition: NvsCommonDef.h:67
NvsVideoResolution::imageHeight
unsigned int imageHeight
Image height.
Definition: NvsCommonDef.h:303
NvsVideoResolution::imageWidth
unsigned int imageWidth
Image width.
Definition: NvsCommonDef.h:302
NV_AUDIO_MAX_CHANNEL_COUNT
#define NV_AUDIO_MAX_CHANNEL_COUNT
Definition: NvsCommonDef.h:376
NvsRational::num
int num
Numerator.
Definition: NvsCommonDef.h:255
NvsSize
Size.
Definition: NvsCommonDef.h:265
NvsVideoFrameInfo::displayRotation
int displayRotation
Shows the angle at which the current image needs to be rotated.
Definition: NvsCommonDef.h:371
NvsAVFileType_AudioVideo
@ NvsAVFileType_AudioVideo
Video.
Definition: NvsCommonDef.h:53
NvsRoleInThemeTitle
@ NvsRoleInThemeTitle
Title.
Definition: NvsCommonDef.h:107
NvsVideoColorTransfer_SDR_VIDEO
@ NvsVideoColorTransfer_SDR_VIDEO
Definition: NvsCommonDef.h:93
NvsVideoResolutionBitDepth
NvsVideoResolutionBitDepth
Video frame pixel format.
Definition: NvsCommonDef.h:184
NvsVideoResolution::imagePAR
NvsRational imagePAR
Pixel ratio (only 1:1)
Definition: NvsCommonDef.h:304
NvsCategory
NvsCategory
The type of clip in theme.
Definition: NvsCommonDef.h:158
NvsVideoFrameInfo::pixelFormat
NvsVideoFramePixelFormat pixelFormat
The captured image's format.
Definition: NvsCommonDef.h:366