C# Класс AnimatGuiCtrls.Video.VideoStream

Наследование: AviStream
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
countFrames int
firstFrame int
frameRate double

Открытые методы

Метод Описание
AddFrame ( Bitmap bmp ) : void

Add one frame to a new stream

This works only with uncompressed streams, and compressed streams that have not been saved yet. Use DecompressToNewFile to edit saved compressed streams.

DecompressToNewFile ( String fileName, bool recompress, VideoStream &newStream2 ) : AviManager

Copy all frames into a new file

Use this method if you want to append frames to an existing, compressed stream

ExportBitmap ( int position, String dstFileName ) : void

Export a frame into a bitmap file

ExportStream ( String fileName ) : void

Copy the stream into a new file

GetBitmap ( int position ) : Bitmap

Export a frame into a bitmap

GetFrameClose ( ) : void

Free ressources that have been used by GetFrameOpen

GetFrameOpen ( ) : void

Prepare for decompressing frames

This method has to be called before GetBitmap and ExportBitmap. Release ressources with GetFrameClose.

VideoStream ( int aviFile, Avi compressOptions, double frameRate, Bitmap firstFrame ) : System

Initialize a new VideoStream and add the first frame

VideoStream ( int aviFile, IntPtr aviStream ) : System

Initialize a VideoStream for an existing stream

VideoStream ( int aviFile, bool writeCompressed, double frameRate, Bitmap firstFrame ) : System

Initialize a new VideoStream and add the first frame

VideoStream ( int aviFile, bool writeCompressed, double frameRate, int frameSize, int width, int height, PixelFormat format ) : System

Initialize an empty VideoStream

Приватные методы

Метод Описание
ConvertBitCountToPixelFormat ( int bitCount ) : PixelFormat

Returns a PixelFormat value for a specific bit count

ConvertPixelFormatToBitCount ( PixelFormat format ) : Int16

Get the count of bits per pixel from a PixelFormat value

CreateCompressedStream ( ) : void

Create a compressed stream from an uncompressed stream

CreateCompressedStream ( Avi options ) : void

Create a compressed stream from an uncompressed stream

CreateStream ( ) : void

Create a new stream

CreateStream ( Avi options ) : void

Create a new stream

CreateStreamWithoutFormat ( ) : void

Create a new stream

GetRateAndScale ( double &frameRate, int &scale ) : void
GetStreamInfo ( IntPtr aviStream ) : Avi.AVISTREAMINFO
Initialize ( int aviFile, bool writeCompressed, double frameRate, Bitmap firstFrameBitmap ) : void

Initialize a new VideoStream

Used only by constructors

SetFormat ( IntPtr aviStream ) : void

Apply a format to a new stream

The format must be set before the first frame can be written, and it cannot be changed later.

VideoStream ( int frameSize, double frameRate, int width, int height, Int16 countBitsPerPixel, int countFrames, Avi compressOptions, bool writeCompressed ) : System

Copy all properties from one VideoStream to another one

Used by EditableVideoStream

Описание методов

AddFrame() публичный Метод

Add one frame to a new stream
This works only with uncompressed streams, and compressed streams that have not been saved yet. Use DecompressToNewFile to edit saved compressed streams.
public AddFrame ( Bitmap bmp ) : void
bmp System.Drawing.Bitmap
Результат void

DecompressToNewFile() публичный Метод

Copy all frames into a new file
Use this method if you want to append frames to an existing, compressed stream
public DecompressToNewFile ( String fileName, bool recompress, VideoStream &newStream2 ) : AviManager
fileName String Name of the new file
recompress bool true: Compress the new stream
newStream2 VideoStream
Результат AviManager

ExportBitmap() публичный Метод

Export a frame into a bitmap file
public ExportBitmap ( int position, String dstFileName ) : void
position int Position of the frame
dstFileName String Name of the file to store the bitmap
Результат void

ExportStream() публичный Метод

Copy the stream into a new file
public ExportStream ( String fileName ) : void
fileName String Name of the new file
Результат void

GetBitmap() публичный Метод

Export a frame into a bitmap
public GetBitmap ( int position ) : Bitmap
position int Position of the frame
Результат System.Drawing.Bitmap

GetFrameClose() публичный Метод

Free ressources that have been used by GetFrameOpen
public GetFrameClose ( ) : void
Результат void

GetFrameOpen() публичный Метод

Prepare for decompressing frames
This method has to be called before GetBitmap and ExportBitmap. Release ressources with GetFrameClose.
public GetFrameOpen ( ) : void
Результат void

VideoStream() публичный Метод

Initialize a new VideoStream and add the first frame
public VideoStream ( int aviFile, Avi compressOptions, double frameRate, Bitmap firstFrame ) : System
aviFile int The file that contains the stream
compressOptions Avi
frameRate double Frames per second
firstFrame System.Drawing.Bitmap Image to write into the stream as the first frame
Результат System

VideoStream() публичный Метод

Initialize a VideoStream for an existing stream
public VideoStream ( int aviFile, IntPtr aviStream ) : System
aviFile int The file that contains the stream
aviStream System.IntPtr An IAVISTREAM from [aviFile]
Результат System

VideoStream() публичный Метод

Initialize a new VideoStream and add the first frame
public VideoStream ( int aviFile, bool writeCompressed, double frameRate, Bitmap firstFrame ) : System
aviFile int The file that contains the stream
writeCompressed 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
Результат System

VideoStream() публичный Метод

Initialize an empty VideoStream
public VideoStream ( int aviFile, bool writeCompressed, double frameRate, int frameSize, int width, int height, PixelFormat format ) : System
aviFile int The file that contains the stream
writeCompressed 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
Результат System

Описание свойств

countFrames защищенное свойство

count of frames in the stream
protected int countFrames
Результат int

firstFrame защищенное свойство

initial frame index
Added by M. Covington
protected int firstFrame
Результат int

frameRate защищенное свойство

protected double frameRate
Результат double