Hello, thank you very much for checking this question. When I use screen capture plu-in, the mfxExtScreenCaptureParam parameter is not added, and when I add the mfxExtScreenCaptureParam parameter and set it, it will report an error.
without mfxExtScreenCaptureParam :
//...........mfxExtScreenCaptureParam..............
mfxVideoParam par;
.........................
mfxExtScreenCaptureParam extScPar;
mfxExtBuffer *mfxextbuf,*dirtymfxextbuf;
mfxExtDirtyRect mfxexdirRect;
memset(&mfxexdirRect, 0, sizeof(mfxexdirRect));
memset(&mfxextbuf, 0, sizeof(mfxextbuf));
memset(&extScPar, 0, sizeof(extScPar));
extScPar.Header.BufferId = MFX_EXTBUFF_SCREEN_CAPTURE_PARAM;
extScPar.Header.BufferSz = sizeof(mfxExtScreenCaptureParam);
extScPar.EnableDirtyRect = 1;
extScPar.DisplayIndex = 0;
extScPar.EnableCursorCapture = 0;
mfxextbuf= (mfxExtBuffer*)&extScPar;
//mfxexdirRect = &mfxextbuf;
mfxexdirRect.Header.BufferId = MFX_EXTBUFF_DIRTY_RECTANGLES;
mfxexdirRect.Header.BufferSz = sizeof(mfxExtScreenCaptureParam);
dirtymfxextbuf = (mfxExtBuffer*)&mfxexdirRect;
// par.NumExtParam = 1;
//par.ExtParam = &mfxextbuf;
//...........mfxExtScreenCaptureParam..............
mfxSts = MFXVideoDECODE_Init(mfxSes, &par);
36704 2018-9-12 19:28:26:399 par.Protected=0
36704 2018-9-12 19:28:26:399 par.IOPattern=MFX_IOPATTERN_OUT_VIDEO_MEMORY
36704 2018-9-12 19:28:26:399 par.NumExtParam=0
36704 2018-9-12 19:28:26:399 par.ExtParam=0000000000000000
36704 2018-9-12 19:28:26:399 par.reserved2=0
36704 2018-9-12 19:28:26:399 function: MFXVideoDECODE_Init(84.0707 msec, status=MFX_WRN_PARTIAL_ACCELERATION) -
using mfxExtScreenCaptureParam :
mfxVideoParam par;
..........................
//...........mfxExtScreenCaptureParam..............
mfxExtScreenCaptureParam extScPar;
mfxExtBuffer *mfxextbuf,*dirtymfxextbuf;
mfxExtDirtyRect mfxexdirRect;
memset(&mfxexdirRect, 0, sizeof(mfxexdirRect));
memset(&mfxextbuf, 0, sizeof(mfxextbuf));
memset(&extScPar, 0, sizeof(extScPar));
extScPar.Header.BufferId = MFX_EXTBUFF_SCREEN_CAPTURE_PARAM;
extScPar.Header.BufferSz = sizeof(mfxExtScreenCaptureParam);
extScPar.EnableDirtyRect = 1;
extScPar.DisplayIndex = 0;
extScPar.EnableCursorCapture = 0;
mfxextbuf= (mfxExtBuffer*)&extScPar;
//mfxexdirRect = &mfxextbuf;
mfxexdirRect.Header.BufferId = MFX_EXTBUFF_DIRTY_RECTANGLES;
mfxexdirRect.Header.BufferSz = sizeof(mfxExtScreenCaptureParam);
dirtymfxextbuf = (mfxExtBuffer*)&mfxexdirRect;
par.NumExtParam = 1;
par.ExtParam = &mfxextbuf;
//...........mfxExtScreenCaptureParam..............
mfxSts = MFXVideoDECODE_Init(mfxSes, &par);
43912 2018-9-12 19:37:54:239 par.Protected=0
43912 2018-9-12 19:37:54:239 par.IOPattern=MFX_IOPATTERN_OUT_VIDEO_MEMORY
43912 2018-9-12 19:37:54:239 par.NumExtParam=1
43912 2018-9-12 19:37:54:239 par.ExtParam=00000070B0CFC7A8
43912 2018-9-12 19:37:54:239 par.ExtParam[0]=00000070B0CFC750
43912 2018-9-12 19:37:54:239 par.ExtParam[0].BufferId=1095779155
43912 2018-9-12 19:37:54:239 par.ExtParam[0].BufferSz=64
43912 2018-9-12 19:37:54:239 par.reserved2=0
43912 2018-9-12 19:37:54:239 function: MFXVideoDECODE_Init(0.0306667 msec, status=MFX_ERR_INVALID_VIDEO_PARAM) -
how can i to solve this problem??thankyou for your help!best wishes for u!