MHEG5
15.3.0
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2012 Ocean Blue Software Ltd 00004 * 00005 * This file is part of a DTVKit Software Component 00006 * You are permitted to copy, modify or distribute this file subject to the terms 00007 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00008 * 00009 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00010 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00011 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00012 * 00013 * If you or your organisation is not a member of DTVKit then you have access 00014 * to this source code outside of the terms of the licence agreement 00015 * and you are expected to delete this and any associated files immediately. 00016 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00017 *******************************************************************************/ 00039 #ifndef _DVB_VIDEO_H 00040 #define _DVB_VIDEO_H 00041 00042 #include "techtype.h" 00043 #include "dvblocator.h" 00044 #include "osdtype.h" 00045 #include "vtctype.h" 00046 #include "mherrors.h" 00047 00048 /*---Constant and macro definitions for public use-----------------------------*/ 00049 00050 /*---Enumerations for public use-----------------------------------------------*/ 00051 00052 /* Video freeze options */ 00053 typedef enum 00054 { 00055 /* Freeze video display, continuously displaying the current or a subsequent 00056 * video frame. 00057 */ 00058 VIDEO_FREEZE, 00059 00060 /* Unfreeze video display - resume normal video decoding and display */ 00061 VIDEO_UNFREEZE 00062 } E_VideoState; 00063 00064 /* Widescreen alignment (where 16:9 video is played within 4:3 scene) */ 00065 typedef enum 00066 { 00067 MHEG5_ALIGNMENT_NONE, 00068 MHEG5_ALIGNMENT_CENTRE_CUT_OUT, 00069 MHEG5_ALIGNMENT_LETTERBOX 00070 } E_VideoAlignment; 00071 00072 /* Subtitle hide / show options */ 00073 typedef enum 00074 { 00075 /* Hide subtitles */ 00076 MHEG5_DVB_SUBTITLE_HIDE, 00077 00078 /* Show subtitles */ 00079 MHEG5_DVB_SUBTITLE_SHOW 00080 } E_DvbSubtitleShowState; 00081 00082 00083 /* Subtitle freeze / unfreeze enumeration */ 00084 typedef enum 00085 { 00086 /* Freeze subtitles */ 00087 MHEG5_DVB_SUBTITLE_FREEZE, 00088 00089 /* Unfreeze subtitles */ 00090 MHEG5_DVB_SUBTITLE_UNFREEZE 00091 } E_DvbSubtitleFreezeState; 00092 00093 00094 /* Video encoding used in iframe/video */ 00095 typedef enum 00096 { 00097 VIDEO_ENC_MPEG2, /* see reference [1] - section 14.8.1 under "MPEG stills" */ 00098 00099 VIDEO_ENC_H_264 /* see reference [1] - section 14.14.1 under "H.264/AVC stills" */ 00100 } E_VideoEncoding; 00101 00102 /*---Global type defs for public use-------------------------------------------*/ 00103 00104 /*---Global Function prototypes for public use---------------------------------*/ 00105 00112 E_MhegErr DVB_MhegVideoPlayDefault(void); 00113 00114 00127 E_MhegErr DVB_MhegVideoPlayStream(S_DvbComponent *pDvbComponent); 00128 00129 00135 E_MhegErr DVB_MhegVideoStopStream(void); 00136 00137 00157 E_MhegErr DVB_MhegVideoPlayIFrame( U8BIT *pVideoData, 00158 U32BIT dataLength, 00159 E_VideoEncoding encoding ); 00160 00167 E_MhegErr DVB_MhegVideoStopIFrame(void); 00168 00169 00180 E_MhegErr DVB_MhegVideoSetUpdating(E_VideoState displayState); 00181 00182 00195 E_MhegErr DVB_MhegSubtitleSetVisibility(E_DvbSubtitleShowState showState); 00196 00205 BOOLEAN DVB_MhegGetSubtitlePref(void); 00206 00215 U8BIT DVB_MhegPrefSubtitleLangs(U32BIT *langs,U8BIT max); 00216 00217 00218 #ifdef INCLUDE_FREESAT 00219 00245 E_MhegErr DVB_MhegDecodeImagePlaneIFrame( U8BIT *pVideoData, 00246 U32BIT dataLength, 00247 E_VideoEncoding encoding ); 00248 00249 00261 E_MhegErr DVB_MhegImagePlaneIFrameStop(void); 00262 00263 #endif /*INCLUDE_FREESAT*/ 00264 00265 /*!************************************************************************** 00266 * @brief Set Mheg scaling resolution for video 00267 * @param width - width resolution 00268 * @param height - height resolution 00269 * @return None 00270 ****************************************************************************/ 00271 void DVB_MhegSetScalingResolution(U16BIT width, U16BIT height); 00272 00273 /*!************************************************************************** 00274 * @brief Set Mheg video scaling 00275 * @param scaling - scaling transformation (offset, size) 00276 * @return None 00277 ****************************************************************************/ 00278 void DVB_MhegSetVideoScaling(S_RECTANGLE *scaling); 00279 00280 /*!************************************************************************** 00281 * @brief Set display aspect ratio 00282 * @param aspect - display aspect ratio 00283 * @return None 00284 ****************************************************************************/ 00285 void DVB_MhegSetAspectRatio(E_ASPECT_RATIO aspect); 00286 00287 /*!************************************************************************** 00288 * @brief Get display aspect ratio 00289 * @return display aspect ratio 00290 ****************************************************************************/ 00291 E_ASPECT_RATIO DVB_MhegGetDisplayAspectRatio(void); 00292 00293 E_FORMAT_CONVERSION DVB_MhegGetDecoderFormatConversion(void); 00294 00295 void DVB_MhegSetVideoAlignment(E_VIDEO_ASPECT_MODE mode); 00296 00297 #endif /* _DVB_VIDEO_H */ 00298