Macros | Typedefs | Enumerations
GPMF_common.h File Reference

GPMF Parser library include. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BYTESWAP16(a)   ((((a)>>8)&0xff)|(((a)<<8)&0xff00))
 
#define BYTESWAP2x16(a)   (((a>>8)&0xff)|((a<<8)&0xff00)|((a>>8)&0xff0000)|((a<<8)&0xff000000))
 
#define BYTESWAP32(a)   (((a&0xff)<<24)|((a&0xff00)<<8)|((a>>8)&0xff00)|((a>>24)&0xff))
 
#define BYTESWAP64(a)   (((a&0xff)<<56)|((a&0xff00)<<40)|((a&0xff0000)<<24)|((a&0xff000000)<<8) | ((a>>56)&0xff)|((a>>40)&0xff00)|((a>>24)&0xff0000)|((a>>8)&0xff000000) )
 
#define GPMF_DATA_PACKEDSIZE(a)   ((GPMF_SAMPLE_SIZE(a)*GPMF_SAMPLES(a)))
 
#define GPMF_DATA_SIZE(a)   ((GPMF_SAMPLE_SIZE(a)*GPMF_SAMPLES(a)+3)&~0x3)
 
#define GPMF_ERR   uint32_t
 
#define GPMF_MAKE_TYPE_SIZE_COUNT(t, s, c)   ((t)&0xff)|(((s)&0xff)<<8)|(((c)&0xff)<<24)|(((c)&0xff00)<<8)
 
#define GPMF_SAMPLE_SIZE(a)   (((a)>>8)&0xff)
 
#define GPMF_SAMPLE_TYPE(a)   (a&0xff)
 
#define GPMF_SAMPLES(a)   (((a>>24) & 0xff)|(((a>>16)&0xff)<<8))
 
#define GPMF_VALID_FOURCC(a)
 
#define MAKEID(a, b, c, d)   (((d&0xff)<<24)|((c&0xff)<<16)|((b&0xff)<<8)|(a&0xff))
 
#define NOSWAP8(a)   (a)
 
#define PRINTF_4CC(k)   ((k) >> 0) & 0xff, ((k) >> 8) & 0xff, ((k) >> 16) & 0xff, ((k) >> 24) & 0xff
 
#define STR2FOURCC(s)   ((s[0]<<0)|(s[1]<<8)|(s[2]<<16)|(s[3]<<24))
 

Typedefs

typedef enum GPMF_ERROR GPMF_ERROR
 
typedef enum GPMFKey GPMFKey
 

Enumerations

enum  GPMF_ERROR {
  GPMF_OK = 0, GPMF_ERROR_MEMORY, GPMF_ERROR_BAD_STRUCTURE, GPMF_ERROR_BUFFER_END,
  GPMF_ERROR_FIND, GPMF_ERROR_LAST, GPMF_ERROR_TYPE_NOT_SUPPORTED, GPMF_ERROR_SCALE_NOT_SUPPORTED,
  GPMF_ERROR_SCALE_COUNT, GPMF_ERROR_UNKNOWN_TYPE, GPMF_ERROR_RESERVED
}
 
enum  GPMF_SampleType {
  GPMF_TYPE_STRING_ASCII = 'c', GPMF_TYPE_SIGNED_BYTE = 'b', GPMF_TYPE_UNSIGNED_BYTE = 'B', GPMF_TYPE_SIGNED_SHORT = 's',
  GPMF_TYPE_UNSIGNED_SHORT = 'S', GPMF_TYPE_FLOAT = 'f', GPMF_TYPE_FOURCC = 'F', GPMF_TYPE_SIGNED_LONG = 'l',
  GPMF_TYPE_UNSIGNED_LONG = 'L', GPMF_TYPE_Q15_16_FIXED_POINT = 'q', GPMF_TYPE_Q31_32_FIXED_POINT = 'Q', GPMF_TYPE_SIGNED_64BIT_INT = 'j',
  GPMF_TYPE_UNSIGNED_64BIT_INT = 'J', GPMF_TYPE_DOUBLE = 'd', GPMF_TYPE_STRING_UTF8 = 'u', GPMF_TYPE_UTC_DATE_TIME = 'U',
  GPMF_TYPE_GUID = 'G', GPMF_TYPE_COMPLEX = '?', GPMF_TYPE_COMPRESSED = '#', GPMF_TYPE_NEST = 0,
  GPMF_TYPE_EMPTY = 0xfe, GPMF_TYPE_ERROR = 0xff
}
 
