Skip to content

Commit d44579a

Browse files
committed
finish of the main function for hardsubx
1 parent 4410676 commit d44579a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/rust/src/hardsubx/main.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ use std::ffi;
1818
use std::os::raw::c_void;
1919
use std::process;
2020
use std::ptr::null;
21+
use std::time::{Duration, Instant};
22+
2123
#[cfg(feature = "hardsubx_ocr")]
2224
use tesseract_sys::*;
2325
extern "C" {
@@ -195,7 +197,14 @@ pub unsafe fn _dinit_hardsubx(ctx: &mut HardsubxContext) {
195197
/// Dereferences a raw pointer (datamember of the object ctx)
196198
#[no_mangle]
197199
pub unsafe extern "C" fn hardsubx(options: *mut ccx_s_options, ctx_normal: *mut lib_ccx_ctx) {
200+
println!("HardsubX (Hard Subtitle Extractor) - Burned-in subtitle extraction subsystem\n");
201+
198202
let mut ctx = HardsubxContext::new(options);
203+
204+
let start = Instant::now();
199205
hardsubx_process_data(&mut ctx, ctx_normal);
206+
let duration: Duration = start.elapsed();
207+
208+
println!("Processing time = {:?}", duration);
200209
_dinit_hardsubx(&mut ctx);
201210
}

0 commit comments

Comments
 (0)