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

📄 mosaic.h

📁 c语言编的
💻 H
📖 第 1 页 / 共 2 页
字号:
/* 
 * File: mosaic.h
 * Contains:
 *      the header file of mosaic application
 *
 * Author:
 *      stone
 *
 * CVS control words:
 *
 * $Id: mosaic.h,v 1.3 2005/12/20 09:03:00 hwxiao Exp $ 
 *
 * Last checked in:
 * $Date: 2005/12/20 09:03:00 $ 
 *
 * History:
 *      $Log: mosaic.h,v $
 *      Revision 1.3  2005/12/20 09:03:00  hwxiao
 *      no message
 *
 *      Revision 1.2  2005/11/14 03:38:12  wjbai
 *      update after reduce the code
 *
 *      Revision 1.1.1.1  2005/06/28 08:52:23  wjbai
 *      no message
 *
 *      Revision 1.24  2005/03/29 05:13:04  syan
 *      no message
 *
 *      Revision 1.23  2005/03/23 06:46:51  syan
 *      no message
 *
 *      Revision 1.22  2004/12/29 05:53:26  syan
 *      modify a bug of exit the mosaic app.
 *
 *      Revision 1.21  2004/11/10 08:20:00  syan
 *      modify mo app of a cell.
 *
 *      Revision 1.20  2004/11/05 01:19:50  syan
 *      modify lock cell.entry background.
 *
 *      Revision 1.19  2004/11/03 06:02:19  syan
 *      modify some mem_deallocate. add the pic of different language.
 *
 *      Revision 1.18  2004/10/26 13:22:25  syan
 *      modify about when background pis is NULL, delete audio,vol rect,
 *      get PMT...
 *
 *      Revision 1.17  2004/10/20 05:29:53  syan
 *      void parameter of the mosaic_palette_create();
 *
 *      Revision 1.16  2004/10/20 05:12:06  syan
 *      modify a new palette.
 *
 *      Revision 1.15  2004/07/09 11:16:05  syan
 *      modify the cell navigation , geo mask.
 *
 *      Revision 1.14  2004/07/01 08:52:26  syan
 *      CA mask and modify some color.
 *
 *      Revision 1.13  2004/06/21 02:26:21  syan
 *      support multilingual in page area display.
 *
 *      Revision 1.12  2004/06/18 05:31:47  syan
 *      support multilingual info area display in a page.
 *
 *      Revision 1.11  2004/06/16 11:40:09  syan
 *      modify multilingual text display in mask and page.
 *
 *      Revision 1.10  2004/06/16 05:52:54  syan
 *      modify multilingual text display in page.
 *
 *      Revision 1.9  2004/06/03 01:41:07  syan
 *      modify some data structure and VK in MOSAIC.
 *
 *      Revision 1.8  2004/05/25 01:00:34  syan
 *      modify page display function to display the test page correctly.
 *
 *      Revision 1.7  2004/05/11 08:17:23  syan
 *      add mask and color_index from the stream.
 *
 *      Revision 1.6  2004/04/27 09:41:35  syan
 *      no message
 *
 *      Revision 1.5  2004/04/16 09:17:39  syan
 *      SDT info and supporting multi-net had been modified.
 *
 *      Revision 1.4  2004/03/29 09:47:36  syan
 *      no message
 *
 *      Revision 1.3  2004/03/12 05:33:14  syan
 *      provide other application linking
 *
 *      Revision 1.2  2004/02/04 08:54:01  dsqu
 *      no message
 *
 *      Revision 1.1  2004/01/07 12:46:51  dsqu
 *      Initial creation
 *
 *      Revision 1.1.1.1  2003/12/8 08:57:01  stone
 *      no message
 *
 *
 */
 
#ifndef _STB_MOSAIC_H_
#define _STB_MOSAIC_H_


/*
 * mosaic structure tag define by author
 */
#define Private_table_locator_STR               0x00
#define Local_file_locator_STR                  0x01
#define Mask_STR                                0x03
#define Background_picture_STR                  0x04
#define Font_attributes_STR                     0x05
#define Text_frame_STR                          0x06
#define Multilingual_text_STR                   0x07
#define Multilingual_texts_list_STR             0x08
#define Stream_locator_STR                      0x09
#define Action_STR                              0x0A   
 
 
/*
 * mosaic layer descriptor tag define by C+T
 */
#define Mosaic_DES                          0xC0

#define CA_offers_mask_DES                  0xC6    /* long */
#define Geographical_offers_mask_DES        0xC7    /* long */
#define Morality_offers_mask_DES            0xC8    /* long */
#define Locked_offers_mask_DES              0xC4    /* long */
#define Welcome_page_DES                    0xC3    /* long */

#define Focus_DES                           0xCA

#define Multilingual_default_font_attributes_DES  0xD3 /* maybe present to page layer */
#define Persisant_save_DES                  0xC5
/*
 * page layer descriptor tag
 */
#define Multilingual_texts_list_DES         0xC9    /* long.maybe present to mosaic and cell layer */ 

#define Video_stream_locator_DES            0xCD
#define Multilingual_background_picture_DES     0xD6  /* maybe present to mosaic layer */
#define Multilingual_display_area_DES       0xCB

#define Multilingual_audio_stream_locator_DES   0xCC  /* maybe present to mosaic and cell layer */

#define Linked_mosaic_page_DES              0xD5
#define Multilingual_default_text_frame_DES     0xD4  /* maybe present to mosaic and layer */

/*
 * cell layer descriptor tag
 */
