NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
frame.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  libvideo: a library for SDI video processing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #pragma once
16 #ifndef LIBVIDEO_FRAME_H_E9E717C1DAB64B1D8E7E877FF5C02FE7
17 #define LIBVIDEO_FRAME_H_E9E717C1DAB64B1D8E7E877FF5C02FE7
18 
19 #include <video/dllexport.h>
20 
21 
22 namespace video
23 {
24 
25 
26 struct LIBVIDEO_DLL_EXPORTS StreamFormat
27 {
29  {
30  PF_NONE = 0,
31  PF_487 = 487, // 720 x 487
32  PF_576 = 576, // 720 x 576
33  PF_720 = 720, // 1280 x 720
34  PF_1035 = 1035, // 1920 x 1035
35  PF_1080 = 1080, // 1920 x 1080
36  PF_2048 = 2048 // 2048 x 1080
37  } format;
38 
39  int get_width() const;
40  int get_height() const;
41 
43  {
44  RR_NONE = 0,
45  RR_23_976 = 23976,
46  RR_24 = 24000,
47  RR_25 = 25000,
48  RR_29_97 = 29970,
49  RR_30 = 30000,
50  RR_50 = 50000,
51  RR_59_94 = 59940,
52  RR_60 = 60000
53  } refreshrate;
54 
56 
57  // in hz or fps
58  float get_refreshrate() const;
59 
60  StreamFormat(PictureFormat pf = PF_NONE, RefreshRate rr = RR_NONE, bool _is_interlaced = false)
61  : format(pf), refreshrate(rr), is_interlaced(_is_interlaced)
62  {
63  }
64 
65  // FIXME: conversion to bool for simple x != NONE check?
66 };
67 
68 
69 struct FrameInfo
70 {
71  // your id for this frame, not used by libvideo
72  unsigned __int64 id;
73 
74  // (arbitrary) time-stamp of when this frame arrived at the capture hardware
75  unsigned __int64 arrival_time;
76  // another (arbitrary) time-stamp when it was scanned out by the hardware
77  unsigned __int64 present_time;
78 
79  // sequence number determined by capture hardware
80  unsigned int sequence_number;
81 };
82 
83 
84 } // namespace
85 
86 #endif // LIBVIDEO_FRAME_H_E9E717C1DAB64B1D8E7E877FF5C02FE7
Definition: frame.h:26
Definition: frame.h:69
unsigned int sequence_number
Definition: frame.h:80
PictureFormat
Definition: frame.h:28
unsigned __int64 id
Definition: frame.h:72
bool is_interlaced
Definition: frame.h:55
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glew.h:1238
RefreshRate
Definition: frame.h:42
Definition: compress.cxx:30
unsigned __int64 arrival_time
Definition: frame.h:75
unsigned __int64 present_time
Definition: frame.h:77
StreamFormat(PictureFormat pf=PF_NONE, RefreshRate rr=RR_NONE, bool _is_interlaced=false)
Definition: frame.h:60