@eleven-am/transcoder
Version:
High-performance HLS transcoding library with hardware acceleration, intelligent client management, and distributed processing support for Node.js
52 lines • 2.16 kB
TypeScript
import { TaskEither } from '@eleven-am/fp';
import { FileStorage } from './fileStorage';
import { SegmentStream, StreamType } from './types';
export declare class MediaSource {
private readonly filePath;
private readonly storage;
constructor(filePath: string, storage: FileStorage);
/**
* Retrieves the path of the media file
*/
getFileId(): TaskEither<string>;
/**
* Deletes the temporary files associated with the media source generated during transcoding
*/
deleteTempFiles(): TaskEither<void>;
/**
* Retrieves the absolute path of the media file
*/
getFilePath(): string;
/**
* Checks if a segment exists in the storage
* @param streamType The type of stream (video/audio)
* @param streamIndex The index of the stream
* @param quality The quality of the segment
* @param segmentNumber The number of the segment
*/
segmentExist(streamType: StreamType, streamIndex: number, quality: string, segmentNumber: number): TaskEither<boolean>;
/**
* Retrieves the directory path for a specific stream type, index and quality
* @param streamType The type of stream (video/audio)
* @param streamIndex The index of the stream
* @param quality The quality of the stream
*/
getStreamDirectory(streamType: StreamType, streamIndex: number, quality: string): TaskEither<string>;
/**
* Retrieves the input stream of a segment
* @param streamType The type of stream (video/audio)
* @param streamIndex The index of the stream
* @param quality The quality of the segment
* @param segmentNumber The number of the segment
*/
getSegmentStream(streamType: StreamType, streamIndex: number, quality: string, segmentNumber: number): TaskEither<SegmentStream>;
/**
* Retrieves the path of a segment in the storage
* @param streamType The type of stream (video/audio)
* @param streamIndex The index of the stream
* @param quality The quality of the segment
* @param segmentNumber The number of the segment
*/
private getSegmentPath;
}
//# sourceMappingURL=mediaSource.d.ts.map