C# Class AnimatGuiCtrls.Video.AviManager

Afficher le fichier Open project: NeuroRoboticTech/AnimatLabPublicSource Class Usage Examples

Méthodes publiques

Méthode Description
AddAudioStream ( AudioStream newStream, int startAtFrameIndex ) : void

Add an existing wave audio stream to the file

AddAudioStream ( IntPtr waveData, Avi streamInfo, Avi streamFormat, int streamLength ) : void

Add an existing wave audio stream to the file

AddAudioStream ( String waveFileName, int startAtFrameIndex ) : void

Add a wave audio stream from another file to this file

AddVideoStream ( Avi compressOptions, double frameRate, Bitmap firstFrame ) : VideoStream

Add an empty video stream to the file

Compresses the stream without showing the codecs dialog

AddVideoStream ( bool isCompressed, double frameRate, Bitmap firstFrame ) : VideoStream

Add an empty video stream to the file

AddVideoStream ( bool isCompressed, double frameRate, int frameSize, int width, int height, PixelFormat format ) : VideoStream

Add an empty video stream to the file

AviManager ( String fileName, bool open ) : System

Open or create an AVI file

Close ( ) : void

Release all ressources

CopyTo ( String newFileName, float startAtSecond, float stopAtSecond ) : AviManager

Copy a piece of video and wave sound int a new file

GetOpenStream ( int index ) : VideoStream

Get a stream from the internal list of opened streams

Use this method after DecompressToNewFile, to get the copied stream from the new AVI file

GetVideoStream ( ) : VideoStream

Get the first video stream - usually there is only one video stream

GetWaveStream ( ) : AudioStream

Getthe first wave audio stream

MakeFileFromStream ( String fileName, AviStream stream ) : void

Private Methods

Méthode Description
AviManager ( int aviFile ) : System
InsertSilence ( int countSilentSamples, IntPtr waveData, int lengthWave, Avi &streamInfo ) : IntPtr

Method Details

AddAudioStream() public méthode

Add an existing wave audio stream to the file
public AddAudioStream ( AudioStream newStream, int startAtFrameIndex ) : void
newStream AudioStream The stream to add
startAtFrameIndex int /// The index of the video frame at which the sound is going to start. /// '0' inserts the sound at the beginning of the video. ///
Résultat void

AddAudioStream() public méthode

Add an existing wave audio stream to the file
public AddAudioStream ( IntPtr waveData, Avi streamInfo, Avi streamFormat, int streamLength ) : void
waveData System.IntPtr The new stream's data
streamInfo Avi Header info for the new stream
streamFormat Avi The new stream' format info
streamLength int Length of the new stream
Résultat void

AddAudioStream() public méthode

Add a wave audio stream from another file to this file
public AddAudioStream ( String waveFileName, int startAtFrameIndex ) : void
waveFileName String Name of the wave file to add
startAtFrameIndex int Index of the video frame at which the sound is going to start
Résultat void

AddVideoStream() public méthode

Add an empty video stream to the file
Compresses the stream without showing the codecs dialog
public AddVideoStream ( Avi compressOptions, double frameRate, Bitmap firstFrame ) : VideoStream
compressOptions Avi Compression options
frameRate double Frames per second
firstFrame System.Drawing.Bitmap Image to write into the stream as the first frame
Résultat VideoStream

AddVideoStream() public méthode

Add an empty video stream to the file
public AddVideoStream ( bool isCompressed, double frameRate, Bitmap firstFrame ) : VideoStream
isCompressed bool true: Create a compressed stream before adding frames
frameRate double Frames per second
firstFrame System.Drawing.Bitmap Image to write into the stream as the first frame
Résultat VideoStream

AddVideoStream() public méthode

Add an empty video stream to the file
public AddVideoStream ( bool isCompressed, double frameRate, int frameSize, int width, int height, PixelFormat format ) : VideoStream
isCompressed bool true: Create a compressed stream before adding frames
frameRate double Frames per second
frameSize int Size of one frame in bytes
width int Width of each image
height int Height of each image
format PixelFormat PixelFormat of the images
Résultat VideoStream

AviManager() public méthode

Open or create an AVI file
public AviManager ( String fileName, bool open ) : System
fileName String Name of the AVI file
open bool true: Open the file; false: Create or overwrite the file
Résultat System

Close() public méthode

Release all ressources
public Close ( ) : void
Résultat void

CopyTo() public méthode

Copy a piece of video and wave sound int a new file
public CopyTo ( String newFileName, float startAtSecond, float stopAtSecond ) : AviManager
newFileName String File name
startAtSecond float Start copying at second x
stopAtSecond float Stop copying at second y
Résultat AviManager

GetOpenStream() public méthode

Get a stream from the internal list of opened streams
Use this method after DecompressToNewFile, to get the copied stream from the new AVI file
public GetOpenStream ( int index ) : VideoStream
index int Index of the stream. The streams are not sorted, the first stream is the one that was opened first.
Résultat VideoStream

GetVideoStream() public méthode

Get the first video stream - usually there is only one video stream
public GetVideoStream ( ) : VideoStream
Résultat VideoStream

GetWaveStream() public méthode

Getthe first wave audio stream
public GetWaveStream ( ) : AudioStream
Résultat AudioStream

MakeFileFromStream() public static méthode

public static MakeFileFromStream ( String fileName, AviStream stream ) : void
fileName String
stream AviStream
Résultat void