#define Cell_DES                            0xC2
#define Cell_Navigation_links_DES           0xCE
#define Eit_filter_DES                      0xCF
#define Actions_DES                         0xD1     
#define Authorized_offers_DES               0xD2 

#define Concealed_geo_zones_DES             0xD0  
#define Country_availability_DES            0x49
#define Parental_rating_DES                 0x55

/*
 *DVB descriptor tag
 */
#define service_list_DES                    0x41

#define SHORT_EVENT_DESC                    0x4d

#define SERVICE_DES                         0x48
#define MULTILINGUAL_SERVICE_NAME_DES       0x5d

/* the same as dtvEit */
#define MS_MAX_EVENT_NAME_LENGTH           50

/* the mosaic color index num */
#define MOSAIC_PALETTE_INDEX	33

#define MAX_MASK_NUM            4

/*the region 8bpp y position is 4*/
#define ADJUST_POSITIONY        4

#define MASK_ADJUST             1

/*the max num of the operator*/
#define MS_MAX_OPERATOR         10

#define	VOL_MOSAIC_RECT_X				(/*VOL_ICO_X*/440 - 2 - 5)
#define	VOL_MOSAIC_RECT_Y				(/*VOL_ICO_Y*/45 - 2 + 47)
#define	VOL_MOSAIC_RECT_W				(222+2*2)/*VOL_ICO_W+DISTANCE_BETWEEN_ICO+VOL_BAR_ICO_W*/
#define	VOL_MOSAIC_RECT_H				(24+2)/*ICON HEIGHT*/

typedef struct tag_page_t page_node_t;
typedef struct tag_nav_link_data_t nav_link_data_t;
typedef struct tag_cell_t cell_node_t;
typedef struct tag_default_font default_font_attribute_t;
typedef struct tag_multilingual_text_t multilingual_text_t;
typedef struct tag_multilingual_texts_list_t multilingual_texts_list_t;
typedef struct tag_info_dis_area_data_t info_dis_area_data_t;
typedef struct tag_ms_offers_t ms_offers_t;
typedef struct tag_multilingual_picture_t picture_t;

typedef struct tag_geo_zones_t geo_zones_t;

/*typedef struct tag_conceal_zone_num conceal_zone_num;
typedef struct tag_authorize_zone_num authorize_zone_num;*/

typedef struct tag_country_code_t country_code_t;

/*
 *the common data structure
 */
typedef struct
{
	uint8_t remote_flag;
    uint16_t on_id;
    uint16_t ts_id;
    uint16_t service_id;
    uint8_t picture_table_id;
    int16_t picture_id;
}private_locator_t;

typedef struct
{
    char *filename;	
}local_locator_t;

typedef struct
{
  	uint16_t x,y,w,h;
    uint8_t h_alignment,v_alignment;
    uint8_t background_color,foreground_color;
}text_frame_t;
   
typedef struct
{     
  	uint8_t mask_name;
    uint8_t bottom_margin, top_margin, left_margin, right_margin;
	uint8_t corner_type, mask_color_index;
	
	multilingual_text_t *multi_mask_text_list;
	
	text_frame_t text_frame;
}mask_data_t; 
 
typedef struct
{
    uint8_t remote_flag;/*0 is same service, 1 is an other ts, 2 is same ts an other service*/
    uint16_t on_id;
    uint16_t ts_id;
    uint16_t service_id;
    uint8_t component_tag;	
}stream_locator_t;

typedef struct
{
    uint16_t	link_on_id;
    uint16_t    link_ts_id;
    uint16_t    link_service_id; 
}service_link_t, eit_filter_t;
  
typedef struct
{
  	uint32_t link_org_id;
  	uint16_t link_app_id;
}app_link_t;  
  
typedef struct
{
  	uint8_t action_type;
	union
	{
		service_link_t service_data;
		app_link_t app_data;
	}possible_cell_link;
}action_data_t;
  
/* the font_attribute_t,maybe not usded*/  
typedef struct
{
  	uint8_t *font_name;
  	uint8_t font_size;
  	uint8_t font_style;
}font_attribute_t;
  
struct tag_multilingual_text_t 
{
    uint8_t iso_639_language[3]; /*this code is 24 bits*/
    char *text_content;
    uint8_t default_mask; /*the lowest bit is font, prev is the text_frame*/
    text_frame_t text_frame;
    font_attribute_t font_data;
       
    multilingual_text_t *next;
};

struct tag_multilingual_texts_list_t
{
	uint8_t text_num;
	multilingual_text_t *texts_list;
	
	multilingual_texts_list_t *next;
};

/*
 *the structure of mosaic layer data
 */
 
/*default_font_attribute_t,maybe not usded*/ 
struct tag_default_font
{
    long iso_639_code;
    font_attribute_t font;
    default_font_attribute_t *prev,*next;
};
    
typedef struct
{
    uint8_t focus_type, corner_type;
    uint8_t focus_thickness, focus_color_index;
}focus_data_t;
  
typedef struct
{
  	uint8_t  mosaic_id;
	uint16_t  x, y, w, h;
    uint8_t  total_page_number; 
    uint8_t  default_page_id, default_cell_id;
    uint16_t  validate_key_code;
    uint8_t  mosaic_flag; 
    uint8_t  delay_before_cut;
    mask_data_t   mask_data[MAX_MASK_NUM]; /*'0' is CA; '1' is Geographical; '2' is Morality; '3' is Locked*/

⌨️ 快捷键说明

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