"use strict";
/**
 * webcodecs-node - Native WebCodecs API implementation for Node.js
 *
 * This package provides a native implementation of the W3C WebCodecs API
 * for Node.js, using FFmpeg for encoding and decoding.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.DOMRectReadOnly = exports.parseVp9CodecString = exports.parseAacCodecString = exports.parseAvcCodecString = exports.getFFmpegAudioCodec = exports.getFFmpegVideoCodec = exports.isAudioCodecSupported = exports.isVideoCodecSupported = exports.AudioDecoder = exports.AudioEncoder = exports.VideoDecoder = exports.VideoEncoder = exports.VideoColorSpace = exports.EncodedAudioChunk = exports.EncodedVideoChunk = exports.AudioData = exports.VideoFrame = void 0;
exports.getFFmpegVersion = getFFmpegVersion;
exports.listCodecs = listCodecs;
exports.hasCodec = hasCodec;
exports.isNativeAvailable = isNativeAvailable;
// Core frame types
var VideoFrame_1 = require("./VideoFrame");
Object.defineProperty(exports, "VideoFrame", { enumerable: true, get: function () { return VideoFrame_1.VideoFrame; } });
var AudioData_1 = require("./AudioData");
Object.defineProperty(exports, "AudioData", { enumerable: true, get: function () { return AudioData_1.AudioData; } });
// Encoded chunk types
var EncodedVideoChunk_1 = require("./EncodedVideoChunk");
Object.defineProperty(exports, "EncodedVideoChunk", { enumerable: true, get: function () { return EncodedVideoChunk_1.EncodedVideoChunk; } });
var EncodedAudioChunk_1 = require("./EncodedAudioChunk");
Object.defineProperty(exports, "EncodedAudioChunk", { enumerable: true, get: function () { return EncodedAudioChunk_1.EncodedAudioChunk; } });
// Color space
var VideoColorSpace_1 = require("./VideoColorSpace");
Object.defineProperty(exports, "VideoColorSpace", { enumerable: true, get: function () { return VideoColorSpace_1.VideoColorSpace; } });
// Video encoder/decoder
var VideoEncoder_1 = require("./VideoEncoder");
Object.defineProperty(exports, "VideoEncoder", { enumerable: true, get: function () { return VideoEncoder_1.VideoEncoder; } });
var VideoDecoder_1 = require("./VideoDecoder");
Object.defineProperty(exports, "VideoDecoder", { enumerable: true, get: function () { return VideoDecoder_1.VideoDecoder; } });
// Audio encoder/decoder
var AudioEncoder_1 = require("./AudioEncoder");
Object.defineProperty(exports, "AudioEncoder", { enumerable: true, get: function () { return AudioEncoder_1.AudioEncoder; } });
var AudioDecoder_1 = require("./AudioDecoder");
Object.defineProperty(exports, "AudioDecoder", { enumerable: true, get: function () { return AudioDecoder_1.AudioDecoder; } });
// Codec registry utilities
var codec_registry_1 = require("./codec-registry");
Object.defineProperty(exports, "isVideoCodecSupported", { enumerable: true, get: function () { return codec_registry_1.isVideoCodecSupported; } });
Object.defineProperty(exports, "isAudioCodecSupported", { enumerable: true, get: function () { return codec_registry_1.isAudioCodecSupported; } });
Object.defineProperty(exports, "getFFmpegVideoCodec", { enumerable: true, get: function () { return codec_registry_1.getFFmpegVideoCodec; } });
Object.defineProperty(exports, "getFFmpegAudioCodec", { enumerable: true, get: function () { return codec_registry_1.getFFmpegAudioCodec; } });
Object.defineProperty(exports, "parseAvcCodecString", { enumerable: true, get: function () { return codec_registry_1.parseAvcCodecString; } });
Object.defineProperty(exports, "parseAacCodecString", { enumerable: true, get: function () { return codec_registry_1.parseAacCodecString; } });
Object.defineProperty(exports, "parseVp9CodecString", { enumerable: true, get: function () { return codec_registry_1.parseVp9CodecString; } });
// Type exports
var types_1 = require("./types");
Object.defineProperty(exports, "DOMRectReadOnly", { enumerable: true, get: function () { return types_1.DOMRectReadOnly; } });
// Native utilities (if available)
let _native = null;
try {
    _native = require('../build/Release/webcodecs_node.node');
}
catch {
    // Native addon not available
}
/**
 * Get FFmpeg version information
 */
function getFFmpegVersion() {
    if (_native && _native.getFFmpegVersion) {
        return _native.getFFmpegVersion();
    }
    return null;
}
/**
 * List available codecs
 */
function listCodecs() {
    if (_native && _native.listCodecs) {
        return _native.listCodecs();
    }
    return null;
}
/**
 * Check if a specific codec is available
 */
function hasCodec(codecName, type) {
    if (_native && _native.hasCodec) {
        return _native.hasCodec(codecName, type);
    }
    return false;
}
/**
 * Check if native addon is available
 */
function isNativeAvailable() {
    return _native !== null;
}
//# sourceMappingURL=index.js.map