Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
beda2783
Commit
beda2783
authored
Oct 14, 2001
by
Stéphane Borel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use of an environment variable to choose libdvdcss method.
parent
88a15495
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
28 deletions
+26
-28
extras/libdvdcss/css.c
extras/libdvdcss/css.c
+2
-2
extras/libdvdcss/libdvdcss.c
extras/libdvdcss/libdvdcss.c
+21
-3
extras/libdvdcss/videolan/dvdcss.h
extras/libdvdcss/videolan/dvdcss.h
+1
-2
include/config.h.in
include/config.h.in
+1
-1
plugins/dvd/input_dvd.c
plugins/dvd/input_dvd.c
+1
-20
No files found.
extras/libdvdcss/css.c
View file @
beda2783
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* css.c: Functions for DVD authentification and unscrambling
* css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* Copyright (C) 1999-2001 VideoLAN
* $Id: css.c,v 1.1
0 2001/10/13 15:34:21
stef Exp $
* $Id: css.c,v 1.1
1 2001/10/14 03:26:20
stef Exp $
*
*
* Author: Stphane Borel <stef@via.ecp.fr>
* Author: Stphane Borel <stef@via.ecp.fr>
* Hkan Hjort <d95hjort@dtek.chalmers.se>
* Hkan Hjort <d95hjort@dtek.chalmers.se>
...
@@ -494,7 +494,7 @@ int CSSGetTitleKey( dvdcss_handle dvdcss, int i_pos )
...
@@ -494,7 +494,7 @@ int CSSGetTitleKey( dvdcss_handle dvdcss, int i_pos )
memcpy
(
dvdcss
->
css
.
p_title_key
,
p_key
,
sizeof
(
dvd_key_t
)
);
memcpy
(
dvdcss
->
css
.
p_title_key
,
p_key
,
sizeof
(
dvd_key_t
)
);
return
0
;
return
0
;
}
// ( dvdcss->i_method == DVDCSS_TITLE
CRACK
) || ( dvdcss->b_ioctls == 0 )
}
// ( dvdcss->i_method == DVDCSS_TITLE ) || ( dvdcss->b_ioctls == 0 )
}
}
/*****************************************************************************
/*****************************************************************************
...
...
extras/libdvdcss/libdvdcss.c
View file @
beda2783
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* libdvdcss.c: DVD reading library.
* libdvdcss.c: DVD reading library.
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: libdvdcss.c,v 1.1
6 2001/10/13 15:34:21
stef Exp $
* $Id: libdvdcss.c,v 1.1
7 2001/10/14 03:26:20
stef Exp $
*
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Authors: Stphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
...
@@ -80,10 +80,12 @@ static int _win32_dvdcss_aread ( int i_fd, void *p_data, int i_blocks );
...
@@ -80,10 +80,12 @@ static int _win32_dvdcss_aread ( int i_fd, void *p_data, int i_blocks );
/*****************************************************************************
/*****************************************************************************
* dvdcss_open: initialize library, open a DVD device, crack CSS key
* dvdcss_open: initialize library, open a DVD device, crack CSS key
*****************************************************************************/
*****************************************************************************/
extern
dvdcss_handle
dvdcss_open
(
char
*
psz_target
,
int
i_
method
,
int
i_
flags
)
extern
dvdcss_handle
dvdcss_open
(
char
*
psz_target
,
int
i_flags
)
{
{
int
i_ret
;
int
i_ret
;
char
psz_method
[
16
]
=
"dvdcss_method"
;
dvdcss_handle
dvdcss
;
dvdcss_handle
dvdcss
;
/* Allocate the library structure */
/* Allocate the library structure */
...
@@ -102,9 +104,25 @@ extern dvdcss_handle dvdcss_open ( char *psz_target, int i_method, int i_flags )
...
@@ -102,9 +104,25 @@ extern dvdcss_handle dvdcss_open ( char *psz_target, int i_method, int i_flags )
dvdcss
->
p_titles
=
NULL
;
dvdcss
->
p_titles
=
NULL
;
dvdcss
->
b_debug
=
i_flags
&
DVDCSS_INIT_DEBUG
;
dvdcss
->
b_debug
=
i_flags
&
DVDCSS_INIT_DEBUG
;
dvdcss
->
b_errors
=
!
(
i_flags
&
DVDCSS_INIT_QUIET
);
dvdcss
->
b_errors
=
!
(
i_flags
&
DVDCSS_INIT_QUIET
);
dvdcss
->
i_method
=
i_method
;
dvdcss
->
psz_error
=
"no error"
;
dvdcss
->
psz_error
=
"no error"
;
/* find method from DVDCSS_METHOD environment variable */
dvdcss
->
i_method
=
DVDCSS_TITLE
;
if
(
getenv
(
psz_method
)
)
{
if
(
!
strncmp
(
getenv
(
psz_method
),
"key"
,
3
)
)
{
dvdcss
->
i_method
=
DVDCSS_KEY
;
}
else
if
(
!
strncmp
(
getenv
(
psz_method
),
"disc"
,
4
)
)
{
dvdcss
->
i_method
=
DVDCSS_DISC
;
}
}
i_ret
=
_dvdcss_open
(
dvdcss
,
psz_target
);
i_ret
=
_dvdcss_open
(
dvdcss
,
psz_target
);
if
(
i_ret
<
0
)
if
(
i_ret
<
0
)
{
{
...
...
extras/libdvdcss/videolan/dvdcss.h
View file @
beda2783
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* libdvdcss.h: DVD reading library, exported functions.
* libdvdcss.h: DVD reading library, exported functions.
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvdcss.h,v 1.
6 2001/10/13 15:34:21
stef Exp $
* $Id: dvdcss.h,v 1.
7 2001/10/14 03:26:20
stef Exp $
*
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Authors: Stphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
...
@@ -53,7 +53,6 @@ typedef struct dvdcss_s* dvdcss_handle;
...
@@ -53,7 +53,6 @@ typedef struct dvdcss_s* dvdcss_handle;
* Exported prototypes
* Exported prototypes
*****************************************************************************/
*****************************************************************************/
extern
dvdcss_handle
dvdcss_open
(
char
*
psz_target
,
extern
dvdcss_handle
dvdcss_open
(
char
*
psz_target
,
int
i_method
,
int
i_flags
);
int
i_flags
);
extern
int
dvdcss_close
(
dvdcss_handle
);
extern
int
dvdcss_close
(
dvdcss_handle
);
extern
int
dvdcss_title
(
dvdcss_handle
,
extern
int
dvdcss_title
(
dvdcss_handle
,
...
...
include/config.h.in
View file @
beda2783
...
@@ -220,7 +220,7 @@
...
@@ -220,7 +220,7 @@
#define INPUT_AUDIO_VAR "vlc_input_audio"
#define INPUT_AUDIO_VAR "vlc_input_audio"
#define INPUT_CHANNEL_VAR "vlc_input_channel"
#define INPUT_CHANNEL_VAR "vlc_input_channel"
#define INPUT_SUBTITLE_VAR "vlc_input_subtitle"
#define INPUT_SUBTITLE_VAR "vlc_input_subtitle"
#define INPUT_DVDCSS_VAR "
vlc_input_dvdcss
"
#define INPUT_DVDCSS_VAR "
dvdcss_method
"
#define INPUT_DVDCSS_DEFAULT "title"
#define INPUT_DVDCSS_DEFAULT "title"
/* VCD defaults */
/* VCD defaults */
...
...
plugins/dvd/input_dvd.c
View file @
beda2783
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* -dvd_udf to find files
* -dvd_udf to find files
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.8
8 2001/10/13 15:34:21
stef Exp $
* $Id: input_dvd.c,v 1.8
9 2001/10/14 03:26:20
stef Exp $
*
*
* Author: Stphane Borel <stef@via.ecp.fr>
* Author: Stphane Borel <stef@via.ecp.fr>
*
*
...
@@ -306,8 +306,6 @@ static void DVDInit( input_thread_t * p_input )
...
@@ -306,8 +306,6 @@ static void DVDInit( input_thread_t * p_input )
static
void
DVDOpen
(
struct
input_thread_s
*
p_input
)
static
void
DVDOpen
(
struct
input_thread_s
*
p_input
)
{
{
dvdcss_handle
dvdhandle
;
dvdcss_handle
dvdhandle
;
char
*
psz_method
;
int
i_method
;
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
...
@@ -322,32 +320,15 @@ static void DVDOpen( struct input_thread_s *p_input )
...
@@ -322,32 +320,15 @@ static void DVDOpen( struct input_thread_s *p_input )
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
/* XXX: put this shit in an access plugin */
/* XXX: put this shit in an access plugin */
psz_method
=
main_GetPszVariable
(
INPUT_DVDCSS_VAR
,
INPUT_DVDCSS_DEFAULT
);
if
(
!
strncmp
(
psz_method
,
"key"
,
3
)
)
{
i_method
=
DVDCSS_KEY
;
}
else
if
(
!
strncmp
(
psz_method
,
"disc"
,
4
)
)
{
i_method
=
DVDCSS_DISC
;
}
else
{
i_method
=
DVDCSS_TITLE
;
}
if
(
strlen
(
p_input
->
p_source
)
>
4
if
(
strlen
(
p_input
->
p_source
)
>
4
&&
!
strncasecmp
(
p_input
->
p_source
,
"dvd:"
,
4
)
)
&&
!
strncasecmp
(
p_input
->
p_source
,
"dvd:"
,
4
)
)
{
{
dvdhandle
=
dvdcss_open
(
p_input
->
p_source
+
4
,
dvdhandle
=
dvdcss_open
(
p_input
->
p_source
+
4
,
i_method
,
DVDCSS_INIT_QUIET
);
DVDCSS_INIT_QUIET
);
}
}
else
else
{
{
dvdhandle
=
dvdcss_open
(
p_input
->
p_source
,
dvdhandle
=
dvdcss_open
(
p_input
->
p_source
,
i_method
,
DVDCSS_INIT_QUIET
);
DVDCSS_INIT_QUIET
);
}
}
...
...
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