-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow building linux client, go fmt, misc
- Loading branch information
Showing
24 changed files
with
183 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
internal/client/controller/ambilight/capturer/dxgi/display_linux.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package dxgi | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"golang.org/x/image/draw" | ||
"image" | ||
) | ||
|
||
type display struct { | ||
index int | ||
id int | ||
width int | ||
height int | ||
x int | ||
y int | ||
scaler draw.Scaler | ||
buf *image.RGBA | ||
} | ||
|
||
func (d *display) Id() int { | ||
return 0 | ||
} | ||
|
||
func (d *display) Width() int { | ||
return d.width | ||
} | ||
|
||
func (d *display) Height() int { | ||
return d.height | ||
} | ||
|
||
func (d *display) X() int { | ||
return d.x | ||
} | ||
|
||
func (d *display) Y() int { | ||
return d.y | ||
} | ||
|
||
func (d *display) Scaler() draw.Scaler { | ||
return d.scaler | ||
} | ||
|
||
func (d *display) Resolution() string { | ||
return fmt.Sprintf("%dx%d", d.width, d.height) | ||
} | ||
|
||
|
||
func (d *display) String() string { | ||
return fmt.Sprintf("{id: %d, width: %d, height: %d, left: %d, top: %d}", d.id, d.width, d.height, d.x, d.y) | ||
} | ||
|
||
func (d *display) Capture(ctx context.Context) chan []byte { | ||
return nil | ||
} | ||
|
||
func (d *display) reset() error { | ||
return nil | ||
} | ||
|
||
func (d *display) SyncCapture(ctx context.Context, frames chan []byte) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
internal/client/controller/ambilight/capturer/scrap/display_linux.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package scrap | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"golang.org/x/image/draw" | ||
"image" | ||
) | ||
|
||
type display struct { | ||
index int | ||
id int | ||
width int | ||
height int | ||
x int | ||
y int | ||
scaler draw.Scaler | ||
buf *image.RGBA | ||
} | ||
|
||
func (d *display) Id() int { | ||
return 0 | ||
} | ||
|
||
func (d *display) Width() int { | ||
return d.width | ||
} | ||
|
||
func (d *display) Height() int { | ||
return d.height | ||
} | ||
|
||
func (d *display) X() int { | ||
return d.x | ||
} | ||
|
||
func (d *display) Y() int { | ||
return d.y | ||
} | ||
|
||
func (d *display) Scaler() draw.Scaler { | ||
return d.scaler | ||
} | ||
|
||
func (d *display) Resolution() string { | ||
return fmt.Sprintf("%dx%d", d.width, d.height) | ||
} | ||
|
||
|
||
func (d *display) String() string { | ||
return fmt.Sprintf("{id: %d, width: %d, height: %d, left: %d, top: %d}", d.id, d.width, d.height, d.x, d.y) | ||
} | ||
|
||
func (d *display) Capture(ctx context.Context) chan []byte { | ||
return nil | ||
} | ||
|
||
func (d *display) reset() error { | ||
return nil | ||
} | ||
|
||
func (d *display) SyncCapture(ctx context.Context, frames chan []byte) {} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,3 @@ func WithDisplayConfig(cfg []DisplayConfig) Option { | |
return nil | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.