Skip to content

Commit 6d72670

Browse files
author
janhgm
committed
Redesigned code that did region and pixel calculation.
Removed code that was only patching what was not correct. Now all code follow the same rules to calculate the size of the region. As far as I have tested it all applicable region options grab the correct screen area, report the correct sizing in the progress monitor and the video file reports the same size either.
1 parent fb2f7e0 commit 6d72670

File tree

6 files changed

+109
-116
lines changed

6 files changed

+109
-116
lines changed

CamStudio/CamLib/CamRect.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ void NormalizeRect(LPRECT prc)
2828

2929
void FixRectSizePos(LPRECT prc, int maxxScreen, int maxyScreen, int minxScreen, int minyScreen)
3030
{
31-
TRACE( _T("## FixRectSizePos # PRE # prc: top=%d bottom=%d left=%d right=%d\n"), prc->top, prc->bottom, prc->left, prc->right );
31+
// TRACE( _T("## FixRectSizePos # PRE # prc: top=%d bottom=%d left=%d right=%d\n"), prc->top, prc->bottom, prc->left, prc->right );
3232
NormalizeRect(prc);
3333

3434
int width = prc->right - prc->left + 1;
3535
int height = prc->bottom - prc->top + 1;
36-
TRACE( _T("## FixRectSizePos # # prc: width=%d height=%d \n"), width, height );
36+
// TRACE( _T("## FixRectSizePos # # prc: width=%d height=%d \n"), width, height );
3737

3838
//check that rectangle isn't too wide
3939
if (width > abs(maxxScreen-minxScreen)) {
@@ -68,5 +68,5 @@ void FixRectSizePos(LPRECT prc, int maxxScreen, int maxyScreen, int minxScreen,
6868
prc->bottom = maxyScreen - 1;
6969
}
7070
}
71-
TRACE( _T("## FixRectSizePos # POST # prc: top=%d bottom=%d left=%d right=%d\n"), prc->top, prc->bottom, prc->left, prc->right );
71+
//TRACE( _T("## FixRectSizePos # POST # prc: top=%d bottom=%d left=%d right=%d\n"), prc->top, prc->bottom, prc->left, prc->right );
7272
}

CamStudio/Recorder/FixedRegion.cpp

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ CFixedRegionDlg::CFixedRegionDlg(CWnd* pParent /*=NULL*/)
3232
, m_iWidth(1)
3333
, m_iHeight(1)
3434
{
35+
// TRACE ( _T("## Why are m_itop and m_ileft defined here as 1,1 instead of 0,0. Not correct I beieve\n") );
36+
3537
//{{AFX_DATA_INIT(CFixedRegionDlg)
3638
// NOTE: the ClassWizard will add member initialization here
3739
//}}AFX_DATA_INIT
@@ -84,7 +86,8 @@ void CFixedRegionDlg::OnOK()
8486
// Not Correct, one to high because MinXY is zero an MaxXY is width/height no of pixels.
8587
int maxWidth = abs(maxxScreen - minxScreen); // Assuming number first pixel is one not zero.
8688
int maxHeight = abs(maxyScreen - minyScreen);
87-
89+
// TRACE(_T("## CFixedRegionDlg::OnOK / maxWidth=[%d], maxHeight=[%d]\n"), maxWidth, maxHeight );
90+
8891
if (m_iWidth < 0)
8992
{
9093
MessageOut(m_hWnd, IDS_STRING_WIDTHGREATER, IDS_STRING_NOTE,MB_OK | MB_ICONEXCLAMATION);
@@ -143,7 +146,7 @@ void CFixedRegionDlg::OnOK()
143146
if (m_iWidth <= 0)
144147
{
145148
//TODO -- where did these constants came from? Get rid of 'em, put 'em in an ini or #define them somewhere
146-
//Answer: See struct sRegionOpts in Profile.h
149+
//Answer: See struct sRegionOpts in Profile.h. An area of 240x320 is defined there.
147150
m_iLeft = minxScreen + 100;
148151
m_iWidth = 320;
149152
}
@@ -156,28 +159,16 @@ void CFixedRegionDlg::OnOK()
156159
if (m_iHeight <= 0)
157160
{
158161
//TODO -- where did these constants come from? Get rid of 'em, put 'em in an ini or #define them somewhere
159-
//Answer: See struct sRegionOpts in Profile.h
162+
//Answer: See struct sRegionOpts in Profile.h. An area of 240x320 is defined there.
160163
m_iTop = minyScreen + 100;
161164
m_iHeight = 240;
162165
}
163166
MessageOut(m_hWnd,IDS_STRING_VALUEEXCEEDHEIGHT, IDS_STRING_NOTE, MB_OK | MB_ICONEXCLAMATION, m_iHeight);
164167
}
165168
}
166169

