Documentation
¶
Index ¶
- Constants
- func Listen_for_UDP_stream(port string, mute_io ...interface{}) image.Image
- func Screenshot_and_encode_jpeg(buffer *bytes.Buffer, quality ...int) bool
- func Screenshot_and_encode_jpeg_compressed(buffer *bytes.Buffer, capture_Region interface{}, quality int, resizer int) bool
- func Screenshot_and_encode_png(buffer *bytes.Buffer) bool
- func Screenshot_and_encode_png_compressed(buffer *bytes.Buffer, capture_Region interface{}, resizer ...int) bool
- func Transmit_UDP(packet_Max int, connection *net.UDPConn, img_Buffer *bytes.Buffer) bool
Constants ¶
const PACKET_SIZE = 65000
Variables ¶
This section is empty.
Functions ¶
func Listen_for_UDP_stream ¶
Listens for a header and payload with our image data.
func Screenshot_and_encode_jpeg ¶
This function captures the whole display.
func Screenshot_and_encode_jpeg_compressed ¶
func Screenshot_and_encode_jpeg_compressed( buffer *bytes.Buffer, capture_Region interface{}, quality int, resizer int, ) bool
Screenshot and encode as a jpeg to a buffer.
Parameters:
Buffer -> *bytes.buffer - this is the image buffer.
capture_Region -> interface{} - this is a struct for a rect
quality -> int - this is our quality modifier for the jpeg.
resizer -> ...int - this is an optional parameter that allows for us to scale the image by a factor. 4 is basically real-time with a grosser quality.
Output:
This entire function returns true if it succeededs and false if it failes.
func Screenshot_and_encode_png ¶
This function captures the whole display.
func Screenshot_and_encode_png_compressed ¶
func Screenshot_and_encode_png_compressed( buffer *bytes.Buffer, capture_Region interface{}, resizer ...int, ) bool
Screenshot and encode as a jpeg to a buffer.
Parameters:
Buffer -> *bytes.buffer - this is the image buffer.
capture_Region -> interface{} - this is a struct for a rect
resizer -> ...int - this is an optional parameter that allows for us to scale the image by a factor. 4 is basically real-time with a grosser quality.
Output:
This entire function returns true if it succeededs and false if it failes.
func Transmit_UDP ¶
Summary:
This function is responsible for using our internal RUDP protcol to stream data ¶
Parameters:
packet_Max -> int: Maximum amount of bits we'll be sending
connection -> *net.UDPConn: The UDP Connection object
img_Buffer -> *bytes.Buffer: The Buffer we'll be sending across our protcol
Types ¶
This section is empty.