Documentation ¶
Index ¶
- type Transcoder
- func (t *Transcoder) CreateInputPipe() (*io.PipeWriter, error)
- func (t *Transcoder) CreateOutputPipe(containerFormat string) (*io.PipeReader, error)
- func (t Transcoder) FFmpegExec() string
- func (t Transcoder) FFprobeExec() string
- func (t Transcoder) GetCommand() []string
- func (t *Transcoder) GetMetadata(inputPath string) error
- func (t *Transcoder) GetMetadataByPipe(r io.Reader) error
- func (t *Transcoder) Initialize(inputPath string, outputPath string) error
- func (t *Transcoder) InitializeEmptyTranscoder() error
- func (t Transcoder) MediaFile() *models.Mediafile
- func (t Transcoder) Output() <-chan models.Progress
- func (t Transcoder) Process() *exec.Cmd
- func (t *Transcoder) Run(progress bool) <-chan error
- func (t *Transcoder) SetConfiguration(v ffmpeg.Configuration)
- func (t *Transcoder) SetInputPath(inputPath string) error
- func (t *Transcoder) SetMediaFile(v *models.Mediafile)
- func (t *Transcoder) SetOutputPath(inputPath string) error
- func (t *Transcoder) SetProcess(cmd *exec.Cmd)
- func (t *Transcoder) SetProcessStderrPipe(v io.ReadCloser)
- func (t *Transcoder) SetProcessStdinPipe(v io.WriteCloser)
- func (t *Transcoder) SetWhiteListProtocols(availableProtocols []string)
- func (t *Transcoder) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transcoder ¶
type Transcoder struct {
// contains filtered or unexported fields
}
Transcoder Main struct
func (*Transcoder) CreateInputPipe ¶
func (t *Transcoder) CreateInputPipe() (*io.PipeWriter, error)
CreateInputPipe creates an input pipe for the transcoding process
func (*Transcoder) CreateOutputPipe ¶
func (t *Transcoder) CreateOutputPipe(containerFormat string) (*io.PipeReader, error)
CreateOutputPipe creates an output pipe for the transcoding process
func (Transcoder) FFmpegExec ¶
func (t Transcoder) FFmpegExec() string
FFmpegExec Get FFmpeg Bin path
func (Transcoder) FFprobeExec ¶
func (t Transcoder) FFprobeExec() string
FFprobeExec Get FFprobe Bin path
func (Transcoder) GetCommand ¶
func (t Transcoder) GetCommand() []string
GetCommand Build and get command
func (*Transcoder) GetMetadata ¶
func (t *Transcoder) GetMetadata(inputPath string) error
Initialize Init the transcoding process
func (*Transcoder) GetMetadataByPipe ¶
func (t *Transcoder) GetMetadataByPipe(r io.Reader) error
Initialize Init the transcoding process
func (*Transcoder) Initialize ¶
func (t *Transcoder) Initialize(inputPath string, outputPath string) error
Initialize Init the transcoding process
func (*Transcoder) InitializeEmptyTranscoder ¶
func (t *Transcoder) InitializeEmptyTranscoder() error
InitializeEmptyTranscoder initializes the fields necessary for a blank transcoder
func (Transcoder) MediaFile ¶
func (t Transcoder) MediaFile() *models.Mediafile
MediaFile Get the ttranscoding media file.
func (Transcoder) Output ¶
func (t Transcoder) Output() <-chan models.Progress
Output Returns the transcoding progress channel
func (*Transcoder) Run ¶
func (t *Transcoder) Run(progress bool) <-chan error
Run Starts the transcoding process
func (*Transcoder) SetConfiguration ¶
func (t *Transcoder) SetConfiguration(v ffmpeg.Configuration)
SetConfiguration Set the transcoding configuration
func (*Transcoder) SetInputPath ¶
func (t *Transcoder) SetInputPath(inputPath string) error
SetInputPath sets the input path for transcoding
func (*Transcoder) SetMediaFile ¶
func (t *Transcoder) SetMediaFile(v *models.Mediafile)
SetMediaFile Set the media file
func (*Transcoder) SetOutputPath ¶
func (t *Transcoder) SetOutputPath(inputPath string) error
SetOutputPath sets the output path for transcoding
func (*Transcoder) SetProcess ¶
func (t *Transcoder) SetProcess(cmd *exec.Cmd)
SetProcess Set the transcoding process
func (*Transcoder) SetProcessStderrPipe ¶
func (t *Transcoder) SetProcessStderrPipe(v io.ReadCloser)
SetProcessStderrPipe Set the STDERR pipe
func (*Transcoder) SetProcessStdinPipe ¶
func (t *Transcoder) SetProcessStdinPipe(v io.WriteCloser)
SetProcessStdinPipe Set the STDIN pipe
func (*Transcoder) SetWhiteListProtocols ¶
func (t *Transcoder) SetWhiteListProtocols(availableProtocols []string)