167-
/*************************
168-
169-
// First thing we will do nist to get it coorect with the technical region measurements guidelines before we will apply the user viewpoint/
170-
// TOP-LEFT = 0.0 ; BOTTOM-RIGHT= HScrSize-1:HScrSize-1 ; Width= Diff Right-Left => 200-50=150 (Area is 151 pixels but 'our' width is 150)
171-
172-
// Check that if start values are not set by user they should be one not zero
173-
if ( m_iLeft == 0 ) {
174-
m_iLeft = 1 ;
175-
}
176-
if ( m_iTop == 0 ) {
177-
m_iTop = 1 ;
178-
}
179-
*/
180-
TRACE(_T("## CFixedRegionDlg::OnOK / L=%d, T=%d, W=%d, H=%d\n"), m_iLeft, m_iTop, m_iWidth, m_iHeight );
170+
// Technical pixel coordinates are applicable. Top-Left = 0:0 not 1:1 What user often think it is.
171+
// TRACE(_T("## CFixedRegionDlg::OnOK / L=%d, T=%d, W=%d, H=%d\n"), m_iLeft, m_iTop, m_iWidth, m_iHeight );
181172

182173
cRegionOpts.m_iCaptureLeft = m_iLeft;
183174
cRegionOpts.m_iCaptureTop = m_iTop;
@@ -199,7 +190,7 @@ BOOL CFixedRegionDlg::OnInitDialog()
199190
m_iHeight = cRegionOpts.m_iCaptureHeight;
200191
UpdateData(FALSE);
201192

202-
TRACE(_T("## CFixedRegionDlg::OnInitDialog / L=%d, T=%d, W=%d, H=%d\n"), m_iLeft, m_iTop, m_iWidth, m_iHeight );
193+
// TRACE(_T("## CFixedRegionDlg::OnInitDialog / L=%d, T=%d, W=%d, H=%d\n"), m_iLeft, m_iTop, m_iWidth, m_iHeight );
203194

204195
m_ctrlEditPosX.EnableWindow(TRUE);
205196
m_ctrlEditPosY.EnableWindow(TRUE);
@@ -237,7 +228,7 @@ LRESULT CFixedRegionDlg::OnRegionUpdate(WPARAM /*wParam*/, LPARAM /*lParam*/)
237228
m_iWidth = rectUse.Width();
238229
m_iHeight = rectUse.Height();
239230

240-
TRACE(_T("## CFixedRegionDlg::OnRegionUpdate / L=%d, T=%d, W=%d, H=%d\n"), m_iLeft, m_iTop, m_iWidth, m_iHeight );
231+
//TRACE(_T("## CFixedRegionDlg::OnRegionUpdate / L=%d, T=%d, W=%d, H=%d\n"), m_iLeft, m_iTop, m_iWidth, m_iHeight );
241232

242233
UpdateData(FALSE);
243234

CamStudio/Recorder/FlashingWnd.cpp

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ static char THIS_FILE[] = __FILE__;
1616

