mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 11:53:25 +00:00
remove more global variables from header files
This commit is contained in:
parent
4ae5f3483c
commit
87f1a3845c
@ -93,6 +93,6 @@ struct ccx_s_options // Options from user parameters
|
||||
struct ccx_s_write wbout2;
|
||||
};
|
||||
|
||||
struct ccx_s_options ccx_options;
|
||||
extern struct ccx_s_options ccx_options;
|
||||
void init_options (struct ccx_s_options *options);
|
||||
#endif
|
||||
|
@ -14,7 +14,8 @@ struct ccx_common_logging_t {
|
||||
void(*debug_ftn) (LLONG mask, const char *fmt, ...); // Used to process debug output. Mask can be ignored (custom set by debug_mask).
|
||||
void(*log_ftn)(const char *fmt, ...); // Used to print things. Replacement of standard printf, to allow more control.
|
||||
void(*gui_ftn)(enum ccx_common_logging_gui message_type, ...); // Used to display things in a gui (if appropriate). Is called with the message_type and appropriate variables (described in enum)
|
||||
} ccx_common_logging;
|
||||
};
|
||||
extern struct ccx_common_logging_t ccx_common_logging;
|
||||
|
||||
enum subtype
|
||||
{
|
||||
|
@ -41,7 +41,10 @@ struct gop_time_code gop_time, first_gop_time, printed_gop;
|
||||
LLONG fts_at_gop_start = 0;
|
||||
int gop_rollover = 0;
|
||||
|
||||
void ccx_common_timing_init(LLONG *file_position,int no_sync){
|
||||
struct ccx_common_timing_settings_t ccx_common_timing_settings;
|
||||
|
||||
void ccx_common_timing_init(LLONG *file_position,int no_sync)
|
||||
{
|
||||
ccx_common_timing_settings.disable_sync_check = 0;
|
||||
ccx_common_timing_settings.is_elementary_stream = 0;
|
||||
ccx_common_timing_settings.file_position = file_position;
|
||||
|
@ -19,7 +19,8 @@ struct ccx_common_timing_settings_t {
|
||||
int no_sync; // If 1, there will be no sync at all. Mostly useful for debugging.
|
||||
int is_elementary_stream; // Needs to be set, as it's used in set_fts.
|
||||
LLONG *file_position; // The position of the file
|
||||
} ccx_common_timing_settings;
|
||||
};
|
||||
extern struct ccx_common_timing_settings_t ccx_common_timing_settings;
|
||||
|
||||
struct ccx_boundary_time
|
||||
{
|
||||
|
@ -70,10 +70,11 @@ typedef struct eia608_screen // A CC buffer
|
||||
int cur_xds_packet_class;
|
||||
} eia608_screen;
|
||||
|
||||
struct ccx_decoderrs_common_settings_t {
|
||||
struct ccx_decoders_common_settings_t {
|
||||
LLONG subs_delay; // ms to delay (or advance) subs
|
||||
enum ccx_output_format output_format; // What kind of output format should be used?
|
||||
} ccx_decoders_common_settings;
|
||||
};
|
||||
extern struct ccx_decoders_common_settings_t ccx_decoders_common_settings;
|
||||
|
||||
#define CCX_DECODERS_STRUCTS_H
|
||||
#endif
|
||||
#endif
|
||||
|
@ -17,7 +17,7 @@ char **spell_lower = NULL;
|
||||
char **spell_correct = NULL;
|
||||
int spell_words = 0;
|
||||
int spell_capacity = 0;
|
||||
|
||||
struct ccx_encoders_helpers_settings_t ccx_encoders_helpers_settings;
|
||||
// Some basic English words, so user-defined doesn't have to
|
||||
// include the common stuff
|
||||
static const char *spell_builtin[] =
|
||||
|
@ -18,7 +18,8 @@ struct ccx_encoders_helpers_settings_t {
|
||||
int no_font_color;
|
||||
int no_type_setting;
|
||||
enum ccx_encoding_type encoding;
|
||||
} ccx_encoders_helpers_settings;
|
||||
};
|
||||
extern struct ccx_encoders_helpers_settings_t ccx_encoders_helpers_settings;
|
||||
|
||||
// Helper functions
|
||||
void correct_case(int line_num, struct eia608_screen *data);
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "lib_ccx.h"
|
||||
#include "ccx_common_option.h"
|
||||
|
||||
|
||||
struct ccx_common_logging_t ccx_common_logging;
|
||||
struct ccx_decoders_common_settings_t ccx_decoders_common_settings;
|
||||
struct lib_ccx_ctx* init_libraries(struct ccx_s_options *opt)
|
||||
{
|
||||
struct lib_ccx_ctx *ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user