mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2023-10-10 13:37:41 +02:00
Merge pull request #54 from REELcoder/master
Fix PiP window size handling
This commit is contained in:
commit
3578e3212d
@ -1326,6 +1326,7 @@ static VideoStream MyVideoStream[1]; ///< normal video stream
|
||||
|
||||
#ifdef USE_PIP
|
||||
static VideoStream PipVideoStream[1]; ///< pip video stream
|
||||
static int PiPActive = 0, mwx, mwy, mww, mwh; ///< main window frame for PiP
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -3396,6 +3397,10 @@ void GetStats(int *missed, int *duped, int *dropped, int *counter, float *framet
|
||||
*/
|
||||
void ScaleVideo(int x, int y, int width, int height)
|
||||
{
|
||||
if (PiPActive && !(x & y & width & height)) {
|
||||
Info("[softhddev]%s: fullscreen with PiP active.\n", __FUNCTION__);
|
||||
x = mwx; y = mwy; width = mww; height = mwh;
|
||||
}
|
||||
if (MyVideoStream->HwDecoder) {
|
||||
VideoSetOutputPosition(MyVideoStream->HwDecoder, x, y, width, height);
|
||||
}
|
||||
@ -3454,6 +3459,8 @@ void PipStart(int x, int y, int width, int height, int pip_x, int pip_y, int pip
|
||||
VideoStreamOpen(PipVideoStream);
|
||||
}
|
||||
PipSetPosition(x, y, width, height, pip_x, pip_y, pip_width, pip_height);
|
||||
mwx = x; mwy = y; mww = width; mwh = height;
|
||||
PiPActive = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3467,6 +3474,8 @@ void PipStop(void)
|
||||
return;
|
||||
}
|
||||
|
||||
PiPActive = 0;
|
||||
mwx = 0; mwy = 0; mww = 0; mwh = 0;
|
||||
ScaleVideo(0, 0, 0, 0);
|
||||
|
||||
PipVideoStream->Close = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user