1 /*****************************************************************************
2 * summary.c: set of functions to print options of selected title
4 *****************************************************************************
5 * Copyright (C) 1998-2001 VideoLAN
6 * $Id: summary.c,v 1.1 2002/08/04 17:23:41 sam Exp $
8 * Author: Stéphane Borel <stef@via.ecp.fr>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
25 /*****************************************************************************
27 *****************************************************************************/
38 # include <netinet/in.h>
42 #include <sys/types.h>
45 #ifdef STRNCASECMP_IN_STRINGS_H
53 # include <dvdcss/dvdcss.h>
61 * Local tools to decode some data in ifo
64 /****************************************************************************
66 ****************************************************************************/
67 void IfoPrintTitle( thread_dvd_data_t * p_dvd )
69 //X intf_WarnMsg( 5, "dvd info: title %d, %d chapter%s, %d angle%s",
70 //X p_dvd->i_title, p_dvd->i_chapter_nb,
71 //X (p_dvd->i_chapter_nb == 1) ? "" : "s",
72 //X p_dvd->i_angle_nb,
73 //X (p_dvd->i_angle_nb == 1) ? "" : "s" );
76 /****************************************************************************
78 ****************************************************************************/
79 #define video p_dvd->p_ifo->vts.manager_inf.video_attr
80 void IfoPrintVideo( thread_dvd_data_t * p_dvd )
82 //X char* psz_perm_displ[4] =
84 //X "pan-scan & letterboxed",
89 //X char* psz_source_res[4] =
91 //X "720x480 ntsc or 720x576 pal",
92 //X "704x480 ntsc or 704x576 pal",
93 //X "352x480 ntsc or 352x576 pal",
94 //X "352x240 ntsc or 352x288 pal"
97 //X intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s",
98 //X video.i_compression + 1,
99 //X video.i_system ? "pal 625 @50" : "ntsc 525 @60",
100 //X video.i_ratio ? (video.i_ratio == 3) ? "16:9"
104 //X intf_WarnMsg( 5, "dvd info: display mode %s, %s, %s",
105 //X psz_perm_displ[video.i_perm_displ],
106 //X video.i_line21_1 ? "line21-1 data in GOP"
107 //X : "no line21-1 data",
108 //X video.i_line21_2 ? "line21-2 data in GOP"
109 //X : "no line21-2 data" );
111 //X intf_WarnMsg( 5, "dvd info: source is %s, %sletterboxed, %s mode",
112 //X psz_source_res[video.i_source_res],
113 //X video.i_letterboxed ? "" : "not ",
114 //X video.i_mode ? "film (625/50 only)" : "camera" );
118 /****************************************************************************
120 ****************************************************************************/
121 #define audio p_dvd->p_ifo->vts.manager_inf.p_audio_attr[i-1]
122 #define audio_status \
123 p_dvd->p_ifo->vts.title_unit.p_title[p_dvd->i_title_id-1].title.pi_audio_status[i-1]
124 void IfoPrintAudio( thread_dvd_data_t * p_dvd, int i )
126 if( audio_status.i_available )
128 //X char* ppsz_mode[8] =
129 //X { "A52", "unknown", "MPEG", "MPEG-2", "LPCM", "SDDS", "DTS", "" };
130 //X char* ppsz_appl_mode[4] =
131 //X { "no application specified", "karaoke", "surround sound", "" };
132 //X char* ppsz_quant[4] =
133 //X { "16 bits", "20 bits", "24 bits", "drc" };
135 //X intf_WarnMsg( 5, "dvd info: audio %d (%s) is %s, "
136 //X "%d%s channel%s, %dHz, %s", i,
137 //X DecodeLanguage( audio.i_lang_code ),
138 //X ppsz_mode[audio.i_coding_mode & 0x7],
139 //X audio.i_num_channels + 1,
140 //X audio.i_multichannel_extension ? " ext." : "",
141 //X audio.i_num_channels ? "s" : "",
142 //X audio.i_sample_freq ? 96000 : 48000,
143 //X ppsz_appl_mode[audio.i_appl_mode & 0x3] );
145 //X intf_WarnMsg( 5, "dvd info: %s, quantization %s, status %x",
146 //X (audio.i_caption == 1) ? "normal caption"
147 //X : (audio.i_caption == 3) ? "directors comments"
148 //X : "unknown caption",
149 //X ppsz_quant[audio.i_quantization & 0x3],
150 //X audio_status.i_position );
156 /****************************************************************************
158 ****************************************************************************/
159 #define spu p_dvd->p_ifo->vts.manager_inf.p_spu_attr[i-1]
161 p_dvd->p_ifo->vts.title_unit.p_title[p_dvd->i_title_id-1].title.pi_spu_status[i-1]
163 void IfoPrintSpu( thread_dvd_data_t * p_dvd, int i )
165 if( spu_status.i_available )
167 //X intf_WarnMsg( 5, "dvd info: spu %d (%s), caption %d "
168 //X "prefix %x, modes [%s%s%s%s ]", i,
169 //X DecodeLanguage( spu.i_lang_code ),
170 //X spu.i_caption, spu.i_prefix,
171 //X spu_status.i_position_43 ? " 4:3" : "",
172 //X spu_status.i_position_wide ? " wide" : "",
173 //X spu_status.i_position_letter ? " letter" : "",
174 //X spu_status.i_position_pan ? " pan" : "" );