Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
1171979d
Commit
1171979d
authored
Mar 11, 2003
by
gbazin
Browse files
* ALL: experimental code for stream (dvd) navigation through object variables.
parent
cfcd2ca2
Changes
12
Hide whitespace changes
Inline
Side-by-side
include/input_ext-plugins.h
View file @
1171979d
...
...
@@ -3,7 +3,7 @@
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id: input_ext-plugins.h,v 1.4
0
2003/03/
04 13:21:19 massiot
Exp $
* $Id: input_ext-plugins.h,v 1.4
1
2003/03/
11 23:56:53 gbazin
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -44,7 +44,7 @@ VLC_EXPORT( pgrm_descriptor_t *, input_FindProgram,( input_thread_t *, uint16_t
VLC_EXPORT
(
pgrm_descriptor_t
*
,
input_AddProgram
,
(
input_thread_t
*
,
uint16_t
,
size_t
)
);
VLC_EXPORT
(
void
,
input_DelProgram
,(
input_thread_t
*
,
pgrm_descriptor_t
*
)
);
VLC_EXPORT
(
int
,
input_SetProgram
,(
input_thread_t
*
,
pgrm_descriptor_t
*
)
);
VLC_EXPORT
(
input_area_t
*
,
input_AddArea
,(
input_thread_t
*
)
);
VLC_EXPORT
(
input_area_t
*
,
input_AddArea
,(
input_thread_t
*
,
uint16_t
,
uint16_t
)
);
VLC_EXPORT
(
void
,
input_DelArea
,
(
input_thread_t
*
,
input_area_t
*
)
);
VLC_EXPORT
(
es_descriptor_t
*
,
input_FindES
,(
input_thread_t
*
,
uint16_t
)
);
VLC_EXPORT
(
es_descriptor_t
*
,
input_AddES
,
(
input_thread_t
*
,
pgrm_descriptor_t
*
,
uint16_t
,
size_t
)
);
...
...
include/variables.h
View file @
1171979d
...
...
@@ -2,7 +2,7 @@
* variables.h: variables handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: variables.h,v 1.1
1
200
2/12/14 19:34:07
gbazin Exp $
* $Id: variables.h,v 1.1
2
200
3/03/11 23:56:53
gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -75,6 +75,7 @@ struct variable_t
#define VLC_VAR_MODULE 0x0041
#define VLC_VAR_FILE 0x0042
#define VLC_VAR_DIRECTORY 0x0043
#define VLC_VAR_VARIABLE 0x0044
#define VLC_VAR_FLOAT 0x0050
#define VLC_VAR_TIME 0x0060
#define VLC_VAR_ADDRESS 0x0070
...
...
@@ -97,11 +98,14 @@ struct variable_t
#define VLC_VAR_SETMAX 0x0011
#define VLC_VAR_SETSTEP 0x0012
#define VLC_VAR_SETVALUE 0x0013
#define VLC_VAR_ADDCHOICE 0x0020
#define VLC_VAR_DELCHOICE 0x0021
#define VLC_VAR_SETDEFAULT 0x0022
#define VLC_VAR_GETLIST 0x0023
#define VLC_VAR_FREELIST 0x0024
#define VLC_VAR_CLEARCHOICES 0x0022
#define VLC_VAR_SETDEFAULT 0x0023
#define VLC_VAR_GETLIST 0x0024
#define VLC_VAR_FREELIST 0x0025
/*****************************************************************************
* Prototypes
...
...
modules/access/dvd/access.c
View file @
1171979d
...
...
@@ -8,7 +8,7 @@
* -udf.* to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: access.c,v 1.1
0
2003/0
2/08 22:20:28 massiot
Exp $
* $Id: access.c,v 1.1
1
2003/0
3/11 23:56:53 gbazin
Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
...
...
@@ -206,10 +206,8 @@ int E_(DVDOpen) ( vlc_object_t *p_this )
* is reserved for video_ts.vob */
for
(
i
=
1
;
i
<=
title_inf
.
i_title_nb
;
i
++
)
{
input_AddArea
(
p_input
);
/* Titles are Program Chains */
area
[
i
]
->
i_id
=
i
;
input_AddArea
(
p_input
,
i
,
title_inf
.
p_attr
[
i
-
1
].
i_chapter_nb
)
;
/* Absolute start offset and size
* We can only set that with vts ifo, so we do it during the
...
...
@@ -217,8 +215,7 @@ int E_(DVDOpen) ( vlc_object_t *p_this )
area
[
i
]
->
i_start
=
0
;
area
[
i
]
->
i_size
=
0
;
/* Number of chapters */
area
[
i
]
->
i_part_nb
=
title_inf
.
p_attr
[
i
-
1
].
i_chapter_nb
;
/* Default Chapter */
area
[
i
]
->
i_part
=
1
;
/* Offset to vts_i_0.ifo */
...
...
@@ -291,6 +288,7 @@ static int DVDSetProgram( input_thread_t * p_input,
{
thread_dvd_data_t
*
p_dvd
;
int
i_angle
;
vlc_value_t
val
;
p_dvd
=
(
thread_dvd_data_t
*
)(
p_input
->
p_access_data
);
i_angle
=
p_program
->
i_number
;
...
...
@@ -325,6 +323,10 @@ static int DVDSetProgram( input_thread_t * p_input,
}
#undef title
msg_Dbg
(
p_input
,
"angle %d selected"
,
p_dvd
->
i_angle
);
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_program
->
i_number
;
var_Change
(
p_input
,
"program"
,
VLC_VAR_SETVALUE
,
&
val
);
}
return
0
;
...
...
@@ -390,6 +392,7 @@ static int DVDReadAngle( input_thread_t * p_input )
static
int
DVDSetArea
(
input_thread_t
*
p_input
,
input_area_t
*
p_area
)
{
thread_dvd_data_t
*
p_dvd
;
vlc_value_t
val
;
p_dvd
=
(
thread_dvd_data_t
*
)(
p_input
->
p_access_data
);
...
...
@@ -401,6 +404,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
int
i_vts_title
;
u32
i_first
;
u32
i_last
;
unsigned
int
i
;
/* Reset the Chapter position of the old title */
p_input
->
stream
.
p_selected_area
->
i_part
=
1
;
...
...
@@ -495,6 +499,16 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
DVDLaunchDecoders
(
p_input
);
}
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_id
;
var_Change
(
p_input
,
"title"
,
VLC_VAR_SETVALUE
,
&
val
);
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_CLEARCHOICES
,
NULL
);
for
(
i
=
1
;
i
<=
p_area
->
i_part_nb
;
i
++
)
{
val
.
i_int
=
i
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_ADDCHOICE
,
&
val
);
}
}
/* i_title >= 0 */
else
{
...
...
@@ -510,6 +524,10 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_input
->
stream
.
b_seekable
=
1
;
p_input
->
stream
.
b_changed
=
1
;
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_part
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_SETVALUE
,
&
val
);
return
0
;
}
#undef vts
...
...
modules/access/dvdplay/access.c
View file @
1171979d
...
...
@@ -2,7 +2,7 @@
* access.c: access capabilities for dvdplay plugin.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: access.c,v 1.1
2
2003/03/
09 19:25:09
gbazin Exp $
* $Id: access.c,v 1.1
3
2003/03/
11 23:56:53
gbazin Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
...
...
@@ -45,10 +45,6 @@
# include <strings.h>
#endif
#if defined( WIN32 )
# include <io.h>
/* read() */
#endif
#include "dvd.h"
#include "es.h"
#include "tools.h"
...
...
@@ -147,17 +143,12 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
/* Area 0 for menu */
area
[
0
]
->
i_plugin_data
=
0
;
input_DelArea
(
p_input
,
p_input
->
stream
.
pp_areas
[
0
]
);
input_AddArea
(
p_input
,
0
,
1
);
for
(
i
=
1
;
i
<=
i_title_nr
;
i
++
)
{
input_AddArea
(
p_input
);
/* Titles id */
area
[
i
]
->
i_id
=
i
;
/* Number of chapters */
area
[
i
]
->
i_part_nb
=
dvdplay_chapter_nr
(
p_dvd
->
vmg
,
i
);
input_AddArea
(
p_input
,
i
,
dvdplay_chapter_nr
(
p_dvd
->
vmg
,
i
)
);
area
[
i
]
->
i_plugin_data
=
0
;
}
#undef area
...
...
@@ -244,6 +235,7 @@ static int dvdplay_SetProgram( input_thread_t * p_input,
{
dvd_data_t
*
p_dvd
;
int
i_angle
;
vlc_value_t
val
;
p_dvd
=
(
dvd_data_t
*
)(
p_input
->
p_access_data
);
i_angle
=
p_program
->
i_number
;
...
...
@@ -257,6 +249,10 @@ static int dvdplay_SetProgram( input_thread_t * p_input,
msg_Dbg
(
p_input
,
"angle %d selected"
,
i_angle
);
}
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_program
->
i_number
;
var_Change
(
p_input
,
"program"
,
VLC_VAR_SETVALUE
,
&
val
);
}
return
0
;
...
...
@@ -272,6 +268,7 @@ static int dvdplay_SetProgram( input_thread_t * p_input,
static
int
dvdplay_SetArea
(
input_thread_t
*
p_input
,
input_area_t
*
p_area
)
{
dvd_data_t
*
p_dvd
;
vlc_value_t
val
;
p_dvd
=
(
dvd_data_t
*
)
p_input
->
p_access_data
;
...
...
@@ -322,6 +319,10 @@ static int dvdplay_SetArea( input_thread_t * p_input, input_area_t * p_area )
LB2OFF
(
dvdplay_position
(
p_dvd
->
vmg
)
)
-
p_area
->
i_start
;
p_input
->
stream
.
b_changed
=
1
;
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_part
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_SETVALUE
,
&
val
);
return
0
;
}
...
...
@@ -395,7 +396,6 @@ static void pf_vmg_callback( void* p_args, dvdplay_event_t event )
case
NEW_VTS
:
break
;
case
NEW_FILE
:
break
;
case
NEW_PGC
:
/* prevent intf to try to seek by default */
...
...
@@ -428,6 +428,10 @@ static void pf_vmg_callback( void* p_args, dvdplay_event_t event )
/* warn interface that something has changed */
p_input
->
stream
.
b_changed
=
1
;
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_input
->
stream
.
p_selected_area
->
i_part
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_SETVALUE
,
&
val
);
break
;
case
NEW_CELL
:
p_dvd
->
b_end_of_cell
=
0
;
...
...
@@ -497,6 +501,7 @@ static int dvdNewArea( input_thread_t * p_input, input_area_t * p_area )
{
dvd_data_t
*
p_dvd
;
int
i_angle_nb
,
i_angle
;
vlc_value_t
val
;
int
i
;
p_dvd
=
(
dvd_data_t
*
)
p_input
->
p_access_data
;
...
...
@@ -526,6 +531,20 @@ static int dvdNewArea( input_thread_t * p_input, input_area_t * p_area )
/* No PSM to read in DVD mode, we already have all information */
p_input
->
stream
.
p_selected_program
->
b_is_ok
=
1
;
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_id
;
var_Change
(
p_input
,
"title"
,
VLC_VAR_SETVALUE
,
&
val
);
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_CLEARCHOICES
,
NULL
);
for
(
i
=
1
;
(
unsigned
int
)
i
<=
p_area
->
i_part_nb
;
i
++
)
{
val
.
i_int
=
i
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_ADDCHOICE
,
&
val
);
}
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_part
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_SETVALUE
,
&
val
);
return
0
;
}
...
...
@@ -568,4 +587,3 @@ static int dvdNewPGC( input_thread_t * p_input )
return
0
;
}
modules/access/dvdread/input.c
View file @
1171979d
...
...
@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001, 2003 VideoLAN
* $Id: input.c,v 1.1
6
2003/0
2/02 00:49:40 massiot
Exp $
* $Id: input.c,v 1.1
7
2003/0
3/11 23:56:53 gbazin
Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
...
...
@@ -383,10 +383,8 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
* is reserved for video_ts.vob */
for
(
i
=
1
;
i
<=
tt_srpt
->
nr_of_srpts
;
i
++
)
{
input_AddArea
(
p_input
);
/* Titles are Program Chains */
area
[
i
]
->
i_id
=
i
;
input_AddArea
(
p_input
,
i
,
tt_srpt
->
title
[
i
-
1
].
nr_of_ptts
)
;
/* Absolute start offset and size
* We can only set that with vts ifo, so we do it during the
...
...
@@ -394,8 +392,7 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
area
[
i
]
->
i_start
=
0
;
area
[
i
]
->
i_size
=
0
;
/* Number of chapters */
area
[
i
]
->
i_part_nb
=
tt_srpt
->
title
[
i
-
1
].
nr_of_ptts
;
/* Default Chapter */
area
[
i
]
->
i_part
=
1
;
area
[
i
]
->
i_plugin_data
=
tt_srpt
->
title
[
i
-
1
].
title_set_nr
;
...
...
@@ -465,6 +462,7 @@ static int DvdReadSetProgram( input_thread_t * p_input,
if
(
p_input
->
stream
.
p_selected_program
!=
p_program
)
{
thread_dvd_data_t
*
p_dvd
;
vlc_value_t
val
;
p_dvd
=
(
thread_dvd_data_t
*
)(
p_input
->
p_access_data
);
p_dvd
->
i_angle
=
p_program
->
i_number
;
...
...
@@ -475,6 +473,10 @@ static int DvdReadSetProgram( input_thread_t * p_input,
p_input
->
stream
.
p_selected_program
=
p_program
;
msg_Dbg
(
p_input
,
"angle %d selected"
,
p_dvd
->
i_angle
);
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_program
->
i_number
;
var_Change
(
p_input
,
"program"
,
VLC_VAR_SETVALUE
,
&
val
);
}
return
VLC_SUCCESS
;
...
...
@@ -494,6 +496,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
thread_dvd_data_t
*
p_dvd
;
int
pgc_id
=
0
;
int
pgn
=
0
;
vlc_value_t
val
;
p_dvd
=
(
thread_dvd_data_t
*
)
p_input
->
p_access_data
;
...
...
@@ -794,6 +797,16 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
DvdReadLauchDecoders
(
p_input
);
}
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_id
;
var_Change
(
p_input
,
"title"
,
VLC_VAR_SETVALUE
,
&
val
);
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_CLEARCHOICES
,
NULL
);
for
(
i
=
1
;
i
<=
p_area
->
i_part_nb
;
i
++
)
{
val
.
i_int
=
i
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_ADDCHOICE
,
&
val
);
}
}
/* i_title >= 0 */
else
{
...
...
@@ -838,6 +851,10 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
p_input
->
stream
.
b_seekable
=
VLC_TRUE
;
p_input
->
stream
.
b_changed
=
VLC_TRUE
;
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_part
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_SETVALUE
,
&
val
);
return
VLC_SUCCESS
;
}
...
...
modules/access/satellite/access.c
View file @
1171979d
...
...
@@ -382,6 +382,7 @@ int SatelliteSetProgram( input_thread_t * p_input,
pgrm_descriptor_t
*
p_new_prg
)
{
unsigned
int
i_es_index
;
vlc_value_t
val
;
if
(
p_input
->
stream
.
p_selected_program
)
{
...
...
@@ -434,6 +435,10 @@ int SatelliteSetProgram( input_thread_t * p_input,
p_input
->
stream
.
p_selected_program
=
p_new_prg
;
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_new_prg
->
i_number
;
var_Change
(
p_input
,
"program"
,
VLC_VAR_SETVALUE
,
&
val
);
return
0
;
}
...
...
modules/access/vcd/vcd.c
View file @
1171979d
...
...
@@ -2,7 +2,7 @@
* vcd.c : VCD input module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: vcd.c,v 1.1
5
2003/0
2
/1
2 17:13:33 jobi
Exp $
* $Id: vcd.c,v 1.1
6
2003/0
3
/1
1 23:56:54 gbazin
Exp $
*
* Author: Johan Bilien <jobi@via.ecp.fr>
*
...
...
@@ -224,18 +224,15 @@ static int VCDOpen( vlc_object_t *p_this )
#define area p_input->stream.pp_areas
for
(
i
=
1
;
i
<=
p_vcd
->
i_nb_tracks
-
1
;
i
++
)
{
input_AddArea
(
p_input
);
/* Titles are Program Chains */
area
[
i
]
->
i_id
=
i
;
input_AddArea
(
p_input
,
i
,
1
)
;
/* Absolute start offset and size */
area
[
i
]
->
i_start
=
(
off_t
)
p_vcd
->
p_sectors
[
i
]
*
(
off_t
)
VCD_DATA_SIZE
;
area
[
i
]
->
i_size
=
(
off_t
)(
p_vcd
->
p_sectors
[
i
+
1
]
-
p_vcd
->
p_sectors
[
i
])
*
(
off_t
)
VCD_DATA_SIZE
;
/* Number of chapters */
area
[
i
]
->
i_part_nb
=
1
;
/* will be the entry points */
/* Default Chapter */
area
[
i
]
->
i_part
=
1
;
/* i_plugin_data is used to store which entry point is the first
...
...
@@ -388,6 +385,7 @@ static int VCDSetProgram( input_thread_t * p_input,
static
int
VCDSetArea
(
input_thread_t
*
p_input
,
input_area_t
*
p_area
)
{
thread_vcd_data_t
*
p_vcd
;
vlc_value_t
val
;
p_vcd
=
(
thread_vcd_data_t
*
)
p_input
->
p_access_data
;
...
...
@@ -396,6 +394,8 @@ static int VCDSetArea( input_thread_t * p_input, input_area_t * p_area )
if
(
p_area
!=
p_input
->
stream
.
p_selected_area
)
{
unsigned
int
i
;
/* Reset the Chapter position of the current title */
p_input
->
stream
.
p_selected_area
->
i_part
=
1
;
p_input
->
stream
.
p_selected_area
->
i_tell
=
0
;
...
...
@@ -407,6 +407,16 @@ static int VCDSetArea( input_thread_t * p_input, input_area_t * p_area )
/* The first track is not a valid one */
p_vcd
->
i_track
=
p_area
->
i_id
;
p_vcd
->
i_sector
=
p_vcd
->
p_sectors
[
p_vcd
->
i_track
];
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_id
;
var_Change
(
p_input
,
"title"
,
VLC_VAR_SETVALUE
,
&
val
);
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_CLEARCHOICES
,
NULL
);
for
(
i
=
1
;
i
<=
p_area
->
i_part_nb
;
i
++
)
{
val
.
i_int
=
i
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_ADDCHOICE
,
&
val
);
}
}
if
(
p_vcd
->
b_valid_ep
)
...
...
@@ -427,6 +437,10 @@ static int VCDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_input
->
stream
.
b_seekable
=
1
;
p_input
->
stream
.
b_changed
=
1
;
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
p_area
->
i_part
;
var_Change
(
p_input
,
"chapter"
,
VLC_VAR_SETVALUE
,
&
val
);
return
0
;
}
...
...
modules/gui/wxwindows/popup.cpp
View file @
1171979d
...
...
@@ -2,7 +2,7 @@
* popup.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: popup.cpp,v 1.
3
2003/0
1/26 10:36:10
gbazin Exp $
* $Id: popup.cpp,v 1.
4
2003/0
3/11 23:56:54
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -118,6 +118,7 @@ PopupMenu::PopupMenu( intf_thread_t *_p_intf, Interface *_p_main_interface ):
CreateMenuEntry
(
"title"
,
p_object
);
CreateMenuEntry
(
"chapter"
,
p_object
);
CreateMenuEntry
(
"navigation"
,
p_object
);
vlc_object_release
(
p_object
);
...
...
@@ -207,43 +208,40 @@ wxMenu *PopupMenu::CreateSubMenu( char *psz_var, vlc_object_t *p_object )
{
wxMenu
*
menu
=
new
wxMenu
;
vlc_value_t
val
;
char
*
psz_value
;
vlc_value_t
val_list
;
int
i_type
,
i
;
/* Check the type of the object variable */
i_type
=
var_Type
(
p_object
,
psz_var
);
switch
(
i_type
)
{
case
VLC_VAR_VOID
:
case
VLC_VAR_STRING
:
break
;
default:
break
;
}
if
(
var_Get
(
p_object
,
psz_var
,
&
val
)
<
0
)
{
return
NULL
;
}
psz_value
=
val
.
psz_string
;
if
(
var_Change
(
p_object
,
psz_var
,
VLC_VAR_GETLIST
,
&
val
)
<
0
)
if
(
var_Change
(
p_object
,
psz_var
,
VLC_VAR_GETLIST
,
&
val
_list
)
<
0
)
{
return
NULL
;
}
for
(
i
=
0
;
i
<
val
.
p_list
->
i_count
;
i
++
)
for
(
i
=
0
;
i
<
val
_list
.
p_list
->
i_count
;
i
++
)
{
vlc_value_t
another_val
;
wxMenuItemExt
*
menuitem
;
switch
(
i_type
&
VLC_VAR_TYPE
)
{
case
VLC_VAR_VARIABLE
:
menu
->
Append
(
MenuDummy_Event
,
val_list
.
p_list
->
p_values
[
i
].
psz_string
,
CreateSubMenu
(
val_list
.
p_list
->
p_values
[
i
].
psz_string
,
p_object
),
"YEAAAARRRGGGHHH HEEELLPPPPPP"
);
break
;
case
VLC_VAR_STRING
:
another_val
.
psz_string
=
strdup
(
val
.
p_list
->
p_values
[
i
].
psz_string
);
strdup
(
val
_list
.
p_list
->
p_values
[
i
].
psz_string
);
menuitem
=
new
wxMenuItemExt
(
this
,
i_item_id
++
,
another_val
.
psz_string
,
""
,
wxITEM_RADIO
,
strdup
(
psz_var
),
...
...
@@ -252,7 +250,8 @@ wxMenu *PopupMenu::CreateSubMenu( char *psz_var, vlc_object_t *p_object )
menu
->
Append
(
menuitem
);
if
(
!
strcmp
(
psz_value
,
val
.
p_list
->
p_values
[
i
].
psz_string
)
)
if
(
!
strcmp
(
val
.
psz_string
,
val_list
.
p_list
->
p_values
[
i
].
psz_string
)
)
menu
->
Check
(
i_item_id
-
1
,
TRUE
);
break
;
...
...
@@ -260,12 +259,16 @@ wxMenu *PopupMenu::CreateSubMenu( char *psz_var, vlc_object_t *p_object )
menuitem
=
new
wxMenuItemExt
(
this
,
i_item_id
++
,
wxString
::
Format
(
_
(
"%d"
),
val
.
p_list
->
p_values
[
i
].
i_int
),
val
_list
.
p_list
->
p_values
[
i
].
i_int
),
""
,
wxITEM_RADIO
,
strdup
(
psz_var
),
p_object
->
i_object_id
,
val
.
p_list
->
p_values
[
i
]
);
val
_list
.
p_list
->
p_values
[
i
]
);
menu
->
Append
(
menuitem
);
if
(
!
((
i_type
&
VLC_VAR_FLAGS
)
&
VLC_VAR_ISCOMMAND
)
&&
val_list
.
p_list
->
p_values
[
i
].
i_int
==
val
.
i_int
)
menu
->
Check
(
i_item_id
-
1
,
TRUE
);
break
;
default:
...
...
@@ -273,7 +276,7 @@ wxMenu *PopupMenu::CreateSubMenu( char *psz_var, vlc_object_t *p_object )
}
}
var_Change
(
p_object
,
psz_var
,
VLC_VAR_FREELIST
,
&
val
);
var_Change
(
p_object
,
psz_var
,
VLC_VAR_FREELIST
,
&
val
_list
);
return
menu
;
}
...
...
src/input/input.c
View file @
1171979d
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: input.c,v 1.22
3
2003/0
2/08 22:43:02 massiot
Exp $
* $Id: input.c,v 1.22
4
2003/0
3/11 23:56:54 gbazin
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -126,7 +126,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
p_input
->
stream
.
p_newly_selected_es
=
NULL
;
/* By default there is one area in a stream */
input_AddArea
(
p_input
);
input_AddArea
(
p_input
,
0
,
1
);
p_input
->
stream
.
p_selected_area
=
p_input
->
stream
.
pp_areas
[
0
];
/* Initialize stream control properties. */
...
...
src/input/input_ext-intf.c
View file @
1171979d
...
...
@@ -2,7 +2,7 @@
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_ext-intf.c,v 1.4
7
2003/0
1/21 14:15:05 hartma
n Exp $
* $Id: input_ext-intf.c,v 1.4
8
2003/0
3/11 23:56:54 gbazi
n Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -366,6 +366,7 @@ int input_ChangeArea( input_thread_t * p_input, input_area_t * p_area )
int
input_ChangeProgram
(
input_thread_t
*
p_input
,
uint16_t
i_program_number
)
{
pgrm_descriptor_t
*
p_program
;
vlc_value_t
val
;
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
...
...
@@ -381,6 +382,10 @@ int input_ChangeProgram( input_thread_t * p_input, uint16_t i_program_number )
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
/* Update the navigation variables without triggering a callback */
val
.
i_int
=
i_program_number
;
var_Change
(
p_input
,
"program"
,
VLC_VAR_SETVALUE
,
&
val
);
return
0
;
}
...
...
src/input/input_programs.c
View file @
1171979d
...
...
@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id: input_programs.c,v 1.10
1
2003/0
1/31 11:23:37 massiot
Exp $
* $Id: input_programs.c,v 1.10
2
2003/0
3/11 23:56:54 gbazin
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -39,6 +39,16 @@
* p_input->stream.lock
*/
/* Navigation callbacks */
static
int
ProgramCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
TitleCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ChapterCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
NavigationCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
/*****************************************************************************
* input_InitStream: init the stream descriptor of the given input
*****************************************************************************/
...
...
@@ -72,6 +82,15 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len )
p_input
->
stream
.
p_demux_data
=
NULL
;