mtmd: fix android build (#26150)
This commit is contained in:
@@ -640,6 +640,7 @@ bool mtmd_helper_support_video(mtmd_context * ctx) {
|
|||||||
#ifdef MTMD_VIDEO
|
#ifdef MTMD_VIDEO
|
||||||
return mtmd_support_vision(ctx);
|
return mtmd_support_vision(ctx);
|
||||||
#else
|
#else
|
||||||
|
GGML_UNUSED(ctx);
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1007,6 +1008,9 @@ mtmd_helper_video * mtmd_helper_video_init(
|
|||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
#else
|
#else
|
||||||
|
GGML_UNUSED(mctx);
|
||||||
|
GGML_UNUSED(path);
|
||||||
|
GGML_UNUSED(params);
|
||||||
LOG_ERR("%s: video is not supported in this build (MTMD_VIDEO is set to OFF)\n", __func__);
|
LOG_ERR("%s: video is not supported in this build (MTMD_VIDEO is set to OFF)\n", __func__);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
@@ -1039,6 +1043,10 @@ mtmd_helper_video * mtmd_helper_video_init_from_buf(
|
|||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
#else
|
#else
|
||||||
|
GGML_UNUSED(mctx);
|
||||||
|
GGML_UNUSED(buf);
|
||||||
|
GGML_UNUSED(len);
|
||||||
|
GGML_UNUSED(params);
|
||||||
LOG_ERR("%s: video is not supported in this build (MTMD_VIDEO is set to OFF)\n", __func__);
|
LOG_ERR("%s: video is not supported in this build (MTMD_VIDEO is set to OFF)\n", __func__);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
@@ -1050,6 +1058,7 @@ void mtmd_helper_video_free(mtmd_helper_video * ctx) {
|
|||||||
ctx->stop_ffmpeg();
|
ctx->stop_ffmpeg();
|
||||||
delete ctx;
|
delete ctx;
|
||||||
#else
|
#else
|
||||||
|
GGML_UNUSED(ctx);
|
||||||
LOG_ERR("%s: video is not supported in this build (MTMD_VIDEO is set to OFF)\n", __func__);
|
LOG_ERR("%s: video is not supported in this build (MTMD_VIDEO is set to OFF)\n", __func__);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1058,6 +1067,7 @@ mtmd_helper_video_info mtmd_helper_video_get_info(const mtmd_helper_video * ctx)
|
|||||||
#ifdef MTMD_VIDEO
|
#ifdef MTMD_VIDEO
|
||||||
return ctx->info;
|
return ctx->info;
|
||||||
#else
|
#else
|
||||||
|
GGML_UNUSED(ctx);
|
||||||
GGML_ASSERT(false && "video is not supported in this build (MTMD_VIDEO is set to OFF)");
|
GGML_ASSERT(false && "video is not supported in this build (MTMD_VIDEO is set to OFF)");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1068,6 +1078,9 @@ int32_t mtmd_helper_video_read_next(mtmd_helper_video * ctx,
|
|||||||
if (!ctx) return -2;
|
if (!ctx) return -2;
|
||||||
return ctx->read_next(out_bitmap, out_text);
|
return ctx->read_next(out_bitmap, out_text);
|
||||||
#else
|
#else
|
||||||
|
GGML_UNUSED(ctx);
|
||||||
|
GGML_UNUSED(out_bitmap);
|
||||||
|
GGML_UNUSED(out_text);
|
||||||
GGML_ASSERT(false && "video is not supported in this build (MTMD_VIDEO is set to OFF)");
|
GGML_ASSERT(false && "video is not supported in this build (MTMD_VIDEO is set to OFF)");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user