"Unexport" encodeTrack()
It's only used by StreamTrack() anyway.
This commit is contained in:
@@ -41,11 +41,11 @@ func StreamTrack(w http.ResponseWriter, r *http.Request, trackPath string, clien
|
|||||||
http.ServeFile(w, r, cacheFile)
|
http.ServeFile(w, r, cacheFile)
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("`%s`: cache [%s/%s] miss!\n", trackPath, profile.format, profile.bitrate)
|
fmt.Printf("`%s`: cache [%s/%s] miss!\n", trackPath, profile.format, profile.bitrate)
|
||||||
EncodeTrack(w, r, trackPath, cacheFile, profile)
|
encodeTrack(w, r, trackPath, cacheFile, profile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func EncodeTrack(w http.ResponseWriter, r *http.Request, trackPath string, cachePath string, profile *encoderProfile) {
|
func encodeTrack(w http.ResponseWriter, r *http.Request, trackPath string, cachePath string, profile *encoderProfile) {
|
||||||
// Prepare the command and file descriptors:
|
// Prepare the command and file descriptors:
|
||||||
cmd := ffmpegCommand(trackPath, profile)
|
cmd := ffmpegCommand(trackPath, profile)
|
||||||
pipeReader, pipeWriter := io.Pipe()
|
pipeReader, pipeWriter := io.Pipe()
|
||||||
|
|||||||
Reference in New Issue
Block a user