[vlc-commits] omxil: Show crop rect info in PrintOmx
Martin Storsjö
git at videolan.org
Wed Apr 4 15:06:08 CEST 2012
vlc | branch: master | Martin Storsjö <martin at martin.st> | Wed Apr 4 15:17:56 2012 +0300| [30d5ebabf2a7406219b0c8fa12d21725e3f30c3e] | committer: Jean-Baptiste Kempf
omxil: Show crop rect info in PrintOmx
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30d5ebabf2a7406219b0c8fa12d21725e3f30c3e
---
modules/codec/omxil/utils.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/modules/codec/omxil/utils.c b/modules/codec/omxil/utils.c
index 7608167..1061fba 100644
--- a/modules/codec/omxil/utils.c
+++ b/modules/codec/omxil/utils.c
@@ -828,6 +828,7 @@ void PrintOmx(decoder_t *p_dec, OMX_HANDLETYPE omx_handle, OMX_U32 i_port)
OmxFormatParam format_param;
vlc_fourcc_t i_fourcc;
const char *psz_name;
+ OMX_CONFIG_RECTTYPE crop_rect;
if(i_port != OMX_ALL && i_port != param.nStartPortNumber + j)
continue;
@@ -864,14 +865,26 @@ void PrintOmx(decoder_t *p_dec, OMX_HANDLETYPE omx_handle, OMX_U32 i_port)
GetVlcChromaFormat( definition.format.video.eColorFormat,
&i_fourcc, &psz_name );
- msg_Dbg( p_dec, " -> video %s %ix%i@%.2f (%i,%i) (%i,%i)", psz_name,
+ OMX_INIT_STRUCTURE(crop_rect);
+ crop_rect.nPortIndex = definition.nPortIndex;
+ omx_error = OMX_GetConfig(omx_handle, OMX_IndexConfigCommonOutputCrop, &crop_rect);
+ if (omx_error != OMX_ErrorNone)
+ {
+ crop_rect.nLeft = crop_rect.nTop = 0;
+ crop_rect.nWidth = definition.format.video.nFrameWidth;
+ crop_rect.nHeight = definition.format.video.nFrameHeight;
+ }
+
+ msg_Dbg( p_dec, " -> video %s %ix%i@%.2f (%i,%i) (%i,%i) (%i,%i,%i,%i)", psz_name,
(int)definition.format.video.nFrameWidth,
(int)definition.format.video.nFrameHeight,
(float)definition.format.video.xFramerate/(float)(1<<16),
(int)definition.format.video.eCompressionFormat,
(int)definition.format.video.eColorFormat,
(int)definition.format.video.nStride,
- (int)definition.format.video.nSliceHeight);
+ (int)definition.format.video.nSliceHeight,
+ (int)crop_rect.nLeft, (int)crop_rect.nTop,
+ (int)crop_rect.nWidth, (int)crop_rect.nHeight);
break;
case OMX_PortDomainAudio:
More information about the vlc-commits
mailing list