Remove unused ifdefs
This commit is contained in:
1 parent
b83c9fe919
commit
7e21c5b233
1 file changed
-10
@@ -35,16 +35,12 @@
|
||||
#include "PlaYUVerFramePixelFormats.h"
|
||||
|
||||
using cv::Mat;
|
||||
#if( CV_MAJOR_VERSION >= 3 )
|
||||
using cv::VideoCapture;
|
||||
#endif
|
||||
|
||||
std::vector<PlaYUVerSupportedFormat> StreamHandlerOpenCV::supportedReadFormats()
|
||||
{
|
||||
INI_REGIST_PLAYUVER_SUPPORTED_FMT;
|
||||
#if( CV_MAJOR_VERSION >= 3 )
|
||||
REGIST_PLAYUVER_SUPPORTED_FMT( &StreamHandlerOpenCV::Create, "Device", "/dev/" );
|
||||
#endif
|
||||
END_REGIST_PLAYUVER_SUPPORTED_FMT;
|
||||
}
|
||||
|
||||
@@ -69,7 +65,6 @@ Bool StreamHandlerOpenCV::openHandler( String strFilename, Bool bInput )
|
||||
m_cFilename = strFilename;
|
||||
if( bInput )
|
||||
{
|
||||
#if( CV_MAJOR_VERSION >= 3 )
|
||||
/*
|
||||
* Special filename to handle webcam input
|
||||
*/
|
||||
@@ -89,7 +84,6 @@ Bool StreamHandlerOpenCV::openHandler( String strFilename, Bool bInput )
|
||||
m_dFrameRate = 25;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
m_strCodecName = m_strFormatName =
|
||||
uppercase( strFilename.substr( strFilename.find_last_of( "." ) + 1 ) );
|
||||
@@ -107,14 +101,12 @@ Bool StreamHandlerOpenCV::openHandler( String strFilename, Bool bInput )
|
||||
|
||||
Void StreamHandlerOpenCV::closeHandler()
|
||||
{
|
||||
#if( CV_MAJOR_VERSION >= 3 )
|
||||
if( pcVideoCapture )
|
||||
{
|
||||
pcVideoCapture->release();
|
||||
delete pcVideoCapture;
|
||||
pcVideoCapture = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Bool StreamHandlerOpenCV::configureBuffer( PlaYUVerFrame* pcFrame )
|
||||
@@ -139,7 +131,6 @@ Bool StreamHandlerOpenCV::seek( UInt64 iFrameNum )
|
||||
Bool StreamHandlerOpenCV::read( PlaYUVerFrame* pcFrame )
|
||||
{
|
||||
Bool bRet = false;
|
||||
#if( CV_MAJOR_VERSION >= 3 )
|
||||
if( pcVideoCapture )
|
||||
{
|
||||
Mat cvMat;
|
||||
@@ -148,7 +139,6 @@ Bool StreamHandlerOpenCV::read( PlaYUVerFrame* pcFrame )
|
||||
bRet = pcFrame->fromMat( cvMat );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
Mat cvMat = cv::imread( m_cFilename );
|
||||
bRet = pcFrame->fromMat( cvMat );
|
||||
|
||||
Reference in new issue
Block a user