mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #18736 from mshabunin:mfx-frame-size-34
This commit is contained in:
@@ -111,6 +111,7 @@ VideoCapture_IntelMFX::VideoCapture_IntelMFX(const cv::String &filename)
|
||||
return;
|
||||
}
|
||||
|
||||
frameSize = Size(params.mfx.FrameInfo.CropW, params.mfx.FrameInfo.CropH);
|
||||
good = true;
|
||||
}
|
||||
|
||||
@@ -126,10 +127,23 @@ VideoCapture_IntelMFX::~VideoCapture_IntelMFX()
|
||||
cleanup(deviceHandler);
|
||||
}
|
||||
|
||||
double VideoCapture_IntelMFX::getProperty(int) const
|
||||
double VideoCapture_IntelMFX::getProperty(int prop) const
|
||||
{
|
||||
MSG(cerr << "MFX: getProperty() is not implemented" << endl);
|
||||
return 0;
|
||||
if (!good)
|
||||
{
|
||||
MSG(cerr << "MFX: can not call getProperty(), backend has not been initialized" << endl);
|
||||
return 0;
|
||||
}
|
||||
switch (prop)
|
||||
{
|
||||
case CAP_PROP_FRAME_WIDTH:
|
||||
return frameSize.width;
|
||||
case CAP_PROP_FRAME_HEIGHT:
|
||||
return frameSize.height;
|
||||
default:
|
||||
MSG(cerr << "MFX: unsupported property" << endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool VideoCapture_IntelMFX::setProperty(int, double)
|
||||
|
||||
@@ -34,6 +34,7 @@ private:
|
||||
MFXVideoDECODE *decoder;
|
||||
SurfacePool *pool;
|
||||
void *outSurface;
|
||||
cv::Size frameSize;
|
||||
bool good;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user