// 定义 PinDirection 枚举
enum PinDirection {
    Input,
    Output
}

// 定义 AMMediaType 类
class AMMediaType {
    MajorType: string;
    SubType: string;
    FixedSizeSamples: boolean = true;
    TemporalCompression: boolean;
    SampleSize: number = 1;
    FormatType: string;
    unkPtr: number;
    FormatSize: number;
    FormatPtr: number;

    constructor() {
        this.MajorType = '';
        this.SubType = '';
        this.TemporalCompression = false;
        this.unkPtr = 0;
        this.FormatSize = 0;
        this.FormatPtr = 0;
    }

    dispose() {
        // 在 TypeScript 中没有直接的非托管资源释放，这里只是占位
    }
}

// 定义 IBaseFilter 接口
interface IBaseFilter {}

// 定义 PinInfo 类
class PinInfo {
    Filter: IBaseFilter;
    Direction: PinDirection;
    Name: string;

    constructor() {
        this.Filter = {} as IBaseFilter;
        this.Direction = PinDirection.Input;
        this.Name = '';
    }
}

// 定义 RECT 接口
interface RECT {
    Left: number;
    Top: number;
    Right: number;
    Bottom: number;
}

// 定义 BitmapInfoHeader 接口
interface BitmapInfoHeader {
    Size: number;
    Width: number;
    Height: number;
    Planes: number;
    BitCount: number;
    Compression: number;
    ImageSize: number;
    XPelsPerMeter: number;
    YPelsPerMeter: number;
    ColorsUsed: number;
    ColorsImportant: number;
}

// 定义 VideoInfoHeader 接口
interface VideoInfoHeader {
    SrcRect: RECT;
    TargetRect: RECT;
    BitRate: number;
    BitErrorRate: number;
    AverageTimePerFrame: number;
    BmiHeader: BitmapInfoHeader;
}

export {
    PinDirection,
    AMMediaType,
    IBaseFilter,
    PinInfo,
    RECT,
    BitmapInfoHeader,
    VideoInfoHeader
};