Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
f39d8331
Commit
f39d8331
authored
Jan 30, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for DVD-VD .ifo files
parent
3a348579
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
5 deletions
+43
-5
modules/demux/playlist/ifo.c
modules/demux/playlist/ifo.c
+43
-5
No files found.
modules/demux/playlist/ifo.c
View file @
f39d8331
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* Local prototypes
* Local prototypes
*****************************************************************************/
*****************************************************************************/
static
int
Demux
(
demux_t
*
p_demux
);
static
int
Demux
(
demux_t
*
p_demux
);
static
int
DemuxDVD_VR
(
demux_t
*
p_demux
);
static
int
Control
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
);
static
int
Control
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
);
/*****************************************************************************
/*****************************************************************************
...
@@ -46,13 +47,14 @@ int Import_IFO( vlc_object_t *p_this )
...
@@ -46,13 +47,14 @@ int Import_IFO( vlc_object_t *p_this )
{
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
char
*
psz_file
=
p_demux
->
psz_path
+
strlen
(
p_demux
->
psz_path
)
size_t
len
=
strlen
(
p_demux
->
psz_path
);
-
strlen
(
"VIDEO_TS.IFO"
);
/* Valid filenamed are :
char
*
psz_file
=
p_demux
->
psz_path
+
len
-
strlen
(
"VIDEO_TS.IFO"
);
/* Valid filenames are :
* - VIDEO_TS.IFO
* - VIDEO_TS.IFO
* - VTS_XX_X.IFO where X are digits
* - VTS_XX_X.IFO where X are digits
*/
*/
if
(
strlen
(
p_demux
->
psz_path
)
>
strlen
(
"VIDEO_TS.IFO"
)
if
(
len
>
strlen
(
"VIDEO_TS.IFO"
)
&&
(
!
strcasecmp
(
psz_file
,
"VIDEO_TS.IFO"
)
&&
(
!
strcasecmp
(
psz_file
,
"VIDEO_TS.IFO"
)
||
(
!
strncasecmp
(
psz_file
,
"VTS_"
,
4
)
||
(
!
strncasecmp
(
psz_file
,
"VTS_"
,
4
)
&&
!
strcasecmp
(
psz_file
+
strlen
(
"VTS_00_0"
)
,
".IFO"
)
)
)
)
&&
!
strcasecmp
(
psz_file
+
strlen
(
"VTS_00_0"
)
,
".IFO"
)
)
)
)
...
@@ -63,13 +65,26 @@ int Import_IFO( vlc_object_t *p_this )
...
@@ -63,13 +65,26 @@ int Import_IFO( vlc_object_t *p_this )
if
(
i_peek
!=
8
||
memcmp
(
p_peek
,
"DVDVIDEO"
,
8
)
)
if
(
i_peek
!=
8
||
memcmp
(
p_peek
,
"DVDVIDEO"
,
8
)
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
p_demux
->
pf_demux
=
Demux
;
}
/* Valid filename for DVD-VR is VR_MANGR.IFO */
else
if
(
len
>=
12
&&
!
strcmp
(
&
p_demux
->
psz_path
[
len
-
12
],
"VR_MANGR.IFO"
)
)
{
int
i_peek
;
const
uint8_t
*
p_peek
;
i_peek
=
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
8
);
if
(
i_peek
!=
8
||
memcmp
(
p_peek
,
"DVD_RTR_"
,
8
)
)
return
VLC_EGENERIC
;
p_demux
->
pf_demux
=
DemuxDVD_VR
;
}
}
else
else
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
// STANDARD_DEMUX_INIT_MSG( "found valid VIDEO_TS.IFO" )
// STANDARD_DEMUX_INIT_MSG( "found valid VIDEO_TS.IFO" )
p_demux
->
pf_control
=
Control
;
p_demux
->
pf_control
=
Control
;
p_demux
->
pf_demux
=
Demux
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -104,6 +119,29 @@ static int Demux( demux_t *p_demux )
...
@@ -104,6 +119,29 @@ static int Demux( demux_t *p_demux )
return
0
;
/* Needed for correct operation of go back */
return
0
;
/* Needed for correct operation of go back */
}
}
static
int
DemuxDVD_VR
(
demux_t
*
p_demux
)
{
char
*
psz_url
=
strdup
(
p_demux
->
psz_path
);
if
(
!
psz_url
)
return
0
;
size_t
len
=
strlen
(
psz_url
);
strncpy
(
psz_url
+
len
-
12
,
"VR_MOVIE.VRO"
,
12
);
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
input_item_t
*
p_input
=
input_item_New
(
p_demux
,
psz_url
,
psz_url
);
input_item_AddSubItem
(
p_current_input
,
p_input
);
vlc_gc_decref
(
p_input
);
vlc_gc_decref
(
p_current_input
);
free
(
psz_url
);
return
0
;
/* Needed for correct operation of go back */
}
static
int
Control
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
)
static
int
Control
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
)
{
{
VLC_UNUSED
(
p_demux
);
VLC_UNUSED
(
i_query
);
VLC_UNUSED
(
args
);
VLC_UNUSED
(
p_demux
);
VLC_UNUSED
(
i_query
);
VLC_UNUSED
(
args
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment