NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
sdioutput.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_SDIOUTPUT_H_EA0C3F86122E4C0CAA94B17839B8DB01
17 #define LIBVIDEO_SDIOUTPUT_H_EA0C3F86122E4C0CAA94B17839B8DB01
18 
19 #include <video/device.h>
20 #include <video/dllexport.h>
21 
22 
23 namespace video
24 {
25 
26 
27 class SDIOutputImpl;
28 class LIBVIDEO_DLL_EXPORTS SDIOutput
29 {
30 protected:
32 
33 
34 public:
35  // all streams have same format
36  // there can be max 2 streams
37  SDIOutput(SDIDevice* dev, StreamFormat format, int streams = 1, int customtextureid1 = 0, int customtextureid2 = 0);
38  ~SDIOutput();
39 
40 private:
41  SDIOutput(const SDIOutput& copyme);
42  SDIOutput& operator=(const SDIOutput& assignme);
43 
44 
45 public:
46  // stick these into your fbo for rendering
47  int get_texture_id(int streamno);
48 
49  // beware: the timestamp returned here appears to be unrelated to the capture timestamp!
50  unsigned __int64 get_current_hardware_time();
51 
52  // zero means asap in queued order
53  // FIXME: does this block if we fill up the queue?
54  // write a test tool that outputs a grey screen
55  // and then keeps queueing red frames but a few seconds ahead of gpu time
56  // if old entries simply fall off the queue the red frames will never be displayed
57  void present(unsigned __int64 fromwhen = 0);
58 
59  // FIXME: need a way to figure out if frames where dropped or repeated
60 };
61 
62 
63 } // namespace
64 
65 #endif // LIBVIDEO_SDIOUTPUT_H_EA0C3F86122E4C0CAA94B17839B8DB01
Definition: frame.h:26
Definition: device.h:30
Definition: sdioutput.h:28
Definition: sdioutput.cxx:59
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glew.h:1238
Definition: compress.cxx:30
SDIOutputImpl * pimpl
Definition: sdioutput.h:31