mirror of
https://git.femboyfinancial.jp/james/lipsync.git
synced 2024-11-22 10:42:03 -08:00
git-svn-id: http://svn.sourceforge.jp/svnroot/lipsync@9 b1f601f4-4f45-0410-8980-aecacb008692
This commit is contained in:
parent
8ab2a598b3
commit
3bbc320365
@ -38,9 +38,14 @@ namespace LipSync {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( m_raw_mode ) {
|
if ( m_raw_mode ) {
|
||||||
|
radioVcm.Enabled = false;
|
||||||
|
radioVfw.Enabled = false;
|
||||||
|
radioVcm.Checked = true;
|
||||||
btnVideoCompression.Enabled = false;
|
btnVideoCompression.Enabled = false;
|
||||||
txtDescription.Enabled = false;
|
txtDescription.Enabled = false;
|
||||||
} else {
|
} else {
|
||||||
|
radioVcm.Enabled = true;
|
||||||
|
radioVfw.Enabled = true;
|
||||||
btnVideoCompression.Enabled = true;
|
btnVideoCompression.Enabled = true;
|
||||||
txtDescription.Enabled = true;
|
txtDescription.Enabled = true;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ namespace LipSync {
|
|||||||
public string FileNameParser;
|
public string FileNameParser;
|
||||||
public System.Drawing.Imaging.ImageFormat ImageFormat;
|
public System.Drawing.Imaging.ImageFormat ImageFormat;
|
||||||
public bool UseVfwEncoder = true;
|
public bool UseVfwEncoder = true;
|
||||||
|
public bool IsRawMode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ namespace LipSync {
|
|||||||
Thread m_stdout;
|
Thread m_stdout;
|
||||||
Process m_ffmpeg;
|
Process m_ffmpeg;
|
||||||
Process m_mencoder;
|
Process m_mencoder;
|
||||||
bool m_is_rawmode = false;
|
//bool m_is_rawmode = false;
|
||||||
private int m_current_frame = 0;
|
private int m_current_frame = 0;
|
||||||
private MediaPlayer m_player;
|
private MediaPlayer m_player;
|
||||||
private ZorderItem m_editing_item = null;
|
private ZorderItem m_editing_item = null;
|
||||||
@ -1746,6 +1746,7 @@ namespace LipSync {
|
|||||||
private void bgWorkAvi_DoWork( object sender, DoWorkEventArgs e ) {
|
private void bgWorkAvi_DoWork( object sender, DoWorkEventArgs e ) {
|
||||||
IAviWriter writer = null;
|
IAviWriter writer = null;
|
||||||
AviOutputArguments args = (AviOutputArguments)e.Argument;
|
AviOutputArguments args = (AviOutputArguments)e.Argument;
|
||||||
|
bool is_raw_mode = args.IsRawMode;
|
||||||
if ( File.Exists( args.AviFile ) ) {
|
if ( File.Exists( args.AviFile ) ) {
|
||||||
File.Delete( args.AviFile );
|
File.Delete( args.AviFile );
|
||||||
}
|
}
|
||||||
@ -1772,6 +1773,21 @@ namespace LipSync {
|
|||||||
Bitmap bmp = null;
|
Bitmap bmp = null;
|
||||||
if ( args.UseVfwEncoder ) {
|
if ( args.UseVfwEncoder ) {
|
||||||
bmp = new Bitmap( size.Width, size.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb );
|
bmp = new Bitmap( size.Width, size.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb );
|
||||||
|
if ( is_raw_mode ) {
|
||||||
|
AviWriterVcm awvcm = new AviWriterVcm();
|
||||||
|
bool ret = awvcm.Open( args.AviFile,
|
||||||
|
AppManager.SaveData.DwScale,
|
||||||
|
AppManager.SaveData.DwRate,
|
||||||
|
size.Width,
|
||||||
|
size.Height,
|
||||||
|
!is_raw_mode,
|
||||||
|
args.IsTransparent,
|
||||||
|
Process.GetCurrentProcess().MainWindowHandle );
|
||||||
|
if ( !ret ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
writer = awvcm;
|
||||||
|
} else {
|
||||||
AviWriterVfw awvfw = new AviWriterVfw();
|
AviWriterVfw awvfw = new AviWriterVfw();
|
||||||
bool ret = awvfw.Open( args.AviFile,
|
bool ret = awvfw.Open( args.AviFile,
|
||||||
AppManager.SaveData.DwScale,
|
AppManager.SaveData.DwScale,
|
||||||
@ -1783,6 +1799,7 @@ namespace LipSync {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
writer = awvfw;
|
writer = awvfw;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
bmp = args.IsTransparent ?
|
bmp = args.IsTransparent ?
|
||||||
new Bitmap( size.Width, size.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb ) :
|
new Bitmap( size.Width, size.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb ) :
|
||||||
@ -1793,7 +1810,7 @@ namespace LipSync {
|
|||||||
AppManager.SaveData.DwRate,
|
AppManager.SaveData.DwRate,
|
||||||
size.Width,
|
size.Width,
|
||||||
size.Height,
|
size.Height,
|
||||||
!m_is_rawmode,
|
!is_raw_mode,
|
||||||
args.IsTransparent,
|
args.IsTransparent,
|
||||||
Process.GetCurrentProcess().MainWindowHandle );
|
Process.GetCurrentProcess().MainWindowHandle );
|
||||||
if ( !ret ) {
|
if ( !ret ) {
|
||||||
@ -2237,8 +2254,7 @@ namespace LipSync {
|
|||||||
StopMusic();
|
StopMusic();
|
||||||
}
|
}
|
||||||
initializeFirstEntry();
|
initializeFirstEntry();
|
||||||
m_is_rawmode = false;
|
showDialogCore( false );
|
||||||
ShowDialogCore();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void menuFileOutputRawAvi_Click( object sender, EventArgs e ) {
|
private void menuFileOutputRawAvi_Click( object sender, EventArgs e ) {
|
||||||
@ -2246,8 +2262,7 @@ namespace LipSync {
|
|||||||
StopMusic();
|
StopMusic();
|
||||||
}
|
}
|
||||||
initializeFirstEntry();
|
initializeFirstEntry();
|
||||||
m_is_rawmode = true;
|
showDialogCore( true );
|
||||||
ShowDialogCore();
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -3663,6 +3678,7 @@ namespace LipSync {
|
|||||||
|
|
||||||
long start_frame;
|
long start_frame;
|
||||||
AviOutputArguments args = (AviOutputArguments)e.Argument;
|
AviOutputArguments args = (AviOutputArguments)e.Argument;
|
||||||
|
bool is_raw_mode = args.IsRawMode;
|
||||||
if ( args.StartSpecified ) {
|
if ( args.StartSpecified ) {
|
||||||
start_frame = (long)(args.Start * AppManager.SaveData.FrameRate);
|
start_frame = (long)(args.Start * AppManager.SaveData.FrameRate);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1971,12 +1971,13 @@ namespace LipSync {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowDialogCore() {
|
private void showDialogCore( bool is_raw_mode ) {
|
||||||
using ( AviOutput aviOutput = new AviOutput( m_is_rawmode ) ) {
|
using ( AviOutput aviOutput = new AviOutput( is_raw_mode ) ) {
|
||||||
if ( aviOutput.ShowDialog() == DialogResult.OK ) {
|
if ( aviOutput.ShowDialog() == DialogResult.OK ) {
|
||||||
AviWriting = true;
|
AviWriting = true;
|
||||||
m_avi_cancel = false;
|
m_avi_cancel = false;
|
||||||
AviOutputArguments args = aviOutput.Arguments;
|
AviOutputArguments args = aviOutput.Arguments;
|
||||||
|
args.IsRawMode = is_raw_mode;
|
||||||
bgWorkAvi.RunWorkerAsync( args );
|
bgWorkAvi.RunWorkerAsync( args );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user