1 /* 2 Higher-level definitions for building DVD authoring structures 3 */ 4 /* 5 * Copyright (C) 2002 Scott Smith (trckjunky@users.sourceforge.net) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or (at 10 * your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 * MA 02110-1301 USA. 21 */ 22 23 #ifndef __DVDAUTHOR_H_ 24 #define __DVDAUTHOR_H_ 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 #include "common.h" 31 32 extern int default_video_format; /* defined in dvdcli.c */ 33 extern char provider_str[PROVIDER_SIZE]; /* defined in dvdcli.c */ 34 35 typedef enum /* type of menu/title */ 36 { /* note assigned values cannot be changed */ 37 VTYPE_VTS = 0, /* title in titleset */ 38 VTYPE_VTSM = 1, /* menu in titleset */ 39 VTYPE_VMGM = 2, /* menu in VMG */ 40 } vtypes; 41 42 #define COLOR_UNUSED 0x1000000 43 /* special value indicating unused colour-table entry, different from all 44 possible 24-bit colour values */ 45 46 /* types fully defined in da-internal.h */ 47 struct menugroup; 48 struct pgcgroup; 49 struct pgc; 50 struct source; 51 struct cell; 52 53 extern bool delete_output_dir; 54 /* whether to delete any existing output directory structure 55 before creating a new one */ 56 57 struct pgc *pgc_new(); 58 void pgc_free(struct pgc *p); 59 int pgc_add_button(struct pgc *p,const char *name,const char *cmd); 60 void pgc_add_entry(struct pgc *p, vtypes vtype,const char *entry); 61 void pgc_add_source(struct pgc *p,struct source *v); 62 void pgc_set_pre(struct pgc *p,const char *cmd); 63 void pgc_set_post(struct pgc *p,const char *cmd); 64 void pgc_set_color(struct pgc *p,int index,int color); 65 #if 0 66 void pgc_set_buttongroup(struct pgc *p,int index,unsigned char *map); 67 #endif 68 void pgc_set_stilltime(struct pgc *p,int still); 69 int pgc_set_subpic_stream(struct pgc *p,int ch,const char *m,int id); 70 71 /* used to indicate which video/audio/subpicture attribute is being set to a particular 72 keyword value, or xxx_ANY (= 0) to match whichever one I can */ 73 enum { VIDEO_ANY=0, VIDEO_MPEG, VIDEO_FORMAT, VIDEO_ASPECT, VIDEO_RESOLUTION, VIDEO_WIDESCREEN, VIDEO_FRAMERATE, VIDEO_CAPTION }; 74 enum { AUDIO_ANY=0, AUDIO_FORMAT, AUDIO_QUANT, AUDIO_DOLBY, AUDIO_LANG, AUDIO_CHANNELS, AUDIO_SAMPLERATE, AUDIO_CONTENT }; 75 enum { SPU_ANY=0, SPU_LANG, SPU_CONTENT }; 76 77 struct pgcgroup *pgcgroup_new(vtypes type); 78 void pgcgroup_free(struct pgcgroup *pg); 79 void pgcgroup_add_pgc(struct pgcgroup *ps,struct pgc *p); 80 int pgcgroup_set_video_attr(struct pgcgroup *va,int attr,const char *s); 81 int pgcgroup_set_audio_attr(struct pgcgroup *va,int attr,const char *s,int ch); 82 int pgcgroup_set_subpic_attr(struct pgcgroup *va,int attr,const char *s,int ch); 83 int pgcgroup_set_subpic_stream(struct pgcgroup *va,int ch,const char *m,int id); 84 85 struct menugroup *menugroup_new(); 86 void menugroup_free(struct menugroup *mg); 87 void menugroup_add_pgcgroup(struct menugroup *mg,const char *lang,struct pgcgroup *pg); 88 int menugroup_set_video_attr(struct menugroup *va,int attr,const char *s); 89 int menugroup_set_audio_attr(struct menugroup *va,int attr,const char *s,int ch); 90 int menugroup_set_subpic_attr(struct menugroup *va,int attr,const char *s,int ch); 91 int menugroup_set_subpic_stream(struct menugroup *va,int ch,const char *m,int id); 92 93 struct source *source_new(); 94 int source_add_cell(struct source *v,double starttime,double endtime,cell_chapter_types chap,int pause,const char *cmd); 95 void source_set_filename(struct source *v,const char *s); 96 97 void dvdauthor_enable_jumppad(); 98 void dvdauthor_enable_allgprm(); 99 void dvdauthor_vts_gen(struct menugroup *menus,struct pgcgroup *titles,const char *fbase); 100 void dvdauthor_vmgm_gen(struct pgc *fpc,struct menugroup *menus,const char *fbase); 101 102 #ifdef __cplusplus 103 } 104 #endif 105 106 107 #endif 108