NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
sdiinput.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_SDIINPUT_H_3CD0DE9000FA4846B097E35979071A3B
17 #define LIBVIDEO_SDIINPUT_H_3CD0DE9000FA4846B097E35979071A3B
18 
19 #include <video/device.h>
20 #include <video/frame.h>
21 #include <video/dllexport.h>
22 #include <string>
23 
24 
25 namespace video
26 {
27 
28 
30 class SDIInputImpl;
31 class LIBVIDEO_DLL_EXPORTS SDIInput
32 {
33 private:
34 
35 protected:
37 
38 
39 public:
40  // what to do if format is interlaced
41  // these are ignored if incoming video is progressive
43  {
44  // interlaced video is treated the same way as progressive
46  // one of the fields (not specifying which one) is dropped
48  // both fields are captured and stacked vertically
50  // for either progressive or interlaced input, alternating lines are split into two separate images.
51  SPLIT_LINE_INTERLEAVED_STEREO
52  };
53 
54 
55 public:
64  SDIInput(SDIDevice* dev, InterlacedBehaviour interlaced = DO_NOTHING_SPECIAL, int ringbuffersize = 0);
65  ~SDIInput();
66 
67 private:
68  // not implemented
69  SDIInput(const SDIInput& copyme);
70  SDIInput& operator=(const SDIInput& assignme);
71 
72 
78 public:
80  int get_width() const;
82  int get_height() const;
84 
85 
86 protected:
87  // if true then capture() will prepare the textures, otherwise data is only in pbos
89 
90 
91 public:
93  int get_current_ringbuffer_slot() const;
94 
103  int get_texture_id(int streamno, int ringbufferslot = -1) const;
104 
111  FrameInfo capture();
112 
113 
119  bool has_frame() const;
120 
121 
122 #pragma warning(push)
123 #pragma warning(disable: 4251) // class '...' needs to have dll-interface to be used by clients of class '...'
124 
125 protected:
127 
128 #pragma warning(pop)
129 
130 
131 public:
132  void set_log_filename(const std::string& fn);
133  void flush_log();
134 };
135 
136 
137 } // namespace
138 
139 #endif // LIBVIDEO_SDIINPUT_H_3CD0DE9000FA4846B097E35979071A3B
SDIInputImpl * pimpl
Definition: sdiinput.h:36
Definition: sdiinput.h:49
Definition: sdiinput.h:31
Definition: device.h:30
Definition: frame.h:69
InterlacedBehaviour
Definition: sdiinput.h:42
Definition: sdiinput.h:47
Definition: sdiinput.cxx:46
Definition: sdiinput.h:45
std::string logfilename
Definition: sdiinput.h:126
Definition: compress.cxx:30
GLsizei const GLcharARB ** string
Definition: glew.h:5194
bool preparetextures
Definition: sdiinput.h:88