NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
device.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_DEVICE_H_71D5A234EE5E44D996C19C2FC05E80C5
17 #define LIBVIDEO_DEVICE_H_71D5A234EE5E44D996C19C2FC05E80C5
18 
19 #include <video/frame.h>
20 #include <video/dllexport.h>
21 #include <vector>
22 
23 
24 namespace video
25 {
26 
27 
28 class SDIDeviceImpl;
29 class SDIDevice;
30 class LIBVIDEO_DLL_EXPORTS SDIDevice
31 {
32 public:
33  enum Type
34  {
36  OUTPUT
37  } type;
38 
39 protected:
41 
42 public:
43  SDIDeviceImpl* get_pimpl();
44 
45 
46 private:
47  SDIDevice();
48  ~SDIDevice();
49 
50 private:
51  // not implemented
52  SDIDevice(const SDIDevice& copyme);
53  SDIDevice& operator=(const SDIDevice& assignme);
54 
55 
56 public:
57  // note: hardware limitation means that all streams have the same signal format
58  StreamFormat get_format(int streamno);
59 
60  // returns a technical string of what actually comes off the wire, irrespective of what StreamFormat thinks it is.
61  // note that the return value is a statically allocated read-only string; do not free!
62  // only valid after probing with get_format()!
63  const char* get_wireformat();
64 
65  Type get_type() const;
66 
67 
68 #pragma warning(push)
69 #pragma warning(disable: 4251) // class '...' needs to have dll-interface to be used by clients of class '...'
70 
71 private:
72  static std::vector<SDIDevice*> devices;
73 
74 #pragma warning(pop)
75 
76 
77 public:
83  static SDIDevice* get_device(int devno);
84 };
85 
86 }
87 
88 #endif // LIBVIDEO_DEVICE_H_71D5A234EE5E44D996C19C2FC05E80C5
Definition: frame.h:26
Definition: deviceimpl.h:24
GLuint GLuint GLsizei GLenum type
Definition: glew.h:1237
SDIDeviceImpl * pimpl
Definition: device.h:40
Definition: device.h:30
Type
Definition: device.h:33
Definition: device.h:35
Definition: compress.cxx:30