mirror of
https://github.com/datarhei/core.git
synced 2025-10-15 12:30:45 +08:00
Make resources the only direct user of psutil
This commit is contained in:
@@ -38,13 +38,20 @@ func getDummyRestreamer(portrange net.Portranger, validatorIn, validatorOut ffmp
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resources, err := resources.New(resources.Config{
|
||||
PSUtil: psutil,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ffmpeg, err := ffmpeg.New(ffmpeg.Config{
|
||||
Binary: binary,
|
||||
LogHistoryLength: 3,
|
||||
Portrange: portrange,
|
||||
ValidatorInput: validatorIn,
|
||||
ValidatorOutput: validatorOut,
|
||||
PSUtil: psutil,
|
||||
Resource: resources,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -88,13 +95,6 @@ func getDummyRestreamer(portrange net.Portranger, validatorIn, validatorOut ffmp
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resources, err := resources.New(resources.Config{
|
||||
PSUtil: psutil,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rs, err := New(Config{
|
||||
FFmpeg: ffmpeg,
|
||||
Replace: replacer,
|
||||
|
Reference in New Issue
Block a user