mirror of
https://github.com/simon987/sist2.git
synced 2025-04-24 12:45:56 +00:00
Compare commits
No commits in common. "2882741926089f17084d7848b426e162093cd0de" and "329afcbe4fa6ed5e1181109e4b1fbef50e1e67e0" have entirely different histories.
2882741926
...
329afcbe4f
10
third-party/libscan/CMakeLists.txt
vendored
10
third-party/libscan/CMakeLists.txt
vendored
@ -11,6 +11,11 @@ if (SIST_DEBUG)
|
|||||||
antiword
|
antiword
|
||||||
DEBUG
|
DEBUG
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
add_compile_definitions(
|
||||||
|
antiword
|
||||||
|
NDEBUG
|
||||||
|
)
|
||||||
target_compile_options(
|
target_compile_options(
|
||||||
antiword
|
antiword
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@ -20,11 +25,6 @@ if (SIST_DEBUG)
|
|||||||
-fsanitize=address
|
-fsanitize=address
|
||||||
-fno-inline
|
-fno-inline
|
||||||
)
|
)
|
||||||
else()
|
|
||||||
add_compile_definitions(
|
|
||||||
antiword
|
|
||||||
NDEBUG
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(
|
add_library(
|
||||||
|
8
third-party/libscan/libscan/media/media.c
vendored
8
third-party/libscan/libscan/media/media.c
vendored
@ -251,7 +251,7 @@ void append_tag_meta_if_not_exists(scan_media_ctx_t *ctx, document_t *doc, AVDic
|
|||||||
for (; *ptr; ++ptr) *ptr = (char) tolower(*ptr);
|
for (; *ptr; ++ptr) *ptr = (char) tolower(*ptr);
|
||||||
|
|
||||||
__always_inline
|
__always_inline
|
||||||
static void append_audio_meta(scan_media_ctx_t *ctx, AVFormatContext *pFormatCtx, document_t *doc) {
|
static void append_audio_meta(AVFormatContext *pFormatCtx, document_t *doc) {
|
||||||
|
|
||||||
AVDictionaryEntry *tag = NULL;
|
AVDictionaryEntry *tag = NULL;
|
||||||
while ((tag = av_dict_get(pFormatCtx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
|
while ((tag = av_dict_get(pFormatCtx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
|
||||||
@ -269,7 +269,7 @@ static void append_audio_meta(scan_media_ctx_t *ctx, AVFormatContext *pFormatCtx
|
|||||||
} else if (strcmp(key, "album") == 0) {
|
} else if (strcmp(key, "album") == 0) {
|
||||||
APPEND_TAG_META(MetaAlbum)
|
APPEND_TAG_META(MetaAlbum)
|
||||||
} else if (strcmp(key, "comment") == 0) {
|
} else if (strcmp(key, "comment") == 0) {
|
||||||
append_tag_meta_if_not_exists(ctx, doc, tag, MetaContent);
|
APPEND_TAG_META(MetaContent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -437,7 +437,7 @@ int decode_frame_and_save_thumbnail(scan_media_ctx_t *ctx, AVFormatContext *pFor
|
|||||||
return SAVE_THUMBNAIL_FAILED;
|
return SAVE_THUMBNAIL_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->tesseract_lang != NULL && IS_VIDEO(pFormatCtx) && thumbnail_index == 0) {
|
if (ctx->tesseract_lang != NULL && IS_VIDEO(pFormatCtx)) {
|
||||||
ocr_image(ctx, doc, decoder, frame_and_packet->frame);
|
ocr_image(ctx, doc, decoder, frame_and_packet->frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ void parse_media_format_ctx(scan_media_ctx_t *ctx, AVFormatContext *pFormatCtx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (audio_stream != -1) {
|
if (audio_stream != -1) {
|
||||||
append_audio_meta(ctx, pFormatCtx, doc);
|
append_audio_meta(pFormatCtx, doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (video_stream != -1 && ctx->tn_count > 0) {
|
if (video_stream != -1 && ctx->tn_count > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user