forked from muthink/videomaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AviStream.cs
40 lines (33 loc) · 1.03 KB
/
AviStream.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
namespace AviFile
{
public abstract class AviStream
{
protected int aviFile;
protected IntPtr aviStream;
protected IntPtr compressedStream;
protected bool writeCompressed;
/// <summary>Pointer to the unmanaged AVI file</summary>
internal int FilePointer {
get { return aviFile; }
}
/// <summary>Pointer to the unmanaged AVI Stream</summary>
internal virtual IntPtr StreamPointer {
get { return aviStream; }
}
/// <summary>Flag: The stream is compressed/uncompressed</summary>
internal bool WriteCompressed {
get { return writeCompressed; }
}
/// <summary>Close the stream</summary>
public virtual void Close(){
if(writeCompressed){
Avi.AVIStreamRelease(compressedStream);
}
Avi.AVIStreamRelease(StreamPointer);
}
/// <summary>Export the stream into a new file</summary>
/// <param name="fileName"></param>
public abstract void ExportStream(String fileName);
}
}