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
bc605af3
Commit
bc605af3
authored
Mar 09, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove var_Get/Set in input.c
parent
bf7bfa8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
28 deletions
+19
-28
src/input/input.c
src/input/input.c
+19
-28
No files found.
src/input/input.c
View file @
bc605af3
...
@@ -121,7 +121,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
...
@@ -121,7 +121,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
{
{
static
const
char
input_name
[]
=
"input"
;
static
const
char
input_name
[]
=
"input"
;
input_thread_t
*
p_input
=
NULL
;
/* thread descriptor */
input_thread_t
*
p_input
=
NULL
;
/* thread descriptor */
vlc_value_t
val
;
int
i
;
int
i
;
/* Allocate descriptor */
/* Allocate descriptor */
...
@@ -228,12 +227,12 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
...
@@ -228,12 +227,12 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
/* */
/* */
if
(
!
p_input
->
b_preparsing
)
if
(
!
p_input
->
b_preparsing
)
{
{
var_Get
(
p_input
,
"bookmarks"
,
&
val
);
char
*
psz_bookmarks
=
var_GetNonEmptyString
(
p_input
,
"bookmarks"
);
if
(
val
.
psz_string
)
if
(
psz_bookmarks
)
{
{
/* FIXME: have a common cfg parsing routine used by sout and others */
/* FIXME: have a common cfg parsing routine used by sout and others */
char
*
psz_parser
,
*
psz_start
,
*
psz_end
;
char
*
psz_parser
,
*
psz_start
,
*
psz_end
;
psz_parser
=
val
.
psz_string
;
psz_parser
=
psz_bookmarks
;
while
(
(
psz_start
=
strchr
(
psz_parser
,
'{'
)
)
)
while
(
(
psz_start
=
strchr
(
psz_parser
,
'{'
)
)
)
{
{
seekpoint_t
*
p_seekpoint
;
seekpoint_t
*
p_seekpoint
;
...
@@ -272,7 +271,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
...
@@ -272,7 +271,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
vlc_seekpoint_Delete
(
p_seekpoint
);
vlc_seekpoint_Delete
(
p_seekpoint
);
*
psz_parser
=
backup
;
*
psz_parser
=
backup
;
}
}
free
(
val
.
psz_string
);
free
(
psz_bookmarks
);
}
}
}
}
...
@@ -584,10 +583,8 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
...
@@ -584,10 +583,8 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
if
(
i_ret
==
0
)
/* EOF */
if
(
i_ret
==
0
)
/* EOF */
{
{
vlc_value_t
repeat
;
int
i_repeat
=
var_GetInteger
(
p_input
,
"input-repeat"
);
if
(
i_repeat
==
0
)
var_Get
(
p_input
,
"input-repeat"
,
&
repeat
);
if
(
repeat
.
i_int
==
0
)
{
{
/* End of file - we do not set b_die because only the
/* End of file - we do not set b_die because only the
* playlist is allowed to do so. */
* playlist is allowed to do so. */
...
@@ -598,12 +595,11 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
...
@@ -598,12 +595,11 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
{
{
vlc_value_t
val
;
vlc_value_t
val
;
msg_Dbg
(
p_input
,
"repeating the same input (%d)"
,
msg_Dbg
(
p_input
,
"repeating the same input (%d)"
,
i_repeat
);
repeat
.
i_int
);
if
(
i_repeat
>
0
)
if
(
repeat
.
i_int
>
0
)
{
{
repeat
.
i_in
t
--
;
i_repea
t
--
;
var_Set
(
p_input
,
"input-repeat"
,
repeat
);
var_Set
Integer
(
p_input
,
"input-repeat"
,
i_
repeat
);
}
}
/* Seek to start title/seekpoint */
/* Seek to start title/seekpoint */
...
@@ -1065,8 +1061,7 @@ static void InitPrograms( input_thread_t * p_input )
...
@@ -1065,8 +1061,7 @@ static void InitPrograms( input_thread_t * p_input )
val
.
p_list
=
NULL
;
val
.
p_list
=
NULL
;
if
(
p_input
->
p
->
p_sout
)
if
(
p_input
->
p
->
p_sout
)
{
{
var_Get
(
p_input
,
"sout-all"
,
&
val
);
if
(
var_GetBool
(
p_input
,
"sout-all"
)
)
if
(
val
.
b_bool
)
{
{
i_es_out_mode
=
ES_OUT_MODE_ALL
;
i_es_out_mode
=
ES_OUT_MODE_ALL
;
val
.
p_list
=
NULL
;
val
.
p_list
=
NULL
;
...
@@ -2271,7 +2266,6 @@ static int InputSourceInit( input_thread_t *p_input,
...
@@ -2271,7 +2266,6 @@ static int InputSourceInit( input_thread_t *p_input,
const
char
*
psz_access
;
const
char
*
psz_access
;
const
char
*
psz_demux
;
const
char
*
psz_demux
;
char
*
psz_path
;
char
*
psz_path
;
vlc_value_t
val
;
double
f_fps
;
double
f_fps
;
strcpy
(
psz_dup
,
psz_mrl
);
strcpy
(
psz_dup
,
psz_mrl
);
...
@@ -2367,11 +2361,10 @@ static int InputSourceInit( input_thread_t *p_input,
...
@@ -2367,11 +2361,10 @@ static int InputSourceInit( input_thread_t *p_input,
var_SetBool
(
p_input
,
"can-rate"
,
!
in
->
b_can_pace_control
||
in
->
b_can_rate_control
);
/* XXX temporary because of es_out_timeshift*/
var_SetBool
(
p_input
,
"can-rate"
,
!
in
->
b_can_pace_control
||
in
->
b_can_rate_control
);
/* XXX temporary because of es_out_timeshift*/
var_SetBool
(
p_input
,
"can-rewind"
,
!
in
->
b_rescale_ts
&&
!
in
->
b_can_pace_control
);
var_SetBool
(
p_input
,
"can-rewind"
,
!
in
->
b_rescale_ts
&&
!
in
->
b_can_pace_control
);
int
ret
=
demux_Control
(
in
->
p_demux
,
DEMUX_CAN_SEEK
,
bool
b_can_seek
;
&
val
.
b_bool
);
if
(
demux_Control
(
in
->
p_demux
,
DEMUX_CAN_SEEK
,
&
b_can_seek
)
)
if
(
ret
!=
VLC_SUCCESS
)
b_can_seek
=
false
;
val
.
b_bool
=
false
;
var_SetBool
(
p_input
,
"can-seek"
,
b_can_seek
);
var_Set
(
p_input
,
"can-seek"
,
val
);
}
}
else
else
{
{
...
@@ -2758,14 +2751,12 @@ static void SlaveSeek( input_thread_t *p_input )
...
@@ -2758,14 +2751,12 @@ static void SlaveSeek( input_thread_t *p_input )
*****************************************************************************/
*****************************************************************************/
static
void
InputMetaUser
(
input_thread_t
*
p_input
,
vlc_meta_t
*
p_meta
)
static
void
InputMetaUser
(
input_thread_t
*
p_input
,
vlc_meta_t
*
p_meta
)
{
{
vlc_value_t
val
;
/* Get meta information from user */
/* Get meta information from user */
#define GET_META( field, s ) do { \
#define GET_META( field, s ) do { \
var_Get( p_input, (s), &val
); \
char *psz_string = var_GetNonEmptyString( p_input, (s)
); \
if(
val.psz_string && *val.
psz_string ) \
if( psz_string ) \
vlc_meta_Set( p_meta, vlc_meta_ ## field,
val.
psz_string ); \
vlc_meta_Set( p_meta, vlc_meta_ ## field, psz_string ); \
free(
val.
psz_string ); } while(0)
free( psz_string ); } while(0)
GET_META
(
Title
,
"meta-title"
);
GET_META
(
Title
,
"meta-title"
);
GET_META
(
Artist
,
"meta-artist"
);
GET_META
(
Artist
,
"meta-artist"
);
...
...
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