Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transcode ¶
func Transcode(ctx context.Context, cfg app.TranscodeConfig, sourceURL *url.URL, headers map[string]string) (io.ReadCloser, func() error, error)
Transcode starts an ffmpeg process that reads from sourceURL and writes transcoded output to a pipe. Returns the readable end, a wait function for the process, and any startup error.
Types ¶
type StreamServer ¶
type StreamServer struct {
// contains filtered or unexported fields
}
StreamServer serves an io.Reader over HTTP. The consumer's read pace drives the producer through OS pipe backpressure.
func NewStreamServer ¶
func NewStreamServer(cfg StreamServerConfig, reader io.Reader) (*StreamServer, error)
func (*StreamServer) Close ¶ added in v0.1.0
func (s *StreamServer) Close() error
Close shuts down the server.
func (*StreamServer) URL ¶
func (s *StreamServer) URL() *url.URL
URL returns the full URL the server is listening on.
Click to show internal directories.
Click to hide internal directories.