enum  GPMFKey {
  GPMF_KEY_DEVICE = MAKEID('D','E','V','C'), GPMF_KEY_DEVICE_ID = MAKEID('D','V','I','D'), GPMF_KEY_DEVICE_NAME = MAKEID('D','V','N','M'), GPMF_KEY_STREAM = MAKEID('S','T','R','M'),
  GPMF_KEY_STREAM_NAME = MAKEID('S','T','N','M'), GPMF_KEY_SI_UNITS = MAKEID('S','I','U','N'), GPMF_KEY_UNITS = MAKEID('U','N','I','T'), GPMF_KEY_MATRIX = MAKEID('M','T','R','X'),
  GPMF_KEY_ORIENTATION_IN = MAKEID('O','R','I','N'), GPMF_KEY_ORIENTATION_OUT = MAKEID('O','R','I','O'), GPMF_KEY_SCALE = MAKEID('S','C','A','L'), GPMF_KEY_TYPE = MAKEID('T','Y','P','E'),
  GPMF_KEY_TOTAL_SAMPLES = MAKEID('T','S','M','P'), GPMF_KEY_TICK = MAKEID('T','I','C','K'), GPMF_KEY_TOCK = MAKEID('T','O','C','K'), GPMF_KEY_TIME_OFFSET = MAKEID('T','I','M','O'),
  GPMF_KEY_TIMING_OFFSET = MAKEID('T','I','M','O'), GPMF_KEY_TIME_STAMP = MAKEID('S','T','M','P'), GPMF_KEY_TIME_STAMPS = MAKEID('S','T','P','S'), GPMF_KEY_PREFORMATTED = MAKEID('P','F','R','M'),
  GPMF_KEY_TEMPERATURE_C = MAKEID('T','M','P','C'), GPMF_KEY_EMPTY_PAYLOADS = MAKEID('E','M','P','T'), GPMF_KEY_QUANTIZE = MAKEID('Q','U','A','N'), GPMF_KEY_VERSION = MAKEID('V','E','R','S'),
  GPMF_KEY_FREESPACE = MAKEID('F','R','E','E'), GPMF_KEY_REMARK = MAKEID('R','M','R','K'), GPMF_KEY_END = 0
}
 

Detailed Description

GPMF Parser library include.

Version
2.1.0

