Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Where In The Source Code Would I Find This?, Need to make a minor change to the GUI
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
david.horman
Posted: Aug 12 2011, 06:19 PM


Member


Group: Members
Posts: 15
Member No.: 26332
Joined: 18-October 09



I'd like to make a small change to VirtualDub in my build - I want to move the input and output video frames to the left by four pixels so that the left hand edge of the input video is right at the edge of the window (and therefore right at the edge of the screen when the window is maximised).

This will allow me to see all the pixels of a full HD video (at least width-wise) on my screen.

Can anyone point me in the right direction?

David
 
     Top
dloneranger
Posted: Aug 13 2011, 08:06 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07




iirc look for setwindowpos (??)

--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
dloneranger
Posted: Aug 13 2011, 08:37 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



k, the place to look is in videowindow.cpp
CODE

void VDVideoWindow::Move(int x, int y) {
++mInhibitParamUpdateLocks;
SetWindowPos(mhwnd, NULL, x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
--mInhibitParamUpdateLocks;
}

change x to x-4 or whatever you like

--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
david.horman
Posted: Aug 14 2011, 09:31 AM


Member


Group: Members
Posts: 15
Member No.: 26332
Joined: 18-October 09



SetWindowPos, of course! blink.gif

Thanks for the pointer.

David
 
     Top
david.horman
Posted: Aug 21 2011, 05:47 PM


Member


Group: Members
Posts: 15
Member No.: 26332
Joined: 18-October 09



Nope, that didn't do it after all... in fact I couldn't find those lines in VideoWindow.cpp, nor could I find VDVideoWindow::Move anywhere in the latest (stable) source code.

The closest I've got so far is line 415 in VideoWindow.cpp, but that only moves the video without moving the frame around it...

David
 
     Top
dloneranger
Posted: Aug 21 2011, 05:54 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



In the latest sources at http://forums.virtualdub.org/index.php?act...15&t=19755&st=0
It's at line 251

--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
david.horman
Posted: Aug 23 2011, 05:25 PM


Member


Group: Members
Posts: 15
Member No.: 26332
Joined: 18-October 09



I was hoping to stick with stable for now (1.9.11) - I've had a good look through the RC file as well, but not having much luck, so if anyone can give me a hint I'd be very grateful!

David
 
     Top
phaeron
Posted: Sep 6 2011, 02:48 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



RepositionPanes() in projectui.cpp is likely more appropriate. One issue, though, is that there are also borders on the main window itself, so if you're trying to fit 1280 wide video on a 720p display or 1920 wide video on a 1080p display, that alone won't do it. You'd need to remove the outer window frame, which is quite a bit more work.
 
    Top
david.horman
Posted: Sep 28 2011, 10:51 PM


Member


Group: Members
Posts: 15
Member No.: 26332
Joined: 18-October 09



Thanks phaeron - but doesn't the the outer window border disappear when the window is maximised anyway? My project is a full 1920 wide, but only 816 high.

David
 
     Top
phaeron
Posted: Oct 4 2011, 04:11 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Yeah, it does, so I guess you're OK.
 
    Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
9 replies since Aug 12 2011, 06:19 PM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Development Forum