mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-29 10:06:28 +00:00
[host] removed namespace sillyness
This commit is contained in:
parent
23b0dc7c81
commit
fc192c0016
@ -17,6 +17,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NvFBC.h"
|
#include "NvFBC.h"
|
||||||
|
using namespace Capture;
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -29,22 +30,19 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
#define NVFBC_LIBRARY_NAME "NvFBC.dll"
|
#define NVFBC_LIBRARY_NAME "NvFBC.dll"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Capture
|
NvFBC::NvFBC() :
|
||||||
{
|
|
||||||
|
|
||||||
NvFBC::NvFBC() :
|
|
||||||
m_initialized(false),
|
m_initialized(false),
|
||||||
m_hDLL(NULL),
|
m_hDLL(NULL),
|
||||||
m_nvFBC(NULL)
|
m_nvFBC(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NvFBC::~NvFBC()
|
NvFBC::~NvFBC()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NvFBC::Initialize()
|
bool NvFBC::Initialize()
|
||||||
{
|
{
|
||||||
if (m_initialized)
|
if (m_initialized)
|
||||||
DeInitialize();
|
DeInitialize();
|
||||||
|
|
||||||
@ -113,7 +111,6 @@ namespace Capture
|
|||||||
params.pDevice = NULL;
|
params.pDevice = NULL;
|
||||||
params.dwAdapterIdx = 0;
|
params.dwAdapterIdx = 0;
|
||||||
|
|
||||||
|
|
||||||
if (m_fnCreateEx(¶ms) != NVFBC_SUCCESS)
|
if (m_fnCreateEx(¶ms) != NVFBC_SUCCESS)
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("Failed to create an instance of NvFBC");
|
DEBUG_ERROR("Failed to create an instance of NvFBC");
|
||||||
@ -162,10 +159,10 @@ namespace Capture
|
|||||||
|
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NvFBC::DeInitialize()
|
void NvFBC::DeInitialize()
|
||||||
{
|
{
|
||||||
m_memcpy.DeInitialize();
|
m_memcpy.DeInitialize();
|
||||||
|
|
||||||
m_frameBuffer = NULL;
|
m_frameBuffer = NULL;
|
||||||
@ -190,34 +187,34 @@ namespace Capture
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_initialized = false;
|
m_initialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameType NvFBC::GetFrameType()
|
FrameType NvFBC::GetFrameType()
|
||||||
{
|
{
|
||||||
if (!m_initialized)
|
if (!m_initialized)
|
||||||
return FRAME_TYPE_INVALID;
|
return FRAME_TYPE_INVALID;
|
||||||
|
|
||||||
return FRAME_TYPE_RGB;
|
return FRAME_TYPE_RGB;
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameComp NvFBC::GetFrameCompression()
|
FrameComp NvFBC::GetFrameCompression()
|
||||||
{
|
{
|
||||||
if (!m_initialized)
|
if (!m_initialized)
|
||||||
return FRAME_COMP_NONE;
|
return FRAME_COMP_NONE;
|
||||||
|
|
||||||
return FRAME_COMP_NONE;
|
return FRAME_COMP_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t NvFBC::GetMaxFrameSize()
|
size_t NvFBC::GetMaxFrameSize()
|
||||||
{
|
{
|
||||||
if (!m_initialized)
|
if (!m_initialized)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return m_maxCaptureWidth * m_maxCaptureHeight * 3;
|
return m_maxCaptureWidth * m_maxCaptureHeight * 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NvFBC::GrabFrame(struct FrameInfo & frame)
|
bool NvFBC::GrabFrame(struct FrameInfo & frame)
|
||||||
{
|
{
|
||||||
if (!m_initialized)
|
if (!m_initialized)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -264,6 +261,4 @@ namespace Capture
|
|||||||
|
|
||||||
DEBUG_ERROR("Failed to grab frame");
|
DEBUG_ERROR("Failed to grab frame");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user