(C) Copyright 2017-2020 GoPro Inc (http://gopro.com/).

Licensed under either:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file GPMF_common.h.

Macro Definition Documentation

◆ BYTESWAP16

#define BYTESWAP16 (   a)    ((((a)>>8)&0xff)|(((a)<<8)&0xff00))

Definition at line 86 of file GPMF_common.h.

◆ BYTESWAP2x16

#define BYTESWAP2x16 (   a)    (((a>>8)&0xff)|((a<<8)&0xff00)|((a>>8)&0xff0000)|((a<<8)&0xff000000))

Definition at line 87 of file GPMF_common.h.

◆ BYTESWAP32

#define BYTESWAP32 (   a)    (((a&0xff)<<24)|((a&0xff00)<<8)|((a>>8)&0xff00)|((a>>24)&0xff))

Definition at line 85 of file GPMF_common.h.

◆ BYTESWAP64

#define BYTESWAP64 (   a)    (((a&0xff)<<56)|((a&0xff00)<<40)|((a&0xff0000)<<24)|((a&0xff000000)<<8) | ((a>>56)&0xff)|((a>>40)&0xff00)|((a>>24)&0xff0000)|((a>>8)&0xff000000) )

Definition at line 84 of file GPMF_common.h.

◆ GPMF_DATA_PACKEDSIZE

#define GPMF_DATA_PACKEDSIZE (   a)    ((GPMF_SAMPLE_SIZE(a)*GPMF_SAMPLES(a)))

Definition at line 95 of file GPMF_common.h.

◆ GPMF_DATA_SIZE

#define GPMF_DATA_SIZE (   a)    ((GPMF_SAMPLE_SIZE(a)*GPMF_SAMPLES(a)+3)&~0x3)

Definition at line 94 of file GPMF_common.h.

◆ GPMF_ERR

#define GPMF_ERR   uint32_t

Definition at line 47 of file GPMF_common.h.

◆ GPMF_MAKE_TYPE_SIZE_COUNT

#define GPMF_MAKE_TYPE_SIZE_COUNT (   t,
  s,
 
)    ((t)&0xff)|(((s)&0xff)<<8)|(((c)&0xff)<<24)|(((c)&0xff00)<<8)

Definition at line 93 of file GPMF_common.h.

◆ GPMF_SAMPLE_SIZE

#define GPMF_SAMPLE_SIZE (   a)    (((a)>>8)&0xff)

Definition at line 91 of file GPMF_common.h.

◆ GPMF_SAMPLE_TYPE

#define GPMF_SAMPLE_TYPE (   a)    (a&0xff)

Definition at line 92 of file GPMF_common.h.

◆ GPMF_SAMPLES

#define GPMF_SAMPLES (   a)    (((a>>24) & 0xff)|(((a>>16)&0xff)<<8))

Definition at line 90 of file GPMF_common.h.

◆ GPMF_VALID_FOURCC

#define GPMF_VALID_FOURCC (   a)
Value:
(((((a>>24)&0xff)>='a'&&((a>>24)&0xff)<='z') || (((a>>24)&0xff)>='A'&&((a>>24)&0xff)<='Z') || (((a>>24)&0xff)>='0'&&((a>>24)&0xff)<='9') || (((a>>24)&0xff)==' ') ) && \
( (((a>>16)&0xff)>='a'&&((a>>16)&0xff)<='z') || (((a>>16)&0xff)>='A'&&((a>>16)&0xff)<='Z') || (((a>>16)&0xff)>='0'&&((a>>16)&0xff)<='9') || (((a>>16)&0xff)==' ') ) && \
( (((a>>8)&0xff)>='a'&&((a>>8)&0xff)<='z') || (((a>>8)&0xff)>='A'&&((a>>8)&0xff)<='Z') || (((a>>8)&0xff)>='0'&&((a>>8)&0xff)<='9') || (((a>>8)&0xff)==' ') ) && \
( (((a>>0)&0xff)>='a'&&((a>>0)&0xff)<='z') || (((a>>0)&0xff)>='A'&&((a>>0)&0xff)<='Z') || (((a>>0)&0xff)>='0'&&((a>>0)&0xff)<='9') || (((a>>0)&0xff)==' ') ))

Definition at line 96 of file GPMF_common.h.

◆ MAKEID

#define MAKEID (   a,
  b,
  c,
  d 
)    (((d&0xff)<<24)|((c&0xff)<<16)|((b&0xff)<<8)|(a&0xff))

Definition at line 81 of file GPMF_common.h.

◆ NOSWAP8

#define NOSWAP8 (   a)    (a)

Definition at line 88 of file GPMF_common.h.

◆ PRINTF_4CC

#define PRINTF_4CC (   k)    ((k) >> 0) & 0xff, ((k) >> 8) & 0xff, ((k) >> 16) & 0xff, ((k) >> 24) & 0xff

