diff options
Diffstat (limited to '')
-rw-r--r-- | mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_video_decode.cpp | 21 | ||||
-rw-r--r-- | mediaplugin/src/mediaplugins/include/core/plugin_core.h | 10 |
2 files changed, 15 insertions, 16 deletions
diff --git a/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_video_decode.cpp b/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_video_decode.cpp index b3fc77b3..8107c1b2 100644 --- a/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_video_decode.cpp +++ b/mediaplugin/src/mediaplugins/ffmpeg/ffmpeg_video_decode.cpp @@ -625,16 +625,13 @@ static double PLUGIN_CALL ffmpegVideoDecoder_getPosition(videoDecodeStream_t *st return VideoDecodeStreamObj(stream)->getPosition(); } -static int PLUGIN_CALL ffmpegVideoDecoder_getFrameWidth(videoDecodeStream_t *stream) { - return VideoDecodeStreamObj(stream)->getFrameWidth(); -} - -static int PLUGIN_CALL ffmpegVideoDecoder_getFrameHeight(videoDecodeStream_t *stream) { - return VideoDecodeStreamObj(stream)->getFrameHeight(); -} - -static double PLUGIN_CALL ffmpegVideoDecoder_getFrameAspect(videoDecodeStream_t *stream) { - return VideoDecodeStreamObj(stream)->getFrameAspect(); +static void PLUGIN_CALL ffmpegVideoDecoder_getFrameInfo(videoDecodeStream_t *stream, + videoFrameInfo_t *info) +{ + FFmpegVideoDecodeStream* s = VideoDecodeStreamObj(stream); + info->width = s->getFrameWidth(); + info->height = s->getFrameHeight(); + info->aspect = s->getFrameAspect(); } static uint8_t* PLUGIN_CALL ffmpegVideoDecoder_getFrame(videoDecodeStream_t *stream, long double time) { @@ -655,8 +652,6 @@ const videoDecoderInfo_t videoDecoderInfo = { ffmpegVideoDecoder_getLoop, ffmpegVideoDecoder_setPosition, ffmpegVideoDecoder_getPosition, - ffmpegVideoDecoder_getFrameWidth, - ffmpegVideoDecoder_getFrameHeight, - ffmpegVideoDecoder_getFrameAspect, + ffmpegVideoDecoder_getFrameInfo, ffmpegVideoDecoder_getFrame }; diff --git a/mediaplugin/src/mediaplugins/include/core/plugin_core.h b/mediaplugin/src/mediaplugins/include/core/plugin_core.h index a4839909..acbe0f4a 100644 --- a/mediaplugin/src/mediaplugins/include/core/plugin_core.h +++ b/mediaplugin/src/mediaplugins/include/core/plugin_core.h @@ -203,6 +203,12 @@ typedef struct audioConverterInfo_t { double PLUGIN_CALL (*getRatio)(audioConvertStream_t *stream); } audioConverterInfo_t; +typedef struct videoFrameInfo_t { + int width; + int height; + double aspect; +} videoFrameInfo_t; + typedef struct videoDecoderInfo_t { int priority; BOOL PLUGIN_CALL (*init)(); @@ -213,9 +219,7 @@ typedef struct videoDecoderInfo_t { BOOL PLUGIN_CALL (*getLoop)(videoDecodeStream_t *stream); void PLUGIN_CALL (*setPosition)(videoDecodeStream_t *stream, double time); double PLUGIN_CALL (*getPosition)(videoDecodeStream_t *stream); - int PLUGIN_CALL (*getFrameWidth)(videoDecodeStream_t *stream); - int PLUGIN_CALL (*getFrameHeight)(videoDecodeStream_t *stream); - double PLUGIN_CALL (*getFrameAspect)(videoDecodeStream_t *stream); + void PLUGIN_CALL (*getFrameInfo)(videoDecodeStream_t *stream, videoFrameInfo_t *info); uint8_t* PLUGIN_CALL (*getFrame)(videoDecodeStream_t *stream, long double time); } videoDecoderInfo_t; |