1717
namespace { // annonymous
1818

19-
const int THICKNESS = 8;
2019
const int SMALLTHICKNESS = 4;
20+
const int THICKNESS = 8;
21+
22+
const int DOUBLESMALLTHICKNESS = 8;
23+
const int DOUBLETHICKNESS = 16;
24+
2125
const int SIDELEN = 12;
2226
const int SIDELEN2 = 24;
2327

@@ -103,42 +107,32 @@ void CFlashingWnd::SetUpRegion(const CRect& cRect, int type)
103107
//
104108
///////////////////////////////////////////////////
105109
CRgn wndRgn;
110+
CRgn rgnTemp;
106111

107112
m_cRect = cRect;
113+
// TRACE( _T("## CFlashingWnd::SetUpRegion / m_cRect before / L=%d R=%d T=%d B=%d / W=%d H=%d\n"), m_cRect.left , m_cRect.right , m_cRect.top , m_cRect.bottom, m_cRect.Width(), m_cRect.Height() );
108114

109-
// The Width shown here is one to less. Not good.
110-
TRACE( _T("## CFlashingWnd::SetUpRegion / m_cRect before / L=%d R=%d T=%d B=%d / W=%d H=%d\n"), m_cRect.left , m_cRect.right , m_cRect.top , m_cRect.bottom, m_cRect.Width(), m_cRect.Height() );
111-
// Jaho. Why do we reduce the frame here, because the Width and Height are set wrong ???
112-
// HIER_BEN_IK
113-
//#define JAHO_TEST_CRECT_RIGHT_VALUES
114-
#ifndef JAHO_TEST_CRECT_RIGHT_VALUES
115-
// As it was before
116-
m_cRect.right--;
117-
m_cRect.bottom--;
118-
#else
119-
m_cRect.left--;
120-
m_cRect.top--;
121-
#endif
122-
TRACE( _T("## CFlashingWnd::SetUpRegion / m_cRect after / L=%d R=%d T=%d B=%d / W=%d H=%d\n"), m_cRect.left , m_cRect.right , m_cRect.top , m_cRect.bottom, m_cRect.Width(), m_cRect.Height() );
115+
// Type=0 stands for ...
123116
if (type == 0) {
124-
wndRgn.CreateRectRgn(0, 0, m_cRect.Width() + THICKNESS + THICKNESS, m_cRect.Height() + THICKNESS + THICKNESS);
125117

126-
CRgn rgnTemp;
127118
CRgn rgnTemp2;
128119
CRgn rgnTemp3;
129-
rgnTemp.CreateRectRgn(THICKNESS, THICKNESS, m_cRect.Width() + THICKNESS + 1, m_cRect.Height() + THICKNESS + 1);
130-
rgnTemp2.CreateRectRgn(0, SIDELEN2, m_cRect.Width()+THICKNESS+THICKNESS, m_cRect.Height() - SIDELEN + 1);
131-
rgnTemp3.CreateRectRgn(SIDELEN2,0, m_cRect.Width() - SIDELEN + 1, m_cRect.Height() + THICKNESS + THICKNESS);
120+
// ToDo: Check if all +1 are applied correctly. Parameters in function below are not checked.
121+
// Check if we have forgotten to apply a few or don't we need them (the +1's) at all.?
122+
wndRgn.CreateRectRgn( 0 , 0 , m_cRect.Width() + DOUBLETHICKNESS , m_cRect.Height() + DOUBLETHICKNESS );
123+
rgnTemp.CreateRectRgn( THICKNESS , THICKNESS , m_cRect.Width() + THICKNESS + 1 , m_cRect.Height() + THICKNESS + 1 );
124+
rgnTemp2.CreateRectRgn( 0 , SIDELEN2 , m_cRect.Width() + DOUBLETHICKNESS , m_cRect.Height() - SIDELEN + 1 );
125+
rgnTemp3.CreateRectRgn( SIDELEN2 , 0 , m_cRect.Width() - SIDELEN + 1 , m_cRect.Height() + DOUBLETHICKNESS );
132126

133127
wndRgn.CombineRgn(&wndRgn,&rgnTemp,RGN_DIFF);
134128
wndRgn.CombineRgn(&wndRgn,&rgnTemp2,RGN_DIFF);
135129
wndRgn.CombineRgn(&wndRgn,&rgnTemp3,RGN_DIFF);
136130

137-
wndRgn.OffsetRgn( m_cRect.left-THICKNESS, m_cRect.top-THICKNESS );
131+
wndRgn.OffsetRgn( m_cRect.left - THICKNESS , m_cRect.top - THICKNESS );
138132
} else {
139-
wndRgn.CreateRectRgn(0, 0, m_cRect.Width() + SMALLTHICKNESS + SMALLTHICKNESS, m_cRect.Height() + SMALLTHICKNESS + SMALLTHICKNESS);
140-
CRgn rgnTemp;
141-
rgnTemp.CreateRectRgn(SMALLTHICKNESS, SMALLTHICKNESS, m_cRect.Width()+SMALLTHICKNESS+1, m_cRect.Height() + SMALLTHICKNESS + 1);
133+
134+
wndRgn.CreateRectRgn( 0 , 0 , m_cRect.Width() + DOUBLESMALLTHICKNESS , m_cRect.Height() + DOUBLESMALLTHICKNESS);
135+
rgnTemp.CreateRectRgn( SMALLTHICKNESS, SMALLTHICKNESS, m_cRect.Width() + SMALLTHICKNESS + 1 , m_cRect.Height() + SMALLTHICKNESS + 1);
142136

143137
wndRgn.CombineRgn(&wndRgn, &rgnTemp, RGN_DIFF);
144138

CamStudio/Recorder/RecorderVersionReleaseInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
#define CURRENT_VERSION_NUMBER "2.6"
99
// Add ++ to releasenumber to indicate that executable is from revision xxx or higher
1010
// Update versionnumber and remove ++ when official Camstudio release will be created
11-
#define CURRENT_SVN_RELEASE_NUMBER "270"
11+
#define CURRENT_SVN_RELEASE_NUMBER "272"
1212

1313
#endif // !defined(_RECORDERVERSIONRELEASEINFO__INCLUDED_)

CamStudio/Recorder/RecorderView.cpp

Lines changed: 50 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,6 @@ void CRecorderView::OnPaint()
651651
dcBits.CreateCompatibleDC(&dc);
652652
CBitmap bitmap;
653653

654-
TRACE( _T("## CRecorderView::OnPaint / rectClient.Width()=%d\n") , rectClient.Width() );
655-
656654
bitmap.CreateCompatibleBitmap(&dc, rectClient.Width(), rectClient.Height());
657655
CBitmap *pOldBitmap = dcBits.SelectObject(&bitmap);
658656

@@ -1224,87 +1222,88 @@ void CRecorderView::OnRecord()
12241222
fActualRate = 0.0;
12251223
fTimeLength = 0.0;
12261224

1227-
// HIER_BEN_IK
1228-
// Todo: Sizing van rc checked. One pixel gets dropped: 100x100 => 99x99
1229-
TRACE("## Here it possible goed wrong with the sizing\n");
1225+
// r272: How we define rect cshecked and changed because some pixel gots dropped: 100x100 => 99x99
1226+
// rcUse is the rect that will be used in the end to define the size of the recording.
1227+
// BTW. rcUse is also used to store previous values.
1228+
// A Full screen area is 0, 0 to MaxX-1, MaxY-1
12301229

1230+
// TRACE( _T("## CRecorderView::OnRecord /CAPTURE_FIXED/ before / cRegionOpts / T=%d, L=%d, B=.. , R=.. , W=%d, H=%d \n"), cRegionOpts.m_iCaptureTop, cRegionOpts.m_iCaptureLeft, cRegionOpts.m_iCaptureWidth, cRegionOpts.m_iCaptureHeight );
12311231
switch (cRegionOpts.m_iMouseCaptureMode)
12321232
{
12331233
case CAPTURE_FIXED:
1234+
// Applicable when Option region is set as 'Fixed Region'
1235+
1236+
1237+
rc = CRect(cRegionOpts.m_iCaptureTop,
1238+
cRegionOpts.m_iCaptureLeft,
1239+
cRegionOpts.m_iCaptureLeft + cRegionOpts.m_iCaptureWidth - 1 ,
1240+
cRegionOpts.m_iCaptureTop + cRegionOpts.m_iCaptureHeight - 1 );
1241+
1242+
// TRACE( _T("## CRecorderView::OnRecord /CAPTURE_FIXED/ before / rc / T=%d, L=%d, B=%d, R=%d \n"), rc.top, rc.left, rc.bottom, rc.right );
1243+
12341244
if (cRegionOpts.m_bFixedCapture) {
1235-
// Full screan area : 0:0 to MaxX-1:MaxY-1
1236-
rc.top = cRegionOpts.m_iCaptureTop;
1237-
rc.left = cRegionOpts.m_iCaptureLeft;
1238-
rc.right = cRegionOpts.m_iCaptureLeft + cRegionOpts.m_iCaptureWidth - 1;
1239-
rc.bottom = cRegionOpts.m_iCaptureTop + cRegionOpts.m_iCaptureHeight - 1;
1240-
// TODOMON 0s are no good anymore .. compare to minx / miny
1241-
if (rc.top < 0)
1245+
// Applicable when Option region is set as 'Fixed Region' and retangle offset is fixed either.
1246+
1247+
// I don't expect that code below is ever invoked...! Hence, dead code
1248+
if (rc.top < 0) {
1249+
TRACE( _T("## CRecorderView::OnRecord rc.top<0 [%d]\n"), rc.top);
12421250
rc.top = 0;
1243-
if (rc.left < 0)
1251+
}
1252+
if (rc.left < 0) {
1253+
TRACE( _T("## CRecorderView::OnRecord rc.left<0 [%d]\n"), rc.left);
12441254
rc.left = 0;
1245-
if (maxxScreen <= rc.right)
1246-
rc.right = maxxScreen - 1;
1247-
if (maxyScreen <= rc.bottom)
1248-
rc.bottom = maxyScreen - 1;
1255+
}
1256+
if (maxxScreen <= rc.right) {
1257+
TRACE( _T("## CRecorderView::OnRecord maxxScreen<rc.right [%d]\n"), rc.right);
1258+
rc.right = maxxScreen - 1; //ok
1259+
}
1260+
if (maxyScreen <= rc.bottom) {
1261+
TRACE( _T("## CRecorderView::OnRecord maxyScreen<rc.bottom<0 [%d]\n"), rc.bottom);
1262+
rc.bottom = maxyScreen - 1; //ok
1263+
}
12491264

12501265
//using protocols for iMouseCaptureMode==0
12511266
old_rcClip = rcClip = rc;
12521267
old_rcClip.NormalizeRect();
12531268
rcUse = old_rcClip;
12541269
::PostMessage (hWndGlobal, WM_USER_RECORDSTART, 0, (LPARAM) 0);
12551270

1256-
TRACE( _T("## CRecorderView::OnRecord /0001/ T=%d, L=%d, B=%d, R=%d \n"), rc.top, rc.left, rc.bottom, rc.right );
1257-
TRACE( _T("## CRecorderView::OnRecord /0001/ MinX=%d, MinY=%d, MaxX=%d, MaxY=%d \n"), minxScreen, minyScreen, maxxScreen, maxyScreen );
1258-
1259-
} else {
1260-
rc = CRect(0, 0, cRegionOpts.m_iCaptureWidth, cRegionOpts.m_iCaptureHeight);
1261-
rc.right--;
1262-
rc.bottom--;
1271+
} else {
1272+
// Applicable when Option region is set as 'Fixed Region' but retangle offset is floating.
1273+
// Floating Retangle. Drag the retangle first to its position...
12631274

12641275
::ShowWindow(hMouseCaptureWnd,SW_SHOW);
12651276
::UpdateWindow(hMouseCaptureWnd);
12661277

12671278
InitDrawShiftWindow(); //will affect rc implicity
1268-
TRACE(_T("## CRecorderView::OnRecord /0002/ T=%d, L=%d, B=%d, R=%d \n"), rc.top, rc.left, rc.bottom, rc.right );
1269-
TRACE(_T("## CRecorderView::OnRecord /0002/ MinX=%d, MinY=%d, MaxX=%d, MaxY=%d \n"), minxScreen, minyScreen, maxxScreen, maxyScreen );
12701279
}
12711280
break;
1272-
case CAPTURE_VARIABLE:
1281+
case CAPTURE_VARIABLE:
1282+
// Applicable when Option region is set as 'Region'
12731283
::ShowWindow(hMouseCaptureWnd, SW_SHOW);
12741284
::UpdateWindow(hMouseCaptureWnd);
12751285
InitSelectRegionWindow(); //will affect rc implicity
1276-
TRACE(_T("## CRecorderView::OnRecord /0003/ T=%d, L=%d, B=%d, R=%d \n"), rc.top, rc.left, rc.bottom, rc.right );
1277-
TRACE(_T("## CRecorderView::OnRecord /0003/ MinX=%d, MinY=%d, MaxX=%d, MaxY=%d \n"), minxScreen, minyScreen, maxxScreen, maxyScreen );
12781286
break;
1279-
case CAPTURE_FULLSCREEN:
1280-
m_basicMsg = new CBasicMessage();
1281-
m_basicMsg->Create(CBasicMessage::IDD);
1282-
m_basicMsg->SetText(_T("Click on monitor to be captured."));
1283-
m_basicMsg->ShowWindow(SW_SHOW);
1284-
SetCapture();
1285-
// m_basicMsg.DoModal();
1286-
TRACE(_T("## CRecorderView::OnRecord /0004/ T=%d, L=%d, B=%d, R=%d \n"), rc.top, rc.left, rc.bottom, rc.right );
1287-
TRACE(_T("## CRecorderView::OnRecord /0004/ MinX=%d, MinY=%d, MaxX=%d, MaxY=%d \n"), minxScreen, minyScreen, maxxScreen, maxyScreen );
1288-
break;
1289-
case CAPTURE_ALLSCREENS:
1290-
rcUse = CRect(minxScreen, minyScreen, maxxScreen, maxyScreen);
1291-
rcUse.right--;
1292-
rcUse.bottom--;
1287+
1288+
case CAPTURE_ALLSCREENS:
1289+
// Applicable when Option region is set as 'Full Screen'
1290+
rcUse = CRect(minxScreen, minyScreen, maxxScreen - 1 , maxyScreen - 1);
12931291
::PostMessage(hWndGlobal, WM_USER_RECORDSTART, 0, (LPARAM) 0);
1294-
TRACE(_T("## CRecorderView::OnRecord /0005/ T=%d, L=%d, B=%d, R=%d \n"), rc.top, rc.left, rc.bottom, rc.right );
1295-
TRACE(_T("## CRecorderView::OnRecord /0005/ MinX=%d, MinY=%d, MaxX=%d, MaxY=%d \n"), minxScreen, minyScreen, maxxScreen, maxyScreen );
12961292
break;
1293+
12971294
case CAPTURE_WINDOW:
1295+
case CAPTURE_FULLSCREEN:
1296+
// Applicable when Option region is set as 'Window' and as 'Full Screen'
12981297
m_basicMsg = new CBasicMessage();
12991298
m_basicMsg->Create(CBasicMessage::IDD);
13001299
m_basicMsg->SetText(_T("Click on window to be captured."));
13011300
m_basicMsg->ShowWindow(SW_SHOW);
13021301
//m_basicMsg.DoModal();
13031302
SetCapture();
1304-
TRACE(_T("## CRecorderView::OnRecord /0006/ T=%d, L=%d, B=%d, R=%d \n"), rc.top, rc.left, rc.bottom, rc.right );
1305-
TRACE(_T("## CRecorderView::OnRecord /0006/ MinX=%d, MinY=%d, MaxX=%d, MaxY=%d \n"), minxScreen, minyScreen, maxxScreen, maxyScreen );
13061303
break;
13071304
}
1305+
// TRACE(_T("## CRecorderView::OnRecord / after / rc / T=%d, L=%d, B=%d, R=%d \n"), rc.top, rc.left, rc.bottom, rc.right );
1306+
// TRACE(_T("## CRecorderView::OnRecord / after / MinX=%d, MinY=%d, MaxX=%d, MaxY=%d \n"), minxScreen, minyScreen, maxxScreen, maxyScreen );
13081307
}
13091308

13101309
void CRecorderView::OnStop()
@@ -3726,16 +3725,10 @@ UINT CRecorderView::RecordVideo()
37263725
strTempVideoAviFilePath.Format("%s\\%s-%s-%d.%s", (LPCSTR)csTempFolder, TEMPFILETAGINDICATOR, (LPCSTR)csStartTime, rand(), "avi" );
37273726
}
37283727
}
3729-
//TRACE("## CRecorderView::RecordAVIThread Final Temp.Avi file=[%s]\n", strTempVideoAviFilePath.GetString() );
3730-
3731-
//int top = rcUse.top;
3732-
//int left = rcUse.left;
3733-
//int width = rcUse.right - rcUse.left + 1;
3734-
//int height = rcUse.bottom - rcUse.top + 1;
3735-
//int fps = cVideoOpts.m_iFramesPerSecond;
3728+
//TRACE(_T("## CRecorderView::RecordAVIThread Final Temp.Avi file=[%s]\n"), strTempVideoAviFilePath.GetString() );
3729+
//TRACE(_T("## CRecorderView::RecordVideo rcUse / T=%d, L=%d, B=%d, R=%d \n"), rcUse.top, rcUse.left, rcUse.bottom, rcUse.right );
37363730

37373731
return RecordVideo(rcUse, cVideoOpts.m_iFramesPerSecond, strTempVideoAviFilePath) ? 0UL : 1UL;
3738-
//return RecordVideo(top, left, width, height, fps, strTempVideoAviFilePath) ? 0UL : 1UL;
37393732
}
37403733

37413734
/////////////////////////////////////////////////////////////////////////////
@@ -4146,7 +4139,8 @@ bool CRecorderView::RecordVideo(CRect rectFrame, int fps, const char *szVideoFil
41464139
// }
41474140
//}
41484141

4149-
if ((0 == frametime) || (oldframetime < frametime)) {
4142+
4143+
if ( ( frametime == 0 ) || ( oldframetime < frametime ) ) {
41504144
//ver 1.8
41514145
//if (iShiftType == 1) {
41524146
// if (frametime == 0) {

0 commit comments

Comments
 (0)