Definition at line 101 of file GPMF_common.h.

◆ STR2FOURCC

#define STR2FOURCC (   s)    ((s[0]<<0)|(s[1]<<8)|(s[2]<<16)|(s[3]<<24))

Definition at line 82 of file GPMF_common.h.

Typedef Documentation

◆ GPMF_ERROR

typedef enum GPMF_ERROR GPMF_ERROR

◆ GPMFKey

typedef enum GPMFKey GPMFKey

Enumeration Type Documentation

◆ GPMF_ERROR

enum GPMF_ERROR
Enumerator
GPMF_OK 
GPMF_ERROR_MEMORY 
GPMF_ERROR_BAD_STRUCTURE 
GPMF_ERROR_BUFFER_END 
GPMF_ERROR_FIND 
GPMF_ERROR_LAST 
GPMF_ERROR_TYPE_NOT_SUPPORTED 
GPMF_ERROR_SCALE_NOT_SUPPORTED 
GPMF_ERROR_SCALE_COUNT 
GPMF_ERROR_UNKNOWN_TYPE 
GPMF_ERROR_RESERVED 

Definition at line 32 of file GPMF_common.h.

◆ GPMF_SampleType

Enumerator
GPMF_TYPE_STRING_ASCII 
GPMF_TYPE_SIGNED_BYTE 
GPMF_TYPE_UNSIGNED_BYTE 
GPMF_TYPE_SIGNED_SHORT 
GPMF_TYPE_UNSIGNED_SHORT 
GPMF_TYPE_FLOAT 
GPMF_TYPE_FOURCC 
GPMF_TYPE_SIGNED_LONG 
GPMF_TYPE_UNSIGNED_LONG 
GPMF_TYPE_Q15_16_FIXED_POINT 
GPMF_TYPE_Q31_32_FIXED_POINT 
GPMF_TYPE_SIGNED_64BIT_INT 
GPMF_TYPE_UNSIGNED_64BIT_INT 
GPMF_TYPE_DOUBLE 
GPMF_TYPE_STRING_UTF8 
GPMF_TYPE_UTC_DATE_TIME 
GPMF_TYPE_GUID 
GPMF_TYPE_COMPLEX 
GPMF_TYPE_COMPRESSED 
GPMF_TYPE_NEST 
GPMF_TYPE_EMPTY 
GPMF_TYPE_ERROR 

Definition at line 49 of file GPMF_common.h.

◆ GPMFKey

enum GPMFKey
Enumerator
GPMF_KEY_DEVICE 
GPMF_KEY_DEVICE_ID 
GPMF_KEY_DEVICE_NAME 
GPMF_KEY_STREAM 
GPMF_KEY_STREAM_NAME 
GPMF_KEY_SI_UNITS 
GPMF_KEY_UNITS 
GPMF_KEY_MATRIX 
GPMF_KEY_ORIENTATION_IN 
GPMF_KEY_ORIENTATION_OUT 
GPMF_KEY_SCALE 
GPMF_KEY_TYPE 
GPMF_KEY_TOTAL_SAMPLES 
GPMF_KEY_TICK 
GPMF_KEY_TOCK 
GPMF_KEY_TIME_OFFSET 
GPMF_KEY_TIMING_OFFSET 
GPMF_KEY_TIME_STAMP 
GPMF_KEY_TIME_STAMPS 
GPMF_KEY_PREFORMATTED 
GPMF_KEY_TEMPERATURE_C 
GPMF_KEY_EMPTY_PAYLOADS 
GPMF_KEY_QUANTIZE 
GPMF_KEY_VERSION 
GPMF_KEY_FREESPACE 
GPMF_KEY_REMARK 
GPMF_KEY_END 

Definition at line 104 of file GPMF_common.h.



gpmf_metadata_extractor
Author(s): Martin Pecka , Liam Samuel Pach
autogenerated on Wed May 28 2025 02:07:33