File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -834,6 +834,22 @@ int mtmd_get_audio_bitrate(mtmd_context * ctx) {
834834 return 16000 ; // 16kHz
835835}
836836
837+ int mtmd_get_vision_image_size (mtmd_context * ctx) {
838+ if (!ctx->ctx_v ) {
839+ return -1 ;
840+ }
841+
842+ return clip_get_image_size (ctx->ctx_v );
843+ }
844+
845+ int mtmd_get_vision_patch_size (mtmd_context * ctx) {
846+ if (!ctx->ctx_v ) {
847+ return -1 ;
848+ }
849+
850+ return clip_get_patch_size (ctx->ctx_v );
851+ }
852+
837853//
838854// public API functions
839855//
Original file line number Diff line number Diff line change @@ -112,6 +112,14 @@ MTMD_API bool mtmd_support_audio(mtmd_context * ctx);
112112// return -1 if audio is not supported
113113MTMD_API int mtmd_get_audio_bitrate (mtmd_context * ctx);
114114
115+ // get vision image size in pixels, for example 1024
116+ // return -1 if vision is not supported
117+ MTMD_API int mtmd_get_vision_image_size (mtmd_context * ctx);
118+
119+ // get vision patch size, for example 14
120+ // return -1 if vision is not supported
121+ MTMD_API int mtmd_get_vision_patch_size (mtmd_context * ctx);
122+
115123// mtmd_bitmap
116124//
117125// if bitmap is image:
You can’t perform that action at this time.
0 commit comments