📄 nav_task.h
字号:
/*****************************************************************************
******************************************************************************
** **
** Copyright (c) 2002 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
******************************************************************************
*****************************************************************************/
/**
* @file nav_task.h
*
* Navigation header/messages
*
* $Id: nav_task.h,v 1.61 2007/01/05 02:25:45 rbehe Exp $
*/
#ifndef _NAV_TASK_H
#define _NAV_TASK_H
#ifdef __cplusplus
extern "C" {
#endif
#include "vdvd_types.h"
#include "osapi.h"
/* Macros */
#define Q_WAIT_MAX_RETRIES 10 /* Max number of retries if Q is full */
#define Q_WAIT_PERIOD 50 /* # of msec. to wait for a Q to
* empty */
#define NAV_MSG_RDY 0x00000001
#define NAV_MSG_SIZE 16
#define DIRECTORY_RDY 0x00000002
#define ANGLE_CHANGE_TIME 100 /* wait for 1 second for next angle change
* press */
#define DISC_N 5 /* Number of discs to save data for bookmarks */
/* Macros for OSD handler related stuffs */
#define SKIP_NAV 1
#define NOT_SKIP_NAV 0
/* Loading I frame */
#define DISPLAY_IDLE 0
#define DECODE_START 1
#define DISPLAY_DONE 2
/* Support for step forward and step backwards JPM 12/17/01 */
#define STEP_FORWARD_DIRECTION 0
#define STEP_BACKWARD_DIRECTION 1
typedef enum
{
STOPPED = 1,
UNLOADED = 2,
NORMAL_PLAYING = 3,
SLOW_FORWARD = 4,
FAST_FORWARD = 5,
PAUSED = 6,
FAST_REVERSE = 7,
SLOW_REVERSE = 8,
POWER_ON_FP = 9,
DRIVE_EMPTY = 10,
FULL_STOPPED = 11,
CELL_STILL = 12
} NAV_STATE;
/*
* Navigation queue messages KEY_ : messages from button/remote input task
*/
typedef enum tagNAV_COMMAND
{
KEY_PLAY = 0, /* Start normal playback */
KEY_FF, /* Fast forward, OSD_FF_1,2,3,4 */
KEY_SLOW_F, /* Slow forward, OSD_SLOW_1,2,3,4 */
KEY_SLOW_R, /* Slow reverse, OSD_SLOW_B_1,2,3,4 */
KEY_FR, /* Fast reverse, OSD_FB_1,2,3,4 */
KEY_STOP, /* Stop, blue screen, goto title beginning */
KEY_PAUSE, /* Pause on/off */
KEY_STEP, /* Single step frame */
KEY_STEP_BACK, /* Single step back frame Added JPM 12/17/01 */
KEY_VMGM, /* Display VMGM menu listing titles */
KEY_TITLE, /* Request title number input, OSD_TITLE */
KEY_TITLE_PLAY, /* Play the title by "title number" Parameters: 1 - ULONG TitleNum From OSD */
KEY_PTT, /* Request part of title number input, OSD_PTT */
KEY_PTT_PLAY, /* Play from beginning of PTT: From OSD Parameters: 2 - ULONG TitleNum, PTT */
KEY_PTT_SEARCH, /* Play from PTT in current Title Parameters 1 - ULONG TitleNum */
KEY_TIME, /* Request time search input, OSD_TIME_SEARCH */
KEY_TIME_PLAY, /* Play from position of title Parameters: 2 - ULONG TitleNum, Time */
KEY_TIME_SEARCH, /* Jump to time in same title, From OSD Task Parameters: 1 - ULONG time */
KEY_PROGRAM, /* Request to create a program, OSD_PROGRAM */
KEY_PROGRAM_PLAY, /* Play a program list Parameter 1: ULONG pointer to program list */
KEY_SHUFFLE_PLAY, /* shuffle titles in program, OSD_SHUFFLE */
KEY_REPEAT, /* Request to repeat title or chapter */
KEY_A_B, /* Places a marker for repeat AB */
KEY_GOUP_PGC, /* Play the new PGC specified by GoUp_PGCN in PGCI */
KEY_PREV_PG_SEARCH, /* Play the previous program in the same PGC */
KEY_TOP_PG_SEARCH, /* Play from current pgm in the same PGC */
KEY_NEXT_PG_SEARCH, /* Play the next program in the same PGC */
KEY_RESUME, /* Return to TT_DOM playback from menu */
KEY_UPPER_BUTTON_SELECT, /* MENU field up */
KEY_LOWER_BUTTON_SELECT, /* MENU field down */
KEY_LEFT_BUTTON_SELECT, /* MENU field left */
KEY_RIGHT_BUTTON_SELECT, /* MENU field right */
KEY_ACTIVATE_BUTTON, /* Activate the selected MENU button This is equal to the ENTER or RETURN key */
KEY_STILL_OFF, /* Release VOBU still, cell still, or PGC still */
KEY_AUDIO_SELECT, /* Flips language choices, OSD_AUDIO_SELECT */
KEY_SUB_PICTURE_STREAM_CHANGE, /* Flips SPU streams, OSD_CAPTION_CHG */
KEY_ANGLE_CHANGE, /* Flips angles, OSD_ANGLE_CHG */
KEY_GOTO_ANGLE, /* Jump to the specified angle */
KEY_PARENTAL_LEVEL_SELECT, /* Change Parental Level: From OSD SETUP menu Parameters 1: ULONG '1','6','8', disabled */
KEY_PARENTAL_COUNTRY_SELECT, /* Change Country Code: From OSD SETUP menu Parameters 1: ULONG country code */
KEY_KARAOKE_AUDIO, /* Start Karaoke audio: From OSD SETUP menu Parameters 1: ULONG audio mixing mode */
KEY_VIDEO_PRESENTATION, /* Change Display mode: From OSD SETUP menu Parameters 1: ULONG mode */
NAV_TIMER_EXPIRED,
KEY_NEXT_TITLE, /* next title, OSD_NEXT_TITLE */
KEY_PREV_TITLE, /* previous title, OSD_PREV_TITLE */
NAV_CELL_STILL_EXPIRED,
NAV_PGC_STILL_EXPIRED,
NAV_BTN_SL_EXPIRED,
KEY_VTSM, /* display title set menu, no OSD */
KEY_NEXT_PG, /* next PTT, OSD_NEXT_PTT */
KEY_PREV_PG, /* prev PTT, OSD_PREV_PTT */
NAV_PREV_PG_EXPIRED,
KEY_SUB_PICTURE_STREAM_ON_OFF, /* Subtitle on/off */
KEY_ZOOM, /* Zoom a region, OSD_ZOOM OSD Task controls entry menu */
KEY_ZOOM_RIGHT, /* Zoom right, from OSD Task */
KEY_ZOOM_LEFT, /* Zoom left, from OSD Task */
KEY_ZOOM_UP, /* Zoom up, from OSD Task */
KEY_ZOOM_DOWN, /* Zoom down, from OSD Task */
KEY_UP, /* SKIP UP KEY(NEXT) */
KEY_DOWN, /* SKIP DOWN KEY(PREVIOUS) */
KEY_NORMAL, /* NORMAL KEY */
KEY_PGM, /* PROGRAM KEY */
KEY_RDM, /* RANDOM KEY */
KEY_CHECK, /* CHECK KEY */
KEY_CLEAR, /* CLEAR KEY */
KEY_KEYJUST, /* KEY ADJUST */
KEY_ECHOUP, /* ECHO UP */
KEY_ECHODOWN, /* ECHO DOWN */
KEY_ECHOJUST, /* ECHO ADJUST */
KEY_MICUP, /* MIC UP */
KEY_MICDOWN, /* MIC DOWN */
KEY_KARAOKE, /* KARAOKE */
KEY_ENTER, /* ENTER KEY */
KEY_RETURN, /* RETURN KEY */
KEY_GUIDE, /* GUIDE MELODY */
KEY_SCENE, /* SCENE */
KEY_CAPTION, /* CAPTION CHANGE */
KEY_CAP_ONOFF, /* CAPTION ON/OFF */
KEY_GOTO, /* GOTO Search Mode */
KEY_GOTO_BUTTON,
KEY_SETTMPPML, /* first parameter: 0 -- not change, 1 -- change */
LOADER_TRACK_BUFFER_EMPTY,
KEY_LAST_MEMO, /* LAST_MEMO KEY (Sanyo) */
KEY_CONDITION, /* CONDITION KEY (Sanyo) */
KEY_PLAY_LOCATION, /* Play location (bookmark/resume) */
KEY_ANGLE_REPLAY, /* angle replay */
KEY_VOCAL, /* Vocal Fade */
KEY_SURROUND, /* SURROUND */
KEY_LR_ST, /* L/R/ST */
KEY_ECHO_REPEAT, /* support repeat key feature */
KEY_ECHO_STOP,
KEY_NEXT_PG_REPEAT,
KEY_PREV_PG_REPEAT,
NV_PCK_READY,
DRIVE_ERROR,
NAV_HLI_EXPIRED,
NAV_UPDATE_AUDIO,
NAV_BEG_STREAM,
NAV_END_STREAM,
NAV_DEC_DONE,
NAV_TASK_EXIT
} NAV_COMMAND;
enum
{
NORMAL_PGC_END = 1,
INFINITE_VOBU_STILL,
SHUFFLE_RANDOM_STILL,
LAST_VOBU,
TOP_PGC,
NEXT_RIP_FORWARD,
CELL_STILL_CELL_CMD,
NEXT_USER_PROG_LAST_VOBU
};
enum
{
CONDITION_MODE = 0,
LAST_MEMO_MODE
};
typedef struct tagDVD_SYSTEM_PARAMS
{
UCHAR video_mode;
UCHAR audio;
UCHAR subtitle;
UCHAR dvd_menu_language;
UCHAR country;
UCHAR parental;
UCHAR video_mode2;
UCHAR background;
UCHAR digital_out;
UCHAR dolby_digital;
UCHAR mpeg;
UCHAR dts;
UCHAR downconvert96k;
UCHAR last_memo_on;
UCHAR scr_saver;
#if OSD_TYPE == OSD_2
USHORT audio_lang_code;
USHORT subtitle_lang_code;
USHORT dvd_menu_lang_code;
UCHAR subtitle_display;
#endif
} DVD_SYSTEM_PARAMS;
typedef struct _rsm_info
{
ULONG next_vts_sa;
ULONG nv_pck_lbn;
UBYTE cell_num;
UBYTE pgc_domain;
UBYTE vtsn;
UBYTE valid;
USHORT sprm1;
USHORT sprm2;
USHORT sprm4;
USHORT sprm5;
USHORT sprm6;
USHORT sprm7;
USHORT sprm8;
} rsm_info_struct;
typedef struct tagNAV_DVD_LOCATION
{
ULONG ulSize;
rsm_info_struct rsm;
ULONG angle_num;
} NAV_DVD_LOCATION;
typedef struct
{
UBYTE index;
ULONG disc_id;
UBYTE video_mode; /* TV_ASPECT_RATIO, letterbox */
UBYTE dolby_digital; /* 1 = Dolby digiral, 0 = down mix PCM */
UBYTE mpeg; /* 1 = MPEG, 0 = PCM */
UBYTE dts; /* 1 = DTS on, 0 = DTS off */
UBYTE n_spst;
UBYTE n_ast;
} CONDITION_STRUCT;
typedef struct
{
UBYTE index;
rsm_info_struct rsm_info;
CONDITION_STRUCT condition_memo;
UBYTE angle_num;
} LAST_MEMO_STRUCT;
typedef struct
{
rsm_info_struct rsm_info; /* position */
USHORT chap_n; /* chapter number */
USHORT title_n; /* title number */
UBYTE angle_num;
} BMSUB_STRUCT;
typedef struct
{
ULONG title_time; /* position of bookmark */
USHORT chap_n; /* chapter number */
LONG play_point; /* physical sector on the disk */
UBYTE pbc_flag; /* PBC mode on or off */
USHORT scene; /* Scene number in PBC on */
UBYTE pin; /* Play item number in PBC on */
UBYTE audio_stream; /* Audio stream index for SVCD */
} VCD_BMSUB_STRUCT;
typedef struct
{
ULONG identifier; /* unique identifier */
VCD_BMSUB_STRUCT bookmark[DISC_N];
} VCD_BOOKMARK_STRUCT;
/*
* globals
*/
extern OS_MSG_Q_ID queue_nav;
extern USHORT playback_mode;
extern UBYTE pg_repeat_count;
extern USHORT pgc_mode;
extern USHORT next_cell;
extern USHORT old_cell;
extern UBYTE next_pgn;
extern USHORT pgc_domain;
extern UBYTE player_state;
extern UBYTE slow_level;
extern NAV_STATE nav_state;
extern USHORT user_program[2][99][2];
extern UBYTE user_program_enable;
extern UBYTE last_program[2];
extern UBYTE current_program;
extern UBYTE user_program_start;
extern UBYTE which_program_set;
extern UBYTE parental_prohibit;
extern BOOLEAN fParental_Play;
extern USHORT last_vobu_mode;
extern UBYTE last_vobu_flag;
extern UBYTE during_search;
/*
* Function Prototypes
*/
ULONG nav_task(PVOID argv);
ULONG watchdog_timer(void);
void nav_timer_expire(ULONG time);
void reset_scr(ULONG scr_value);
ULONG get_scr(void);
void rsm_from_zoom(void);
void abort_drive_reset_channel(void);
UBYTE abort_startup(void);
void uop_prohibited_msg(ULONG msg);
void uop_audio_not_supported(ULONG msg);
USHORT check_for_repeat(void);
ULONG get_disc_id(void);
void clear_nav_state(void);
UBYTE init_nav(void);
void set_condition(void);
void restore_condition(UBYTE);
void write_program(void);
void read_program(void);
void clear_user_program(void);
void nav_cmd_timer(void);
void send_seamless_angle_change(void);
void send_nonseamless_angle_change(void);
void check_condition(void);
BOOLEAN check_last_memo(void);
void set_last_memo(void);
void transfer_dvd_program(void);
void read_last_memo (void);
void write_last_memo (void);
void read_condition(void);
void logo_display(void);
UBYTE start_drive(USHORT);
void disc_error_handle(void);
BOOLEAN check_invalid_disc(UBYTE);
void setup_video_playback(void);
UBYTE play_last_memo(UBYTE);
UBYTE normalize(void);
void set_cc_state(UBYTE);
UBYTE get_cc_state(void);
void disable_venc_cc(void);
void enable_venc_cc(void);
BOOLEAN compare_cell(USHORT, USHORT);
void set_cc_state(UBYTE);
void set_location(NAV_DVD_LOCATION *pLocation);
void play_location(NAV_DVD_LOCATION *pLocation);
void play_after_last_vobu(void);
void get_next_cell(void);
void clear_loader_queue(void);
void clear_nav_timers(void);
void clear_all_timers(void);
NAV_STATE get_nav_state(void);
#ifdef __cplusplus
}
#endif
#endif /* _NAV_TASK_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -