Small fixes for the screen capture.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1636 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-02-07 14:27:52 +00:00
commit b08c8991a5
3 changed files with 28 additions and 16 deletions

View file

@ -250,18 +250,18 @@ namespace Greenshot.Helpers {
info.rate = rate;
info.suggestedBufferSize = stride * height;
// create stream
if (Avi32.AVIFileCreateStream(file, out stream, ref info) != 0) {
throw new ApplicationException("Failed creating stream");
}
// describe compression options
Avi32.AVICOMPRESSOPTIONS options = new Avi32.AVICOMPRESSOPTIONS();
// create stream
if (Avi32.AVIFileCreateStream(file, out stream, ref info) != 0) {
throw new ApplicationException("Failed creating stream");
}
// uncomment if video settings dialog is required to show
int retCode = 0;
if (codec == null) {
int retCode = Avi32.AVISaveOptions( stream, ref options );
retCode = Avi32.AVISaveOptions( stream, ref options );
if (retCode == 0) {
LOG.Debug("Cancel clicked!");
return false;
@ -270,7 +270,8 @@ namespace Greenshot.Helpers {
options.handler = Avi32.mmioFOURCC(codec);
options.quality = quality;
}
// create compressed stream
int retval = Avi32.AVIMakeCompressedStream(out streamCompressed, stream, ref options, IntPtr.Zero);
if (retval != 0) {
@ -320,6 +321,12 @@ namespace Greenshot.Helpers {
}
}
public void AddEmptyFrame() {
lock (this) {
position++;
}
}
/// <summary>
/// Add new frame to the AVI file.
/// </summary>