diff --git a/include/raw-encoding.h b/include/raw-encoding.h deleted file mode 100644 index 7e906ea..0000000 --- a/include/raw-encoding.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2019 - 2021 Andri Yngvason - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#pragma once - -struct nvnc_fb; -struct rfb_pixel_format; -struct pixman_region16; -struct vec; diff --git a/include/tight.h b/include/tight.h index 0499500..b3ec658 100644 --- a/include/tight.h +++ b/include/tight.h @@ -16,21 +16,6 @@ #pragma once -#include "encoder.h" -#include "rfb-proto.h" -#include "vec.h" - -#include -#include -#include -#include - -struct tight_tile; -struct pixman_region16; -struct aml_work; - -typedef void (*tight_done_fn)(struct vec* frame, void*); - enum tight_quality { TIGHT_QUALITY_UNSPEC = 0, TIGHT_QUALITY_LOSSLESS, @@ -38,29 +23,3 @@ enum tight_quality { TIGHT_QUALITY_HIGH, }; -struct tight_encoder { - struct encoder encoder; - - uint32_t width; - uint32_t height; - uint32_t grid_width; - uint32_t grid_height; - enum tight_quality quality; - - struct tight_tile* grid; - - z_stream zs[4]; - struct aml_work* zs_worker[4]; - - struct rfb_pixel_format dfmt; - struct rfb_pixel_format sfmt; - struct nvnc_fb* fb; - - uint32_t n_rects; - uint32_t n_jobs; - - struct vec dst; - - tight_done_fn on_frame_done; - void* userdata; -}; diff --git a/include/zrle.h b/include/zrle.h deleted file mode 100644 index 662b467..0000000 --- a/include/zrle.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2019 - 2021 Andri Yngvason - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#pragma once - -#include -#include -#include - -struct nvnc_fb; -struct rfb_pixel_format; -struct pixman_region16; -struct vec; diff --git a/src/raw-encoding.c b/src/raw-encoding.c index 93380b2..fdafb91 100644 --- a/src/raw-encoding.c +++ b/src/raw-encoding.c @@ -19,7 +19,6 @@ #include "vec.h" #include "fb.h" #include "pixels.h" -#include "raw-encoding.h" #include "enc-util.h" #include "encoder.h" #include "rcbuf.h" diff --git a/src/tight.c b/src/tight.c index c670282..8df6481 100644 --- a/src/tight.c +++ b/src/tight.c @@ -25,6 +25,7 @@ #include "enc-util.h" #include "fb.h" #include "rcbuf.h" +#include "encoder.h" #include #include @@ -57,6 +58,35 @@ struct encoder* tight_encoder_new(uint16_t width, uint16_t height); +typedef void (*tight_done_fn)(struct vec* frame, void*); + +struct tight_encoder { + struct encoder encoder; + + uint32_t width; + uint32_t height; + uint32_t grid_width; + uint32_t grid_height; + enum tight_quality quality; + + struct tight_tile* grid; + + z_stream zs[4]; + struct aml_work* zs_worker[4]; + + struct rfb_pixel_format dfmt; + struct rfb_pixel_format sfmt; + struct nvnc_fb* fb; + + uint32_t n_rects; + uint32_t n_jobs; + + struct vec dst; + + tight_done_fn on_frame_done; + void* userdata; +}; + enum tight_tile_state { TIGHT_TILE_READY = 0, TIGHT_TILE_DAMAGED, diff --git a/src/zrle.c b/src/zrle.c index cde6450..be51e2e 100644 --- a/src/zrle.c +++ b/src/zrle.c @@ -16,7 +16,6 @@ #include "rfb-proto.h" #include "vec.h" -#include "zrle.h" #include "neatvnc.h" #include "pixels.h" #include "fb.h"