Commit 55ce4df1 authored by Stéphane Borel's avatar Stéphane Borel

*Removed an occurance of former angle item in gtk.

*Fixed a bug in ES management introduced lately in DVD/DvdRead.

*Beginning of reorganisation in DVD plugin source files, in order to try to
make it easier to understand. There is some work left though :p.

*Decreased the score for VCD plugin, as the VCD demuxer was used even
for DVD :p. It should make autodetection work.
Some comment:
-I think that VCDInit should make a test on the access plugin and be launched
only if the access plugin is VCD,
-VCDOpen shouldn't set p_input->b_error: if it fails we just try another
module,
-PSRead doesn't need to be duplicated anymore: input_ReadPS is now available
for plugins (cf Christophe's commit).

Please comment around that: I'd like to know if the behaviour I've described
is the one everyone expects.

Enjoy my new bugs :p
parent 0a3aa895
...@@ -33,7 +33,7 @@ recognizes several URL-style items: ...@@ -33,7 +33,7 @@ recognizes several URL-style items:
.B *.mpg, *.vob .B *.mpg, *.vob
Plain MPEG-1/2 files Plain MPEG-1/2 files
.TP .TP
.B dvd:<device>[@<raw device>] .B dvd:[<device>][@<raw device>][@[<title>][,[<chapter>][,<angle>]]]
DVD device (for instance dvd:/dev/dvd). The raw device is optional and DVD device (for instance dvd:/dev/dvd). The raw device is optional and
must have been prepared beforehands. must have been prepared beforehands.
.TP .TP
...@@ -140,35 +140,19 @@ displaying of all images. ...@@ -140,35 +140,19 @@ displaying of all images.
Note that vlc is not guaranteed to behave properly if you ask it to Note that vlc is not guaranteed to behave properly if you ask it to
display more images than your CPU can cope with. display more images than your CPU can cope with.
.TP .TP
.B \-t, \-\-dvdtitle <title> .B \-a, \-\-input_audio [ ac3 | lpcm | mpeg | off ]
Choose the DVD title. Most movies on DVDs start on the first title, but you may want to manually select another title.
.TP
.B \-T, \-\-dvdchapter <title>
Choose the DVD chapter. DVDs are divided into titles, which in turn are divided into chapters.
.TP
.B \-a, \-\-dvdaudio [ ac3 | lpcm | mpeg | off ]
Choose the audio channel type. Most DVDs have AC3 audio channels, but Choose the audio channel type. Most DVDs have AC3 audio channels, but
you can also have Linear PCM or MPEG layer 2 sound. Also, one might decide you can also have Linear PCM or MPEG layer 2 sound. Also, one might decide
not to activate the audio channel. not to activate the audio channel.
.TP .TP
.B \-u, \-\-dvdangle <num> .B \-c, \-\-input_channel [ 0\-15 ]
Choose the angle, available on some DVDs.
.TP
.B \-c, \-\-dvdchannel [ 0\-15 ]
Select the audio channel. Most DVDs only have one or two audio channels, Select the audio channel. Most DVDs only have one or two audio channels,
but some of them have a great number of available languages. Note that the but some of them have a great number of available languages. Note that the
audio channel will also depend on the channel type. audio channel will also depend on the channel type.
.TP .TP
.B \-s, \-\-dvdsubtitle [ 0\-31 ] .B \-s, \-\-input_subtitle [ 0\-31 ]
Select the subtitle channel, if there is one in the stream. Select the subtitle channel, if there is one in the stream.
.TP .TP
.B \-\-dvdcss-method <method>
Select the CSS decryption scheme when using libdvdcss. Usually to choose
from "disc", "title" or "key", but depends on your libdvdcss version.
.TP
.B \-\-dvdcss-verbose <level>
Select the CSS decryption verbosity level, 0, 1 or 2.
.TP
.B \-\-input <method> .B \-\-input <method>
Choose the input method, "dvd", "ps", "ts" for instance. Choose the input method, "dvd", "ps", "ts" for instance.
.TP .TP
......
dvd_SOURCES = dvd.c input_dvd.c dvd_ifo.c dvd_udf.c dvd_summary.c $(SRC_DVD_EXTRA) dvd_SOURCES = dvd.c dvd_access.c dvd_demux.c dvd_seek.c dvd_es.c dvd_ifo.c dvd_udf.c dvd_summary.c $(SRC_DVD_EXTRA)
EXTRA_DEP = ../../lib/libdvdcss.a ../../lib/libdvdcss.so EXTRA_DEP = ../../lib/libdvdcss.a ../../lib/libdvdcss.so
......
/***************************************************************************** /*****************************************************************************
* input_dvd.h: thread structure of the DVD plugin * dvd.h: thread structure of the DVD plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: input_dvd.h,v 1.25 2002/03/01 01:12:28 stef Exp $ * $Id: dvd.h,v 1.1 2002/03/06 01:20:56 stef Exp $
* *
* Author: Stéphane Borel <stef@via.ecp.fr> * Author: Stéphane Borel <stef@via.ecp.fr>
* *
...@@ -36,6 +36,9 @@ typedef struct thread_dvd_data_s ...@@ -36,6 +36,9 @@ typedef struct thread_dvd_data_s
{ {
dvdcss_handle dvdhandle; /* libdvdcss handle */ dvdcss_handle dvdhandle; /* libdvdcss handle */
int i_audio_nb;
int i_spu_nb;
/* Navigation information */ /* Navigation information */
int i_title; int i_title;
int i_title_id; int i_title_id;
...@@ -57,9 +60,6 @@ typedef struct thread_dvd_data_s ...@@ -57,9 +60,6 @@ typedef struct thread_dvd_data_s
int i_start; int i_start;
int i_size; int i_size;
/* Scrambling Information */
struct css_s * p_css;
/* Structure that contains all information of the DVD */ /* Structure that contains all information of the DVD */
struct ifo_s * p_ifo; struct ifo_s * p_ifo;
......
/* dvd_demux.c: DVD demux functions.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_demux.c,v 1.1 2002/03/06 01:20:56 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <videolan/vlc.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#ifdef STRNCASECMP_IN_STRINGS_H
# include <strings.h>
#endif
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
#include "debug.h"
/* how many packets DVDDemux will read in each loop */
#define DVD_READ_ONCE 64
/*****************************************************************************
* Local prototypes
*****************************************************************************/
/* called from outside */
static int DVDRewind ( struct input_thread_s * );
static int DVDDemux ( struct input_thread_s * );
static int DVDInit ( struct input_thread_s * );
static void DVDEnd ( struct input_thread_s * );
void DVDLaunchDecoders( input_thread_t * );
/*****************************************************************************
* Functions exported as capabilities. They are declared as static so that
* we don't pollute the namespace too much.
*****************************************************************************/
void _M( demux_getfunctions)( function_list_t * p_function_list )
{
#define demux p_function_list->functions.demux
demux.pf_init = DVDInit;
demux.pf_end = DVDEnd;
demux.pf_demux = DVDDemux;
demux.pf_rewind = DVDRewind;
#undef demux
}
/*
* Data demux functions
*/
/*****************************************************************************
* DVDInit: initializes DVD structures
*****************************************************************************/
static int DVDInit( input_thread_t * p_input )
{
if( strncmp( p_input->p_access_module->psz_name, "dvd", 3 ) )
{
return -1;
}
vlc_mutex_lock( &p_input->stream.stream_lock );
DVDLaunchDecoders( p_input );
vlc_mutex_unlock( &p_input->stream.stream_lock );
return 0;
}
/*****************************************************************************
* DVDEnd: frees unused data
*****************************************************************************/
static void DVDEnd( input_thread_t * p_input )
{
}
/*****************************************************************************
* DVDDemux
*****************************************************************************/
static int DVDDemux( input_thread_t * p_input )
{
int i;
data_packet_t * p_data;
/* Read headers to compute payload length */
for( i = 0 ; i < DVD_READ_ONCE ; i++ )
{
input_ReadPS( p_input, &p_data );
input_DemuxPS( p_input, p_data );
}
return i;
}
/*****************************************************************************
* DVDRewind : reads a stream backward
*****************************************************************************/
static int DVDRewind( input_thread_t * p_input )
{
return( -1 );
}
This diff is collapsed.
/* dvd_es.h: functions to find and select ES
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_es.h,v 1.1 2002/03/06 01:20:56 stef Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
void DVDLaunchDecoders ( input_thread_t * );
void DVDReadVideo ( input_thread_t * );
void DVDReadAudio ( input_thread_t * );
void DVDReadSPU ( input_thread_t * );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvd_ifo.c: Functions for ifo parsing * dvd_ifo.c: Functions for ifo parsing
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_ifo.c,v 1.43 2001/12/30 07:09:55 sam Exp $ * $Id: dvd_ifo.c,v 1.44 2002/03/06 01:20:56 stef Exp $
* *
* Authors: Stphane Borel <stef@via.ecp.fr> * Authors: Stphane Borel <stef@via.ecp.fr>
* German Tischler <tanis@gaspode.franken.de> * German Tischler <tanis@gaspode.franken.de>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
# include <videolan/dvdcss.h> # include <videolan/dvdcss.h>
#endif #endif
#include "input_dvd.h" #include "dvd.h"
#include "dvd_ifo.h" #include "dvd_ifo.h"
#include "dvd_udf.h" #include "dvd_udf.h"
......
/* dvd_seek.c: functions to navigate through DVD.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_seek.c,v 1.1 2002/03/06 01:20:56 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <videolan/vlc.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#ifdef STRNCASECMP_IN_STRINGS_H
# include <strings.h>
#endif
#ifdef GOD_DAMN_DMCA
# include "dummy_dvdcss.h"
#else
# include <videolan/dvdcss.h>
#endif
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
#include "dvd.h"
#include "dvd_seek.h"
#include "dvd_ifo.h"
#include "debug.h"
#define title \
p_dvd->p_ifo->vts.title_unit.p_title[p_dvd->i_title_id-1].title
#define cell p_dvd->p_ifo->vts.cell_inf
/*****************************************************************************
* DVDFindCell: adjust the title cell index with the program cell
*****************************************************************************/
int DVDFindCell( thread_dvd_data_t * p_dvd )
{
int i_cell;
int i_index;
i_cell = p_dvd->i_cell;
i_index = p_dvd->i_prg_cell;
if( i_cell >= cell.i_cell_nb )
{
return -1;
}
while( ( ( title.p_cell_pos[i_index].i_vob_id !=
cell.p_cell_map[i_cell].i_vob_id ) ||
( title.p_cell_pos[i_index].i_cell_id !=
cell.p_cell_map[i_cell].i_cell_id ) ) &&
( i_cell < cell.i_cell_nb - 1 ) )
{
i_cell++;
}
/*
intf_WarnMsg( 12, "FindCell: i_cell %d i_index %d found %d nb %d",
p_dvd->i_cell,
p_dvd->i_prg_cell,
i_cell,
cell.i_cell_nb );
*/
p_dvd->i_cell = i_cell;
return 0;
}
#undef cell
/*****************************************************************************
* DVDFindSector: find cell index in adress map from index in
* information table program map and give corresponding sectors.
*****************************************************************************/
int DVDFindSector( thread_dvd_data_t * p_dvd )
{
if( p_dvd->i_sector > title.p_cell_play[p_dvd->i_prg_cell].i_end_sector )
{
p_dvd->i_prg_cell++;
if( DVDChooseAngle( p_dvd ) < 0 )
{
return -1;
}
}
if( DVDFindCell( p_dvd ) < 0 )
{
intf_ErrMsg( "dvd error: can't find sector" );
return -1;
}
/* Find start and end sectors of new cell */
#if 1
p_dvd->i_sector = __MAX(
p_dvd->p_ifo->vts.cell_inf.p_cell_map[p_dvd->i_cell].i_start_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_start_sector );
p_dvd->i_end_sector = __MIN(
p_dvd->p_ifo->vts.cell_inf.p_cell_map[p_dvd->i_cell].i_end_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_end_sector );
#else
p_dvd->i_sector = title.p_cell_play[p_dvd->i_prg_cell].i_start_sector;
p_dvd->i_end_sector = title.p_cell_play[p_dvd->i_prg_cell].i_end_sector;
#endif
/*
intf_WarnMsg( 12, "cell: %d sector1: 0x%x end1: 0x%x\n"
"index: %d sector2: 0x%x end2: 0x%x\n"
"category: 0x%x ilvu end: 0x%x vobu start 0x%x",
p_dvd->i_cell,
p_dvd->p_ifo->vts.cell_inf.p_cell_map[p_dvd->i_cell].i_start_sector,
p_dvd->p_ifo->vts.cell_inf.p_cell_map[p_dvd->i_cell].i_end_sector,
p_dvd->i_prg_cell,
title.p_cell_play[p_dvd->i_prg_cell].i_start_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_end_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_category,
title.p_cell_play[p_dvd->i_prg_cell].i_first_ilvu_vobu_esector,
title.p_cell_play[p_dvd->i_prg_cell].i_last_vobu_start_sector );
*/
return 0;
}
/*****************************************************************************
* DVDChapterSelect: find the cell corresponding to requested chapter
*****************************************************************************/
int DVDChapterSelect( thread_dvd_data_t * p_dvd, int i_chapter )
{
/* Find cell index in Program chain for current chapter */
p_dvd->i_prg_cell = title.chapter_map.pi_start_cell[i_chapter-1] - 1;
p_dvd->i_cell = 0;
p_dvd->i_sector = 0;
DVDChooseAngle( p_dvd );
/* Search for cell_index in cell adress_table and initialize
* start sector */
if( DVDFindSector( p_dvd ) < 0 )
{
intf_ErrMsg( "dvd error: can't select chapter" );
return -1;
}
/* start is : beginning of vts vobs + offset to vob x */
p_dvd->i_start = p_dvd->i_title_start + p_dvd->i_sector;
/* Position the fd pointer on the right address */
if( ( p_dvd->i_start = dvdcss_seek( p_dvd->dvdhandle,
p_dvd->i_start,
DVDCSS_SEEK_MPEG ) ) < 0 )
{
intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) );
return -1;
}
p_dvd->i_chapter = i_chapter;
return 0;
}
/*****************************************************************************
* DVDChooseAngle: select the cell corresponding to the selected angle
*****************************************************************************/
int DVDChooseAngle( thread_dvd_data_t * p_dvd )
{
/* basic handling of angles */
switch( ( ( title.p_cell_play[p_dvd->i_prg_cell].i_category & 0xf000 )
>> 12 ) )
{
/* we enter a muli-angle section */
case 0x5:
p_dvd->i_prg_cell += p_dvd->i_angle - 1;
p_dvd->i_angle_cell = 0;
break;
/* we exit a multi-angle section */
case 0x9:
case 0xd:
p_dvd->i_prg_cell += p_dvd->i_angle_nb - p_dvd->i_angle;
break;
}
return 0;
}
#undef title
/* dvd_seek.h: DVD access plugin.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_seek.h,v 1.1 2002/03/06 01:20:56 stef Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
int DVDChooseAngle( thread_dvd_data_t * );
int DVDFindCell( thread_dvd_data_t * );
int DVDFindSector( thread_dvd_data_t * );
int DVDChapterSelect( thread_dvd_data_t *, int );
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* found in .ifo. * found in .ifo.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_summary.c,v 1.13 2002/03/05 17:46:33 stef Exp $ * $Id: dvd_summary.c,v 1.14 2002/03/06 01:20:56 stef Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
# include <videolan/dvdcss.h> # include <videolan/dvdcss.h>
#endif #endif
#include "input_dvd.h" #include "dvd.h"
#include "dvd_ifo.h" #include "dvd_ifo.h"
#include "iso_lang.h" #include "iso_lang.h"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* contains the basic udf handling functions * contains the basic udf handling functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_udf.c,v 1.18 2001/12/30 07:09:55 sam Exp $ * $Id: dvd_udf.c,v 1.19 2002/03/06 01:20:56 stef Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
# include <videolan/dvdcss.h> # include <videolan/dvdcss.h>
#endif #endif
#include "input_dvd.h" #include "dvd.h"
#include "dvd_ifo.h" #include "dvd_ifo.h"
#define UDFADshort 1 #define UDFADshort 1
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading. * It depends on: libdvdread for ifo files and block reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: input_dvdread.c,v 1.29 2002/03/05 17:46:33 stef Exp $ * $Id: input_dvdread.c,v 1.30 2002/03/06 01:20:56 stef Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -609,14 +609,14 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -609,14 +609,14 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
/* We don't use input_EndStream here since /* We don't use input_EndStream here since
* we keep area structures */ * we keep area structures */
for( i = 0 ; i < p_input->stream.i_es_number ; i++ ) while( p_input->stream.i_es_number )
{ {
input_DelES( p_input, p_input->stream.pp_es[i] ); input_DelES( p_input, p_input->stream.pp_es[0] );
} }
for( i = 0 ; i < p_input->stream.i_pgrm_number ; i++ ) while( p_input->stream.i_pgrm_number )
{ {
input_DelProgram( p_input, p_input->stream.pp_programs[i] ); input_DelProgram( p_input, p_input->stream.pp_programs[0] );
} }
if( p_input->stream.pp_selected_es ) if( p_input->stream.pp_selected_es )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_display.c: Gtk+ tools for main interface * gtk_display.c: Gtk+ tools for main interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_display.c,v 1.17 2002/03/05 17:46:33 stef Exp $ * $Id: gtk_display.c,v 1.18 2002/03/06 01:20:56 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -216,13 +216,11 @@ gint GtkModeManage( intf_thread_t * p_intf ) ...@@ -216,13 +216,11 @@ gint GtkModeManage( intf_thread_t * p_intf )
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_title"), FALSE ); gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_title"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_chapter"), gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_chapter"),
FALSE ); FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_angle"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_audio"), FALSE ); gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_audio"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_subpictures"), gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_subpictures"),
FALSE ); FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"), gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"),
FALSE ); FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_angle"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_audio"), FALSE ); gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_audio"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"), gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"),
FALSE ); FALSE );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_menu.c : functions to handle menu items. * gtk_menu.c : functions to handle menu items.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_menu.c,v 1.21 2002/03/05 17:46:33 stef Exp $ * $Id: gtk_menu.c,v 1.22 2002/03/06 01:20:56 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -70,8 +70,6 @@ static gint GtkTitleMenu( gpointer, GtkWidget *, ...@@ -70,8 +70,6 @@ static gint GtkTitleMenu( gpointer, GtkWidget *,
static gint GtkRadioMenu( intf_thread_t *, GtkWidget *, GSList *, static gint GtkRadioMenu( intf_thread_t *, GtkWidget *, GSList *,
char *, int, int, char *, int, int,
void( *pf_toggle )( GtkCheckMenuItem *, gpointer ) ); void( *pf_toggle )( GtkCheckMenuItem *, gpointer ) );
void GtkMenubarAngleToggle( GtkCheckMenuItem *, gpointer );
void GtkPopupAngleToggle( GtkCheckMenuItem *, gpointer );
gint GtkSetupMenus( intf_thread_t * p_intf ); gint GtkSetupMenus( intf_thread_t * p_intf );
...@@ -279,49 +277,6 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data ) ...@@ -279,49 +277,6 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
} }
/*
* Angle
*/
#if 0
#define GTKANGLETOGGLE( intf, window, menu, callback ) \
intf_thread_t * p_intf; \
GtkWidget * p_menu; \
input_area_t * p_area; \
\
p_intf = GetIntf( GTK_WIDGET(menuitem), (intf) ); \
\
if( menuitem->active && !p_intf->p_sys->b_angle_update ) \
{ \
p_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( \
p_intf->p_sys->window ), (menu) ) ); \
p_area = p_input_bank->pp_input[0]->stream.p_selected_area; \
p_area->i_angle = (gint)((long)user_data); \
\
input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area ); \
\
p_intf->p_sys->b_angle_update = 1; \
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); \
GtkRadioMenu( p_intf, p_menu, NULL, "Angle", \
p_area->i_angle_nb, p_area->i_angle, (callback) ); \
vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); \
p_intf->p_sys->b_angle_update = 0; \
}
void GtkMenubarAngleToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
{
GTKANGLETOGGLE( "intf_window", p_popup, "popup_angle",
GtkPopupAngleToggle );
}
void GtkPopupAngleToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
{
GTKANGLETOGGLE( "intf_popup", p_window, "menubar_angle",
GtkMenubarAngleToggle );
}
#undef GTKANGLETOGGLE
#endif
/**************************************************************************** /****************************************************************************
* Functions to generate menus * Functions to generate menus
****************************************************************************/ ****************************************************************************/
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vcd.c : VCD input module for vlc * vcd.c : VCD input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: vcd.c,v 1.6 2002/03/05 23:29:36 jobi Exp $ * $Id: vcd.c,v 1.7 2002/03/06 01:20:56 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -43,8 +43,8 @@ MODULE_CONFIG_STOP ...@@ -43,8 +43,8 @@ MODULE_CONFIG_STOP
MODULE_INIT_START MODULE_INIT_START
SET_DESCRIPTION( "VCD input module" ) SET_DESCRIPTION( "VCD input module" )
ADD_CAPABILITY( DEMUX, 205 ) ADD_CAPABILITY( DEMUX, 180 )
ADD_CAPABILITY( ACCESS, 105 ) ADD_CAPABILITY( ACCESS, 80 )
ADD_SHORTCUT( "vcd" ) ADD_SHORTCUT( "vcd" )
MODULE_INIT_STOP MODULE_INIT_STOP
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* decoders. * decoders.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: input.c,v 1.186 2002/03/05 06:48:33 gbazin Exp $ * $Id: input.c,v 1.187 2002/03/06 01:20:56 stef Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Alexis Guillard <alexis.guillard@bt.com> * Alexis Guillard <alexis.guillard@bt.com>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment