Skip to content

Commit

Permalink
fix: windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed Aug 25, 2023
1 parent 3a553aa commit 62c36f6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ num-traits = "0.2.16"
winapi = "0.3.9"
cfg-if = "1.0.0"
sha2 = "0.10.7"
libc = "0.2.147"

[build-dependencies]
bindgen = "0.58.1"
Expand Down
24 changes: 12 additions & 12 deletions src/rust/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ impl CcxTeletextConfig {
extraction_start: self.extraction_start.to_ctype(),
extraction_end: self.extraction_end.to_ctype(),
write_format: self.write_format.into(),
gui_mode_reports: self.gui_mode_reports as i32,
date_format: self.date_format as u32,
noautotimeref: self.noautotimeref as i32,
send_to_srv: self.send_to_srv as u32,
encoding: self.encoding as u32,
nofontcolor: self.nofontcolor as i32,
nohtmlescape: self.nohtmlescape as i32,
millis_separator: self.millis_separator as i8,
latrusmap: self.latrusmap as i32,
gui_mode_reports: self.gui_mode_reports as _,
date_format: self.date_format as _,
noautotimeref: self.noautotimeref as _,
send_to_srv: self.send_to_srv as _,
encoding: self.encoding as _,
nofontcolor: self.nofontcolor as _,
nohtmlescape: self.nohtmlescape as _,
millis_separator: self.millis_separator as _,
latrusmap: self.latrusmap as _,
};
config.set_verbose(if self.verbose { 1 } else { 0 });
config.set_bom(if self.bom { 1 } else { 0 });
Expand Down Expand Up @@ -841,11 +841,11 @@ impl CcxOptions {
hardsubx_hue: self.hardsubx_hue.unwrap_or_default(),
hardsubx_lum_thresh: self.hardsubx_lum_thresh.unwrap_or(0.0),
transcript_settings: self.transcript_settings.to_ctype(),
date_format: self.date as u32,
date_format: self.date as _,
write_format_rewritten: self.write_format_rewritten as _,
use_ass_instead_of_ssa: self.use_ass_instead_of_ssa as _,
use_webvtt_styling: self.use_webvtt_styling as _,
debug_mask: self.debug_mask as i64,
debug_mask: self.debug_mask as _,
debug_mask_on_debug: self.debug_mask_on_debug,
udpsrc: get_raw_string(&self.udpsrc.clone().unwrap_or_default()),
udpaddr: get_raw_string(&self.udpaddr.clone().unwrap_or_default()),
Expand All @@ -856,7 +856,7 @@ impl CcxOptions {
srv_addr: get_raw_string(&self.srv_addr.clone().unwrap_or_default()),
srv_port: get_raw_string(&self.srv_port.unwrap_or_default().to_string()),
noautotimeref: self.noautotimeref as _,
input_source: self.input_source as u32,
input_source: self.input_source as _,
output_filename: get_raw_string(&self.output_filename.clone().unwrap_or_default()),
inputfile: get_raw_strings(self.inputfile.clone().unwrap_or_default()),
num_input_files: self.num_input_files.unwrap_or_default(),
Expand Down

0 comments on commit 62c36f6

Please sign in to comment.