/// <summary> /// opens a recording stream /// set a video codec token first. /// </summary> public void OpenFile(string baseName) { string ext = Path.GetExtension(baseName); if (ext == null || ext.ToLower() != ".jmd") { baseName = baseName + ".jmd"; } jmdfile = new JMDfile(File.Open(baseName, FileMode.Create), fpsnum, fpsden, audiosamplerate, audiochannels == 2); if (moviemetadata != null) { jmdfile.writemetadata(moviemetadata); } // start up thread // problem: since audio chunks and video frames both go through here, exactly how many zlib workers // gives is not known without knowing how the emulator will chunk audio packets // this shouldn't affect results though, just performance threadQ = new System.Collections.Concurrent.BlockingCollection <Object>(token.numthreads * 2); workerT = new System.Threading.Thread(new System.Threading.ThreadStart(threadproc)); workerT.Start(); GzipFrameDelegate = new GzipFrameD(GzipFrame); }
/// <summary> /// opens a recording stream /// set a video codec token first. /// </summary> public void OpenFile(string baseName) { string ext = Path.GetExtension(baseName); if (ext == null || ext.ToLower() != ".jmd") baseName = baseName + ".jmd"; jmdfile = new JMDfile(File.Open(baseName, FileMode.Create), fpsnum, fpsden, audiosamplerate, audiochannels == 2); if (moviemetadata != null) jmdfile.writemetadata(moviemetadata); // start up thread // problem: since audio chunks and video frames both go through here, exactly how many zlib workers // gives is not known without knowing how the emulator will chunk audio packets // this shouldn't affect results though, just performance threadQ = new System.Collections.Concurrent.BlockingCollection<Object>(token.numthreads * 2); workerT = new System.Threading.Thread(new System.Threading.ThreadStart(threadproc)); workerT.Start(); GzipFrameDelegate = new GzipFrameD(GzipFrame); }