mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 02:34:42 +00:00
Downgrade requirements for an old Ubuntu
This commit is contained in:
parent
f475dbabb7
commit
1993950cd7
2 changed files with 10 additions and 3 deletions
|
|
@ -58,6 +58,9 @@ a better sense of performance.
|
|||
, [libopus](http://opus-codec.org/), [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)
|
||||
, [sdl2](https://wiki.libsdl.org/Installation)
|
||||
|
||||
(If you need to use the app on an older version of Ubuntu that does not have libyuv, you can add a custom apt repository:
|
||||
`add sudo add-apt-repository ppa:savoury1/graphics`)
|
||||
|
||||
```
|
||||
# Ubuntu / Windows (WSL2)
|
||||
apt-get install -y make gcc pkg-config libvpx-dev libx264-dev libopus-dev libsdl2-dev libyuv-dev libjpeg-turbo8-dev
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ type Options struct {
|
|||
func NewEncoder(w, h int, th int, opts *Options) (encoder *H264, err error) {
|
||||
libVersion := LibVersion()
|
||||
|
||||
if libVersion < 156 {
|
||||
return nil, fmt.Errorf("x264: the library version should be newer than v155, you have got version %v", libVersion)
|
||||
if libVersion < 150 {
|
||||
return nil, fmt.Errorf("x264: the library version should be newer than v150, you have got version %v", libVersion)
|
||||
}
|
||||
|
||||
if opts == nil {
|
||||
|
|
@ -64,7 +64,11 @@ func NewEncoder(w, h int, th int, opts *Options) (encoder *H264, err error) {
|
|||
ww, hh := int32(w), int32(h)
|
||||
|
||||
param.IBitdepth = 8
|
||||
param.ICsp = CspI420
|
||||
if libVersion > 155 {
|
||||
param.ICsp = CspI420
|
||||
} else {
|
||||
param.ICsp = 1
|
||||
}
|
||||
param.IWidth = ww
|
||||
param.IHeight = hh
|
||||
param.ILogLevel = opts.LogLevel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue