Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
295b0e07
Commit
295b0e07
authored
Aug 17, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use var_Inherit* when applicable.
parent
49c2f121
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
42 additions
and
45 deletions
+42
-45
modules/access/alsa.c
modules/access/alsa.c
+3
-3
modules/access/cdda.c
modules/access/cdda.c
+7
-7
modules/access/eyetv.m
modules/access/eyetv.m
+2
-5
modules/access/file.c
modules/access/file.c
+2
-2
modules/access/ftp.c
modules/access/ftp.c
+3
-3
modules/access/mmap.c
modules/access/mmap.c
+1
-1
modules/access/oss.c
modules/access/oss.c
+3
-3
modules/access/pvr.c
modules/access/pvr.c
+15
-15
modules/access/sftp.c
modules/access/sftp.c
+2
-2
modules/access/smb.c
modules/access/smb.c
+3
-3
modules/access/udp.c
modules/access/udp.c
+1
-1
No files found.
modules/access/alsa.c
View file @
295b0e07
...
@@ -247,9 +247,9 @@ static int DemuxOpen( vlc_object_t *p_this )
...
@@ -247,9 +247,9 @@ static int DemuxOpen( vlc_object_t *p_this )
p_demux
->
p_sys
=
p_sys
=
calloc
(
1
,
sizeof
(
demux_sys_t
)
);
p_demux
->
p_sys
=
p_sys
=
calloc
(
1
,
sizeof
(
demux_sys_t
)
);
if
(
p_sys
==
NULL
)
return
VLC_ENOMEM
;
if
(
p_sys
==
NULL
)
return
VLC_ENOMEM
;
p_sys
->
i_sample_rate
=
var_
CreateGe
tInteger
(
p_demux
,
CFG_PREFIX
"samplerate"
);
p_sys
->
i_sample_rate
=
var_
Inheri
tInteger
(
p_demux
,
CFG_PREFIX
"samplerate"
);
p_sys
->
b_stereo
=
var_
CreateGe
tBool
(
p_demux
,
CFG_PREFIX
"stereo"
);
p_sys
->
b_stereo
=
var_
Inheri
tBool
(
p_demux
,
CFG_PREFIX
"stereo"
);
p_sys
->
i_cache
=
var_
CreateGe
tInteger
(
p_demux
,
CFG_PREFIX
"caching"
);
p_sys
->
i_cache
=
var_
Inheri
tInteger
(
p_demux
,
CFG_PREFIX
"caching"
);
p_sys
->
p_es
=
NULL
;
p_sys
->
p_es
=
NULL
;
p_sys
->
p_block
=
NULL
;
p_sys
->
p_block
=
NULL
;
p_sys
->
i_next_demux_date
=
-
1
;
p_sys
->
i_next_demux_date
=
-
1
;
...
...
modules/access/cdda.c
View file @
295b0e07
...
@@ -144,7 +144,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -144,7 +144,7 @@ static int Open( vlc_object_t *p_this )
if
(
!
p_access
->
psz_access
||
!*
p_access
->
psz_access
)
if
(
!
p_access
->
psz_access
||
!*
p_access
->
psz_access
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
psz_name
=
var_
CreateGe
tString
(
p_this
,
"cd-audio"
);
psz_name
=
var_
Inheri
tString
(
p_this
,
"cd-audio"
);
if
(
!
psz_name
||
!*
psz_name
)
if
(
!
psz_name
||
!*
psz_name
)
{
{
free
(
psz_name
);
free
(
psz_name
);
...
@@ -172,7 +172,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -172,7 +172,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
vcddev
=
vcddev
;
p_sys
->
vcddev
=
vcddev
;
/* Do we play a single track ? */
/* Do we play a single track ? */
p_sys
->
i_track
=
var_
CreateGe
tInteger
(
p_access
,
"cdda-track"
)
-
1
;
p_sys
->
i_track
=
var_
Inheri
tInteger
(
p_access
,
"cdda-track"
)
-
1
;
if
(
p_sys
->
i_track
<
0
)
if
(
p_sys
->
i_track
<
0
)
{
{
...
@@ -211,10 +211,10 @@ static int Open( vlc_object_t *p_this )
...
@@ -211,10 +211,10 @@ static int Open( vlc_object_t *p_this )
p_sys
->
waveheader
.
DataChunkID
=
VLC_FOURCC
(
'd'
,
'a'
,
't'
,
'a'
);
p_sys
->
waveheader
.
DataChunkID
=
VLC_FOURCC
(
'd'
,
'a'
,
't'
,
'a'
);
p_sys
->
waveheader
.
DataLength
=
0
;
/* we just don't know */
p_sys
->
waveheader
.
DataLength
=
0
;
/* we just don't know */
p_sys
->
i_first_sector
=
var_
CreateGe
tInteger
(
p_access
,
p_sys
->
i_first_sector
=
var_
Inheri
tInteger
(
p_access
,
"cdda-first-sector"
);
"cdda-first-sector"
);
p_sys
->
i_last_sector
=
var_
CreateGe
tInteger
(
p_access
,
p_sys
->
i_last_sector
=
var_
Inheri
tInteger
(
p_access
,
"cdda-last-sector"
);
"cdda-last-sector"
);
/* Tracknumber in MRL */
/* Tracknumber in MRL */
if
(
p_sys
->
i_first_sector
<
0
||
p_sys
->
i_last_sector
<
0
)
if
(
p_sys
->
i_first_sector
<
0
||
p_sys
->
i_last_sector
<
0
)
{
{
...
@@ -606,7 +606,7 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
...
@@ -606,7 +606,7 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
#ifdef HAVE_LIBCDDB
#ifdef HAVE_LIBCDDB
static
cddb_disc_t
*
GetCDDBInfo
(
access_t
*
p_access
,
int
i_titles
,
int
*
p_sectors
)
static
cddb_disc_t
*
GetCDDBInfo
(
access_t
*
p_access
,
int
i_titles
,
int
*
p_sectors
)
{
{
if
(
var_
CreateGe
tInteger
(
p_access
,
"album-art"
)
==
ALBUM_ART_WHEN_ASKED
)
if
(
var_
Inheri
tInteger
(
p_access
,
"album-art"
)
==
ALBUM_ART_WHEN_ASKED
)
return
NULL
;
return
NULL
;
/* */
/* */
...
...
modules/access/eyetv.m
View file @
295b0e07
...
@@ -167,13 +167,10 @@ static int Open( vlc_object_t *p_this )
...
@@ -167,13 +167,10 @@ static int Open( vlc_object_t *p_this )
if
(
!
p_sys
)
if
(
!
p_sys
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
p_sys
->
i_pts_delay
=
var_CreateGetInteger
(
p_access
,
"eyetv-caching"
);
p_sys
->
i_pts_delay
=
var_InheritInteger
(
p_access
,
"eyetv-caching"
);
int
val
=
var_CreateGetInteger
(
p_access
,
"eyetv-channel"
);
msg_Dbg
(
p_access
,
"coming up"
);
msg_Dbg
(
p_access
,
"coming up"
);
selectChannel
(
p_this
,
var_InheritInteger
(
p_access
,
"eyetv-channel"
)
);
selectChannel
(
p_this
,
val
);
/* socket */
/* socket */
memset
(
&
publicAddr
,
0
,
sizeof
(
publicAddr
));
memset
(
&
publicAddr
,
0
,
sizeof
(
publicAddr
));
...
...
modules/access/file.c
View file @
295b0e07
...
@@ -216,9 +216,9 @@ int Open( vlc_object_t *p_this )
...
@@ -216,9 +216,9 @@ int Open( vlc_object_t *p_this )
p_access
->
p_sys
=
p_sys
;
p_access
->
p_sys
=
p_sys
;
p_sys
->
i_nb_reads
=
0
;
p_sys
->
i_nb_reads
=
0
;
p_sys
->
fd
=
fd
;
p_sys
->
fd
=
fd
;
p_sys
->
caching
=
var_
CreateGe
tInteger
(
p_access
,
"file-caching"
);
p_sys
->
caching
=
var_
Inheri
tInteger
(
p_access
,
"file-caching"
);
if
(
IsRemote
(
fd
))
if
(
IsRemote
(
fd
))
p_sys
->
caching
+=
var_
CreateGe
tInteger
(
p_access
,
"network-caching"
);
p_sys
->
caching
+=
var_
Inheri
tInteger
(
p_access
,
"network-caching"
);
p_sys
->
b_pace_control
=
true
;
p_sys
->
b_pace_control
=
true
;
if
(
S_ISREG
(
st
.
st_mode
))
if
(
S_ISREG
(
st
.
st_mode
))
...
...
modules/access/ftp.c
View file @
295b0e07
...
@@ -156,7 +156,7 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
...
@@ -156,7 +156,7 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
if
(
p_sys
->
url
.
psz_username
&&
*
p_sys
->
url
.
psz_username
)
if
(
p_sys
->
url
.
psz_username
&&
*
p_sys
->
url
.
psz_username
)
psz
=
strdup
(
p_sys
->
url
.
psz_username
);
psz
=
strdup
(
p_sys
->
url
.
psz_username
);
else
else
psz
=
var_
CreateGe
tString
(
p_access
,
"ftp-user"
);
psz
=
var_
Inheri
tString
(
p_access
,
"ftp-user"
);
if
(
!
psz
)
if
(
!
psz
)
return
-
1
;
return
-
1
;
...
@@ -178,7 +178,7 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
...
@@ -178,7 +178,7 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
if
(
p_sys
->
url
.
psz_password
&&
*
p_sys
->
url
.
psz_password
)
if
(
p_sys
->
url
.
psz_password
&&
*
p_sys
->
url
.
psz_password
)
psz
=
strdup
(
p_sys
->
url
.
psz_password
);
psz
=
strdup
(
p_sys
->
url
.
psz_password
);
else
else
psz
=
var_
CreateGe
tString
(
p_access
,
"ftp-pwd"
);
psz
=
var_
Inheri
tString
(
p_access
,
"ftp-pwd"
);
if
(
!
psz
)
if
(
!
psz
)
return
-
1
;
return
-
1
;
...
@@ -197,7 +197,7 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
...
@@ -197,7 +197,7 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
break
;
break
;
case
3
:
case
3
:
msg_Dbg
(
p_access
,
"account needed"
);
msg_Dbg
(
p_access
,
"account needed"
);
psz
=
var_
CreateGe
tString
(
p_access
,
"ftp-account"
);
psz
=
var_
Inheri
tString
(
p_access
,
"ftp-account"
);
if
(
ftp_SendCommand
(
p_access
,
p_sys
,
"ACCT %s"
,
if
(
ftp_SendCommand
(
p_access
,
p_sys
,
"ACCT %s"
,
psz
)
<
0
||
psz
)
<
0
||
ftp_ReadCommand
(
p_access
,
p_sys
,
&
i_answer
,
NULL
)
<
0
)
ftp_ReadCommand
(
p_access
,
p_sys
,
&
i_answer
,
NULL
)
<
0
)
...
...
modules/access/mmap.c
View file @
295b0e07
...
@@ -88,7 +88,7 @@ static int Open (vlc_object_t *p_this)
...
@@ -88,7 +88,7 @@ static int Open (vlc_object_t *p_this)
assert
((
INT64_C
(
1
)
<<
63
)
==
((
off_t
)(
INT64_C
(
1
)
<<
63
)));
assert
((
INT64_C
(
1
)
<<
63
)
==
((
off_t
)(
INT64_C
(
1
)
<<
63
)));
if
(
!
var_
CreateGe
tBool
(
p_this
,
"file-mmap"
))
if
(
!
var_
Inheri
tBool
(
p_this
,
"file-mmap"
))
return
VLC_EGENERIC
;
/* disabled */
return
VLC_EGENERIC
;
/* disabled */
STANDARD_BLOCK_ACCESS_INIT
;
STANDARD_BLOCK_ACCESS_INIT
;
...
...
modules/access/oss.c
View file @
295b0e07
...
@@ -170,9 +170,9 @@ static int DemuxOpen( vlc_object_t *p_this )
...
@@ -170,9 +170,9 @@ static int DemuxOpen( vlc_object_t *p_this )
p_demux
->
p_sys
=
p_sys
=
calloc
(
1
,
sizeof
(
demux_sys_t
)
);
p_demux
->
p_sys
=
p_sys
=
calloc
(
1
,
sizeof
(
demux_sys_t
)
);
if
(
p_sys
==
NULL
)
return
VLC_ENOMEM
;
if
(
p_sys
==
NULL
)
return
VLC_ENOMEM
;
p_sys
->
i_sample_rate
=
var_
CreateGe
tInteger
(
p_demux
,
CFG_PREFIX
"samplerate"
);
p_sys
->
i_sample_rate
=
var_
Inheri
tInteger
(
p_demux
,
CFG_PREFIX
"samplerate"
);
p_sys
->
b_stereo
=
var_
CreateGe
tBool
(
p_demux
,
CFG_PREFIX
"stereo"
);
p_sys
->
b_stereo
=
var_
Inheri
tBool
(
p_demux
,
CFG_PREFIX
"stereo"
);
p_sys
->
i_cache
=
var_
CreateGe
tInteger
(
p_demux
,
CFG_PREFIX
"caching"
);
p_sys
->
i_cache
=
var_
Inheri
tInteger
(
p_demux
,
CFG_PREFIX
"caching"
);
p_sys
->
i_fd
=
-
1
;
p_sys
->
i_fd
=
-
1
;
p_sys
->
p_es
=
NULL
;
p_sys
->
p_es
=
NULL
;
p_sys
->
p_block
=
NULL
;
p_sys
->
p_block
=
NULL
;
...
...
modules/access/pvr.c
View file @
295b0e07
...
@@ -560,21 +560,21 @@ static int Open( vlc_object_t * p_this )
...
@@ -560,21 +560,21 @@ static int Open( vlc_object_t * p_this )
/* defaults values */
/* defaults values */
var_Create
(
p_access
,
"pvr-caching"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_access
,
"pvr-caching"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
p_sys
->
psz_videodev
=
var_
CreateGe
tString
(
p_access
,
"pvr-device"
);
p_sys
->
psz_videodev
=
var_
Inheri
tString
(
p_access
,
"pvr-device"
);
p_sys
->
psz_radiodev
=
var_
CreateGe
tString
(
p_access
,
"pvr-radio-device"
);
p_sys
->
psz_radiodev
=
var_
Inheri
tString
(
p_access
,
"pvr-radio-device"
);
p_sys
->
i_standard
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-norm"
);
p_sys
->
i_standard
=
var_
Inheri
tInteger
(
p_access
,
"pvr-norm"
);
p_sys
->
i_width
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-width"
);
p_sys
->
i_width
=
var_
Inheri
tInteger
(
p_access
,
"pvr-width"
);
p_sys
->
i_height
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-height"
);
p_sys
->
i_height
=
var_
Inheri
tInteger
(
p_access
,
"pvr-height"
);
p_sys
->
i_frequency
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-frequency"
);
p_sys
->
i_frequency
=
var_
Inheri
tInteger
(
p_access
,
"pvr-frequency"
);
p_sys
->
i_framerate
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-framerate"
);
p_sys
->
i_framerate
=
var_
Inheri
tInteger
(
p_access
,
"pvr-framerate"
);
p_sys
->
i_keyint
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-keyint"
);
p_sys
->
i_keyint
=
var_
Inheri
tInteger
(
p_access
,
"pvr-keyint"
);
p_sys
->
i_bframes
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-bframes"
);
p_sys
->
i_bframes
=
var_
Inheri
tInteger
(
p_access
,
"pvr-bframes"
);
p_sys
->
i_bitrate
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-bitrate"
);
p_sys
->
i_bitrate
=
var_
Inheri
tInteger
(
p_access
,
"pvr-bitrate"
);
p_sys
->
i_bitrate_peak
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-bitrate-peak"
);
p_sys
->
i_bitrate_peak
=
var_
Inheri
tInteger
(
p_access
,
"pvr-bitrate-peak"
);
p_sys
->
i_bitrate_mode
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-bitrate-mode"
);
p_sys
->
i_bitrate_mode
=
var_
Inheri
tInteger
(
p_access
,
"pvr-bitrate-mode"
);
p_sys
->
i_audio_bitmask
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-audio-bitmask"
);
p_sys
->
i_audio_bitmask
=
var_
Inheri
tInteger
(
p_access
,
"pvr-audio-bitmask"
);
p_sys
->
i_volume
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-audio-volume"
);
p_sys
->
i_volume
=
var_
Inheri
tInteger
(
p_access
,
"pvr-audio-volume"
);
p_sys
->
i_input
=
var_
CreateGe
tInteger
(
p_access
,
"pvr-channel"
);
p_sys
->
i_input
=
var_
Inheri
tInteger
(
p_access
,
"pvr-channel"
);
/* parse command line options */
/* parse command line options */
psz_tofree
=
strdup
(
p_access
->
psz_location
);
psz_tofree
=
strdup
(
p_access
->
psz_location
);
...
...
modules/access/sftp.c
View file @
295b0e07
...
@@ -142,7 +142,7 @@ static int Open( vlc_object_t* p_this )
...
@@ -142,7 +142,7 @@ static int Open( vlc_object_t* p_this )
}
}
if
(
url
.
i_port
<=
0
)
if
(
url
.
i_port
<=
0
)
i_port
=
var_
CreateGe
tInteger
(
p_access
,
"sftp-port"
);
i_port
=
var_
Inheri
tInteger
(
p_access
,
"sftp-port"
);
else
else
i_port
=
url
.
i_port
;
i_port
=
url
.
i_port
;
...
@@ -209,7 +209,7 @@ static int Open( vlc_object_t* p_this )
...
@@ -209,7 +209,7 @@ static int Open( vlc_object_t* p_this )
/* Create the two variables */
/* Create the two variables */
var_Create
(
p_access
,
"sftp-caching"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_access
,
"sftp-caching"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
p_sys
->
i_read_size
=
var_
CreateGe
tInteger
(
p_access
,
"sftp-readsize"
);
p_sys
->
i_read_size
=
var_
Inheri
tInteger
(
p_access
,
"sftp-readsize"
);
free
(
psz_password
);
free
(
psz_password
);
free
(
psz_username
);
free
(
psz_username
);
...
...
modules/access/smb.c
View file @
295b0e07
...
@@ -184,11 +184,11 @@ static int Open( vlc_object_t *p_this )
...
@@ -184,11 +184,11 @@ static int Open( vlc_object_t *p_this )
/* Build an SMB URI
/* Build an SMB URI
* smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
* smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
if
(
!
psz_user
)
psz_user
=
var_
CreateGe
tString
(
p_access
,
"smb-user"
);
if
(
!
psz_user
)
psz_user
=
var_
Inheri
tString
(
p_access
,
"smb-user"
);
if
(
psz_user
&&
!*
psz_user
)
{
free
(
psz_user
);
psz_user
=
NULL
;
}
if
(
psz_user
&&
!*
psz_user
)
{
free
(
psz_user
);
psz_user
=
NULL
;
}
if
(
!
psz_pwd
)
psz_pwd
=
var_
CreateGe
tString
(
p_access
,
"smb-pwd"
);
if
(
!
psz_pwd
)
psz_pwd
=
var_
Inheri
tString
(
p_access
,
"smb-pwd"
);
if
(
psz_pwd
&&
!*
psz_pwd
)
{
free
(
psz_pwd
);
psz_pwd
=
NULL
;
}
if
(
psz_pwd
&&
!*
psz_pwd
)
{
free
(
psz_pwd
);
psz_pwd
=
NULL
;
}
if
(
!
psz_domain
)
psz_domain
=
var_
CreateGe
tString
(
p_access
,
"smb-domain"
);
if
(
!
psz_domain
)
psz_domain
=
var_
Inheri
tString
(
p_access
,
"smb-domain"
);
if
(
psz_domain
&&
!*
psz_domain
)
{
free
(
psz_domain
);
psz_domain
=
NULL
;
}
if
(
psz_domain
&&
!*
psz_domain
)
{
free
(
psz_domain
);
psz_domain
=
NULL
;
}
#ifdef WIN32
#ifdef WIN32
...
...
modules/access/udp.c
View file @
295b0e07
...
@@ -110,7 +110,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -110,7 +110,7 @@ static int Open( vlc_object_t *p_this )
}
}
}
}
i_bind_port
=
var_
CreateGe
tInteger
(
p_access
,
"server-port"
);
i_bind_port
=
var_
Inheri
tInteger
(
p_access
,
"server-port"
);
/* Parse psz_name syntax :
/* Parse psz_name syntax :
* [serveraddr[:serverport]][@[bindaddr]:[bindport]] */
* [serveraddr[:serverport]][@[bindaddr]:[bindport]] */
...
...
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