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
6767b442
Commit
6767b442
authored
Jul 11, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store configuration integer as 64-bits values
parent
f8d899e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
19 deletions
+14
-19
include/vlc_configuration.h
include/vlc_configuration.h
+5
-11
modules/control/rc.c
modules/control/rc.c
+3
-3
src/config/core.c
src/config/core.c
+4
-3
src/libvlc.c
src/libvlc.c
+2
-2
No files found.
include/vlc_configuration.h
View file @
6767b442
...
...
@@ -137,16 +137,10 @@ struct config_category_t
typedef
union
{
char
*
psz
;
int
i
;
int
64_t
i
;
float
f
;
}
module_value_t
;
typedef
union
{
int
i
;
float
f
;
}
module_nvalue_t
;
struct
module_config_t
{
char
*
psz_type
;
/* Configuration subtype */
...
...
@@ -156,8 +150,8 @@ struct module_config_t
module_value_t
value
;
/* Option value */
module_value_t
orig
;
module_value_t
saved
;
module_
n
value_t
min
;
module_
n
value_t
max
;
module_value_t
min
;
module_value_t
max
;
/* Function to call when commiting a change */
vlc_callback_t
pf_callback
;
...
...
@@ -199,8 +193,8 @@ struct module_config_t
* data.
*****************************************************************************/
VLC_EXPORT
(
int
,
config_GetType
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
config_GetInt
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
config_PutInt
,
(
vlc_object_t
*
,
const
char
*
,
int
)
);
VLC_EXPORT
(
int
64_t
,
config_GetInt
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
config_PutInt
,
(
vlc_object_t
*
,
const
char
*
,
int
64_t
)
);
VLC_EXPORT
(
float
,
config_GetFloat
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
config_PutFloat
,
(
vlc_object_t
*
,
const
char
*
,
float
)
);
VLC_EXPORT
(
char
*
,
config_GetPsz
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
...
...
modules/control/rc.c
View file @
6767b442
...
...
@@ -499,7 +499,7 @@ static void Run( intf_thread_t *p_intf )
msg_rc
(
STATUS_CHANGE
"( new input: %s )"
,
psz_uri
);
free
(
psz_uri
);
msg_rc
(
STATUS_CHANGE
"( audio volume: %d )"
,
config_GetInt
(
p_intf
,
"volume"
));
(
int
)
config_GetInt
(
p_intf
,
"volume"
));
}
var_AddCallback
(
p_input
,
"intf-event"
,
InputEvent
,
p_intf
);
}
...
...
@@ -900,7 +900,7 @@ static int VolumeChanged( vlc_object_t *p_this, char const *psz_cmd,
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
status_lock
);
msg_rc
(
STATUS_CHANGE
"( audio volume: %d )"
,
config_GetInt
(
p_this
,
"volume"
)
);
(
int
)
config_GetInt
(
p_this
,
"volume"
)
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
status_lock
);
return
VLC_SUCCESS
;
}
...
...
@@ -1414,7 +1414,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
msg_rc
(
STATUS_CHANGE
"( new input: %s )"
,
psz_uri
);
free
(
psz_uri
);
msg_rc
(
STATUS_CHANGE
"( audio volume: %d )"
,
config_GetInt
(
p_intf
,
"volume"
));
(
int
)
config_GetInt
(
p_intf
,
"volume"
));
PL_LOCK
;
int
status
=
playlist_Status
(
p_playlist
);
...
...
src/config/core.c
View file @
6767b442
...
...
@@ -141,7 +141,7 @@ int config_GetType( vlc_object_t *p_this, const char *psz_name )
* represented by an integer (CONFIG_ITEM_INTEGER and
* CONFIG_ITEM_BOOL).
*****************************************************************************/
int
config_GetInt
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
int
64_t
config_GetInt
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
{
module_config_t
*
p_config
;
...
...
@@ -160,7 +160,7 @@ int config_GetInt( vlc_object_t *p_this, const char *psz_name )
return
-
1
;
}
int
val
;
int
64_t
val
;
vlc_rwlock_rdlock
(
&
config_lock
);
val
=
p_config
->
value
.
i
;
...
...
@@ -306,7 +306,8 @@ void config_PutPsz( vlc_object_t *p_this,
* represented by an integer (CONFIG_ITEM_INTEGER and
* CONFIG_ITEM_BOOL).
*****************************************************************************/
void
config_PutInt
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
int
i_value
)
void
config_PutInt
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
int64_t
i_value
)
{
module_config_t
*
p_config
;
vlc_value_t
oldval
;
...
...
src/libvlc.c
View file @
6767b442
...
...
@@ -1542,8 +1542,8 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search )
if
(
p_item
->
min
.
i
||
p_item
->
max
.
i
)
{
sprintf
(
psz_buffer
,
"%s [%
i .. %i]"
,
psz_type
,
p_item
->
min
.
i
,
p_item
->
max
.
i
);
sprintf
(
psz_buffer
,
"%s [%
"
PRId64
" .. %"
PRId64
"]"
,
p
sz_type
,
p
_item
->
min
.
i
,
p_item
->
max
.
i
);
psz_type
=
psz_buffer
;
}
...
...
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