diff --git a/src/lib_ccx/ccx_encoders_common.h b/src/lib_ccx/ccx_encoders_common.h index 5a7c4bfd5..5a8cb6d2c 100644 --- a/src/lib_ccx/ccx_encoders_common.h +++ b/src/lib_ccx/ccx_encoders_common.h @@ -207,6 +207,9 @@ int write_cc_bitmap_as_spupng (struct cc_subtitle *sub, struct encoder_ int write_cc_bitmap_as_transcript (struct cc_subtitle *sub, struct encoder_ctx *context); int write_cc_bitmap_as_libcurl (struct cc_subtitle *sub, struct encoder_ctx *context); +void write_spumux_header(struct encoder_ctx *ctx, struct ccx_s_write *out); +void write_spumux_footer(struct ccx_s_write *out); + struct cc_subtitle * reformat_cc_bitmap_through_sentence_buffer (struct cc_subtitle *sub, struct encoder_ctx *context); void set_encoder_last_displayed_subs_ms(struct encoder_ctx *ctx, LLONG last_displayed_subs_ms); diff --git a/src/lib_ccx/ccx_encoders_helpers.h b/src/lib_ccx/ccx_encoders_helpers.h index 80d6c6232..5fb84a9a6 100644 --- a/src/lib_ccx/ccx_encoders_helpers.h +++ b/src/lib_ccx/ccx_encoders_helpers.h @@ -6,6 +6,7 @@ #include "ccx_decoders_structs.h" #include "ccx_decoders_608.h" #include "ccx_encoders_common.h" +#include "png.h" extern char **spell_lower; extern char **spell_correct; @@ -40,4 +41,6 @@ void shell_sort(void *base, int nb, size_t size, int(*compar)(const void*p1, con void ccx_encoders_helpers_perform_shellsort_words(void); void ccx_encoders_helpers_setup(enum ccx_encoding_type encoding, int no_font_color, int no_type_setting, int trim_subs); + +int mapclut_paletee(png_color *palette, png_byte *alpha, uint32_t *clut, uint8_t depth); #endif diff --git a/src/lib_ccx/ccx_encoders_spupng.c b/src/lib_ccx/ccx_encoders_spupng.c index adca914bf..89f959452 100644 --- a/src/lib_ccx/ccx_encoders_spupng.c +++ b/src/lib_ccx/ccx_encoders_spupng.c @@ -799,11 +799,11 @@ uint32_t* utf8_to_utf32(char* src) { len_src = strlen(src); len_dst = (len_src + 2) * 4; // one for FEFF and one for \0 - char* string_utf32 = (char *)calloc(len_dst, 1); + uint32_t* string_utf32 = (uint32_t *) calloc(len_dst, 1); size_t inbufbytesleft = len_src; size_t outbufbytesleft = len_dst; char* inbuf = src; - char* outbuf = string_utf32; + char* outbuf = (char*) string_utf32; iconv_t cd = iconv_open("UTF-32", "UTF-8"); int result = iconv(cd, &inbuf, &inbufbytesleft, &outbuf, &outbufbytesleft); diff --git a/src/lib_ccx/ccx_encoders_transcript.c b/src/lib_ccx/ccx_encoders_transcript.c index 9f4692281..fd79bca4c 100644 --- a/src/lib_ccx/ccx_encoders_transcript.c +++ b/src/lib_ccx/ccx_encoders_transcript.c @@ -7,6 +7,7 @@ #include "ccx_decoders_708_output.h" #include "ccx_encoders_xds.h" #include "ccx_encoders_helpers.h" +#include "lib_ccx.h" #ifdef ENABLE_SHARING #include "ccx_share.h" diff --git a/src/lib_ccx/ffmpeg_intgr.c b/src/lib_ccx/ffmpeg_intgr.c index 0c77877f3..21dd031af 100644 --- a/src/lib_ccx/ffmpeg_intgr.c +++ b/src/lib_ccx/ffmpeg_intgr.c @@ -13,7 +13,6 @@ #include #include -#include "lib_ccx.h" struct ffmpeg_ctx { AVFormatContext *ifmt; diff --git a/src/lib_ccx/ffmpeg_intgr.h b/src/lib_ccx/ffmpeg_intgr.h index 0e534014f..580ecfabd 100644 --- a/src/lib_ccx/ffmpeg_intgr.h +++ b/src/lib_ccx/ffmpeg_intgr.h @@ -1,6 +1,7 @@ #ifndef _FFMPEG_INTIGRATION #define _FFMPEG_INTIGRATION +#include "lib_ccx.h" #ifdef ENABLE_FFMPEG #include "libavutil/common.h" #include "libavutil/error.h" diff --git a/src/lib_ccx/general_loop.c b/src/lib_ccx/general_loop.c index cff896848..497764573 100644 --- a/src/lib_ccx/general_loop.c +++ b/src/lib_ccx/general_loop.c @@ -1194,7 +1194,7 @@ int rcwt_loop(struct lib_ccx_ctx *ctx) int caps = 0; LLONG result; struct encoder_ctx *enc_ctx = update_encoder_list(ctx); - struct Teletext *telctx; + struct TeletextCtx *telctx; // As BUFSIZE is a macro this is just a reminder if (BUFSIZE < (3*0xFFFF + 10)) fatal (CCX_COMMON_EXIT_BUG_BUG, "In rcwt_loop: BUFSIZE too small for RCWT caption block.\n");