From 7e056740a6feb9c1a02e1baef4e6708ce2b19627 Mon Sep 17 00:00:00 2001 From: Rohit Consul Date: Wed, 27 May 2015 16:12:43 -0700 Subject: [PATCH] video_common: Textual aligment on ReportStreamInfo API Aligned the stream info prints on UART to make them consistent and readable Signed-off-by: Rohit Consul --- .../drivers/video_common/src/xvidc.c | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c b/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c index ec672e65..e22036b9 100644 --- a/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c +++ b/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c @@ -477,16 +477,24 @@ const XVidC_VideoTiming *XVidC_GetTimingInfo(XVidC_VideoMode VmId) *******************************************************************************/ void XVidC_ReportStreamInfo(XVidC_VideoStream *Stream) { - xil_printf("\tColor Space Format:%s\r\n", - XVidC_GetColorFormatStr(Stream->ColorFormatId)); - xil_printf("\tColor Depth:%d\r\n", Stream->ColorDepth); - xil_printf("\tPixels Per Clock:%d\r\n", Stream->PixPerClk); - xil_printf("\tFrame Rate:%s\r\n", XVidC_GetFrameRateStr(Stream->VmId)); - xil_printf("\tMode:%s\r\n", - Stream->IsInterlaced ? "Interlaced" : "Progressive" ); - xil_printf("\tResolution:%s\r\n", XVidC_GetVideoModeStr(Stream->VmId)); - xil_printf("\tPixel Clock:%d\r\n", - XVidC_GetPixelClockHzByVmId(Stream->VmId)); + if (Stream->VmId < XVIDC_VM_NUM_SUPPORTED) { + xil_printf("\tColor Format: %s\r\n", + XVidC_GetColorFormatStr(Stream->ColorFormatId)); + xil_printf("\tColor Depth: %d\r\n", Stream->ColorDepth); + xil_printf("\tPixels Per Clock: %d\r\n", Stream->PixPerClk); + xil_printf("\tMode: %s\r\n", + Stream->IsInterlaced ? "Interlaced" : "Progressive"); + xil_printf("\tFrame Rate: %s\r\n", + XVidC_GetFrameRateStr(Stream->VmId)); + xil_printf("\tResolution: %s\r\n", + XVidC_GetVideoModeStr(Stream->VmId)); + xil_printf("\tPixel Clock: %d\r\n", + XVidC_GetPixelClockHzByVmId(Stream->VmId)); + } + else { + xil_printf("Video Stream ID (%d) Not Supported\r\n", + Stream->VmId); + } } /******************************************************************************/