PGC.H
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:7k
- /****************************************************************************************
- * Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: PGC.H $
- *
- * Description:
- * ============
- *
- *
- * Log:
- * ====
- * $Revision: 5 $
- * Last Modified by $Author: Angieh $ at $Modtime: 04-03-31 20:18 $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_DVD/Header/PGC.H $
- *
- * 5 04-03-31 20:26 Angieh
- * Add support for index and page search.
- *
- * 4 12/30/03 11:29a Leonh
- * Angieh:Change for DVD AUDIO navigator header.
- *
- * 8 11/12/03 12:50p Leonh
- * clean up the code
- *
- * 7 11/11/03 11:36a Leonh
- * Angieh:Add DVD Audio compile switch.
- *
- * 6 10/20/03 11:46a Leslie
- * check the variable type and change the dvda rtpb schedule way as the
- * same with DVD Video
- *
- * 5 10/14/03 11:20a Leslie
- * add the prototype
- *
- * 4 8/20/03 2:56p Leonh
- * Merge dvd audio code with the latest nav_dvd code with reference
- * 2 03-05-13 16:46 Leonh
- * merge pgc_construct()
- *
- * 1 03-04-28 11:15 Fwang
- * Initial for DVDA
- *
- * 2 23/04/02 9:34 Nirm
- * - Added dependency in "Config.h".
- *
- * 1 2/17/02 12:12 Rinata
- *
- * 1 2/17/02 11:38 Rinata
- *
- * 2 9/01/02 16:40 Nirm
- * Corrected Include-Paths.
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifndef __PGC_H
- #define __PGC_H
- #include "PlaycoreNav_DVDHeaderaction.h"
- #include "PlaycoreNav_DVDHeaderdvda_ats.h"
- //## Class: C_PGC
- // Implements the DVD Program Chain play-back control (DVD
- // 4.3).
- //
- // Implements a simple state machine which decodes the PGC
- // information into a sequence of action items for the
- // caller. It handles:
- // - stream selection
- // - random/shuffle/loop play-back
- // - program selection
- // - cell selection (including angle block processing based
- // on SPRM(3))
- // - command selection
- // - execution of intra-PGC commands (GoTo group, LinkCN,
- // etc)
- // Action items are one of the:
- // - select stream
- // - execute command
- // - play cell
- // - pause
- // - terminate
- //
- // It also provides direct access to PGC info through the
- // public member classes.
- //## Category: DVD Manager::DVD Control; Global
- //## Subsystem: CCE_NAV
- //## Persistence: Transient
- //## Cardinality/Multiplicity: n
- void pgc_construct( S_FPOS *address, int PGCNumber,PgcTypes type );
- void pgc_delete( void );
- // Initiates the play-back process, starting from the
- // specified program (default is the entry program) and
- // optional conditions, like PRE-command skip, etc.
- BOOL pgc_Start(int PGN, int mode, DWORD VOBU);
- // Retrieves the next action to be performed or 0 if the
- // end of the PGC was reached.
- BOOL pgc_Get_Next_Action(S_Action *action);
- BOOL pgc_Is_NEXTPG_Available( void ); // Returns TRUE if can goto NEXTPG FALSE otherwise
- BOOL pgc_Is_PREVPG_Available( void ); // Returns TRUE if can goto PREVPG FALSE otherwise
- // Attempts to execute the specified Navigation Command.
- // Returns TRUE if the command was completed locally
- // (in which case action will be set to "nop")
- // or if it's deferred for the caller and FALSE if the
- // command is invalid.
- // Example of commands handled localy: GoTo group, LinkCN.
- BOOL pgc_Execute_Action( S_Action *action );
- BOOL pgc_Final_Still( void );
-
- void pgc_SetScanSpeed( int speed );
- int pgc_Angle_Change( void );
- int pgc_Select_Audio( int actual_strnbr, int ini_lcd, int ini_lcd_ext );
- int pgc_Select_SubPicture( int actual_strnbr, int ini_lcd, int ini_lcd_ext );
- void pgc_Select_Audio1( void );
- void pgc_Select_SubPicture1( void );
- BOOL pgc_AudioAttributes( int astn, AUDIO_ATTRIBUTES *spec_code );
- BOOL pgc_SubpictureLanguage( int spn, DWORD *spec_code, BYTE *sp_type );
- // get elapsed time since the start of PGC;
- void pgc_ElapsedTime( DWORD, DWORD, DWORD, DVD_BOOKMARK* );
- // FVOBU_SA for specified cell
- DWORD pgc_CellEntryVOBU( int cell );
- // reset time notification data
- // (re)set PG playback order
- void pgc_Playback_Order( void );
- int pgc_Is_GOUP_Available( void );
- BOOL pgc_Execute_GoTo( void );
- BOOL pgc_Execute_LinkPGN ( int );
- BOOL pgc_Execute_LinkCN( int );
- BOOL pgc_Execute_LinkSIns( CmdOpt );
- BOOL pgc_Execute_ExternalLink( CmdOpt, int );
- int pgc_Cell_Select( void );
- BOOL pgc_Seamless_Connectivity( void ); // see 3.3.12.3
- #ifdef NO_SCPAD
- #define pgc_Get_UOP_CTL() ((DWORD)pgc_gi_Get_UOP_CTL( (&gns.dvd.pgc.info_st) ))
- #define pgc_Get_SP_Palette( pal ) { pgc_gi_Get_SP_Palette( &gns.dvd.pgc.info_st, pal ); }
- #else
- #define pgc_Get_UOP_CTL() ((DWORD)pgc_gi_Get_UOP_CTL())
- #define pgc_Get_SP_Palette( pal ) { pgc_gi_Get_SP_Palette( pal ); }
- #endif
- #define pgc_TimeNotifyReset() { gns.dvd.pgc.decoded_c_pbi.LVOBU_EA = gns.dvd.pgc.decoded_c_pbi.FVOBU_SA = 0; gns.dvd.pgc.e_time = 0; gns.dvd.pgc.e_program_index = -1; }
- #define pgc_Stop(){ gns.dvd.pgc.next_state = stop; }
- #define pgc_clear_cell_time() {gns.dvd.pgc.e_time = 0; gns.dvd.pgc.e_cell_time = 0;}
- #ifdef NO_SCPAD
- // functions for DVD audio
- /* ATS_PGI members fetching routines */
- BOOL pgc_pgmap_Get_FAC_S_PTM(S_STORAGE *st, int program,DWORD *fac_s_ptm);
- BOOL pgc_pgmap_Get_ATS_PG_PB_TM(S_STORAGE *st, int program,DWORD *ats_pg_pb_tm,unsigned int *ats_pg_pa_tm);
- #ifdef DVD_AUDIO_SUPPORT
- /* ATS_ASV_PBI members fetching routines */
- BOOL pgc_GetAsvSRP(S_STORAGE *st, int program,ATS_PG_ASV_PBI_SRP *asv_pbi_srp);
- BOOL pgc_GetAsvDLIST(S_STORAGE *st,int start_offset,int dlist_num,ATS_PG_ASV_DLIST *asv_pbi_dlist);
- #endif
- #else
- // functions for DVD audio
- /* ATS_PGI members fetching routines */
- BOOL pgc_pgmap_Get_FAC_S_PTM(S_SC_STORAGE *st, int program,DWORD *fac_s_ptm);
- BOOL pgc_pgmap_Get_ATS_PG_PB_TM(S_SC_STORAGE *st, int program,DWORD *ats_pg_pb_tm,DWORD *ats_pg_pa_tm);
- #ifdef DVD_AUDIO_SUPPORT
- /* ATS_ASV_PBI members fetching routines */
- BOOL pgc_GetAsvSRP(S_SC_STORAGE *st, int program,ATS_PG_ASV_PBI_SRP *asv_pbi_srp);
- BOOL pgc_GetAsvDLIST(S_SC_STORAGE *st,int start_offset,int dlist_num,ATS_PG_ASV_DLIST *asv_pbi_dlist);
- #ifdef DVD_AUDIO_INDEX
- WORD pgc_pg_Get_Index_num(WORD lastCell);
- #endif
- #ifdef DVD_AUDIO_TIME_SEARCH_IN_TRACK
- DWORD pgc_pgmap_Get_PG_TM(void);
- #endif
- #endif
- BOOL pgc_Is_TimeUnit_Valid(int PGCN );
- #endif
- #endif