⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dvb_moviesbtl.h

📁 DVB软件,基于CT216软件的开发源程序.
💻 H
字号:
/**************************************************************************

        (C)Copyright Cheertek Inc. 2008,
           K000, all right reserved.

        Product : STB Firmware

****************************************************************************/
#ifndef __DVB_MOVIESBTL_H
#define __DVB_MOVIESBTL_H

#include "dvb_type.h"

/************************************************************************************/
#ifdef MOVIE_SBTL_EFFECT_ENABLE
#define SBTL_EFFECT_NUM	(40)
#define SBTL_STRING_NUM	(20)
#endif // MOVIE_SBTL_EFFECT_ENABLE
/************************************************************************************/

// Movie Subtitle open return status
typedef enum
{
	EN_MOVIESBTL_STATE_INVALID_FILE,
	EN_MOVIESBTL_STATE_HANDLE_SET_FAIL,
	EN_MOVIESBTL_STATE_OPEN_FILE_FAIL,
	EN_MOVIESBTL_STATE_ALLOCBUF_FAIL,
	EN_MOVIESBTL_STATE_CALLBACK_NULL,
	EN_MOVIESBTL_STATE_SET_TASK_FAIL,
	EN_MOVIESBTL_STATE_OPEN_DONE
} EN_MOVIESBTL_STATE;

// Subtitle Encode mode
typedef enum
{
	EN_ENCODE_MODE_NONE,			// Default from file
	EN_ENCODE_MODE_8859_15_LATIN9,	// Latin-9 (ISO-8859-15)
	EN_ENCODE_MODE_8859_2_LATIN2,	// Latin-2 (ISO-8859-2)
	EN_ENCODE_MODE_1250_LATIN2,		// Latin-2 (Windows-1250)
	EN_ENCODE_MODE_1251_CYRILLIC,	// Cyrillic (Windows-1251)
	EN_ENCODE_MODE_8859_7_GREEK,	// Greek (ISO-8859-7)
	EN_ENCODE_MODE_8859_8_HEBREW,	// Hebrew (ISO-8859-8)
	EN_ENCODE_MODE_8859_9_TURKISH,	// Turkish (ISO-8859-9)
	EN_ENCODE_MODE_UNICODE,			// UNICODE (UTF-8)
	EN_ENCODE_MODE_JIS,				// Japanese (Shift_JIS) not support
	EN_ENCODE_MODE_BIG5				// Traditional Chinese (Big5) not support
} EN_MOVIESBTL_ENCODE_MODE;

/************************************************************************************/
#ifdef MOVIE_SBTL_EFFECT_ENABLE
typedef struct
{
	bool8 b8ScaleX;		// scales horizontally or not
	u16	u16XPercent;	// percentage of horizontally scale
	bool8 b8ScaleY;		// scales vertically nor not
	u16	u16YPercent;	// percentage of vertical scale		
} ST_FONT_SCALE;

typedef struct
{
	bool8 b8RotateX;		// rotate around x axis or not
	s16	s16DegreeOfXaxis;	// degree of rotating around x axis
	bool8 b8RotateY;		// rotate around y axis or not
	s16	s16DegreeOfYaxis;	// degree of rotating around y axis
	bool8 b8RotateZ;		// rotate around z axis or not
	s16 s16DegreeOfZaxis;	// degree of rotating around z axis	
} ST_FONT_ROTATE;

typedef struct
{
	u16	u16X;	// coordinate x
	u16	u16Y;	// coordinate y
} ST_SBTL_POS;

typedef struct
{
	u16	u16StartTime;	// beginning time
	u16	u16EndTime;		// ending time
}ST_TIME;

typedef struct
{
	bool8 b8SetMove;		// setting move effect or not
	ST_SBTL_POS	stStartPos;	// coordinate of start x,y
	ST_SBTL_POS	stEndPos;	// coordinate of end x,y
	ST_TIME stEffectTime;	// during time of effect
} ST_MOVE;

typedef struct
{
	bool8 b8SetClip;		// setting clip effect or not
	ST_SBTL_POS	stStartPos;	// coordinate of start x,y
	ST_SBTL_POS	stEndPos;	// coordinate of end x,y
} ST_CLIP;

typedef struct
{
	bool8 b8SetPrimary;		// setting primary color or not
	u32 u32Primary;			// primary color 
	bool8 b8SetSecondary;	// setting secondary color or not
	u32 u32Secondary;		// secondary color
	bool8 b8SetTertiary;	// setting tertiary color or not
	u32 u32Tertiary;		// tertiary color
	bool8 b8SetBack;		// setting back color or not
	u32 u32Back;			// back color
	bool8 b8SetOutline;		// setting outline color or not
	u32 u32Outline;			// outline color
	bool8 b8SetBackGround;	// setting back grounnd color or not
	u32 u32BackGround;		// back grounnd color
}ST_COLOR;

typedef struct
{
	bool8 b8SetPrimary;		// setting primary transparent or not
	u8 u8Primary;			// primary transparent
	bool8 b8SetSecondary;	// setting secondary transparent or not 
	u8 u8Secondary;			// secondary transparent
	bool8 b8SetTertiary;	// setting tertiary transparent or not
	u8 u8Tertiary;			// tertiary transparent
	bool8 b8SetBack;		// setting back transparent or not
	u8 u8Back;				// back transparent
}ST_TRANSPARENT;

typedef struct
{
	ST_COLOR stFontClr;
	//\c&H<bbggrr>&
	//<bbggrr> is a hexadecimal RGB value, but in reverse order. Leading zeroes are not required.
	//eg. The color of font color is {\c&H8700FF&}red.
	
	ST_TRANSPARENT stTransparent;
	//\a&H<xx>&
	//Transparent of Text. 
	//\1a&Haa&, \2a&Haa&, \3a&Haa&, \4a&Haa& to set specific alpha channels.
	//\alpha defaults to \1a
	
	bool8 b8SetFontSize;
	u8 u8FontSize;
	//\fs<font size>
	//A number specifying a font point size.

	ST_FONT_ROTATE stFontRotate;
	//\fr[<x/y/z>]<degrees>
	//Setting the rotation angle around the x/y/z axis. (default: \frz. )
	
	ST_FONT_SCALE stFontScale;
	//\fsc<x or y><percent>
	//Scales the font horizontally or vertically.
	
	bool8 b8SetInterval;
	u16 u16FontInterval;
	//\fsp<pixels >	
	//changes the distance between letters. (default: 0)
	
	u8 u8Border;
	//\bord<width>
	//

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -