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
79786424
Commit
79786424
authored
Aug 03, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* input.c: fixed total length in playlist.
parent
196a0c98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
src/input/input.c
src/input/input.c
+20
-10
No files found.
src/input/input.c
View file @
79786424
...
...
@@ -56,6 +56,8 @@ static vlc_bool_t Control( input_thread_t *, int, vlc_value_t );
static
void
UpdateFromAccess
(
input_thread_t
*
);
static
void
UpdateFromDemux
(
input_thread_t
*
);
static
void
UpdateItemLength
(
input_thread_t
*
,
int64_t
i_length
);
static
void
ParseOption
(
input_thread_t
*
p_input
,
const
char
*
psz_option
);
static
void
DecodeUrl
(
char
*
);
...
...
@@ -450,15 +452,7 @@ static int Run( input_thread_t *p_input )
if
(
old_val
.
i_time
!=
val
.
i_time
)
{
char
psz_buffer
[
MSTRTIME_MAX_SIZE
];
vlc_mutex_lock
(
&
p_input
->
input
.
p_item
->
lock
);
p_input
->
input
.
p_item
->
i_duration
=
i_length
;
vlc_mutex_unlock
(
&
p_input
->
input
.
p_item
->
lock
);
input_Control
(
p_input
,
INPUT_ADD_INFO
,
_
(
"General"
),
_
(
"Duration"
),
msecstotimestr
(
psz_buffer
,
i_length
/
1000
)
);
UpdateItemLength
(
p_input
,
i_length
);
}
}
...
...
@@ -563,7 +557,8 @@ static int Init( input_thread_t * p_input )
&
val
.
i_time
)
&&
val
.
i_time
>
0
)
{
var_Change
(
p_input
,
"length"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
/* TODO update playlist meta data */
UpdateItemLength
(
p_input
,
val
.
i_time
);
}
/* Start time*/
/* Set start time */
...
...
@@ -1401,6 +1396,21 @@ static void UpdateFromAccess( input_thread_t *p_input )
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_SIZE
;
}
/*****************************************************************************
* UpdateItemLength:
*****************************************************************************/
static
void
UpdateItemLength
(
input_thread_t
*
p_input
,
int64_t
i_length
)
{
char
psz_buffer
[
MSTRTIME_MAX_SIZE
];
vlc_mutex_lock
(
&
p_input
->
input
.
p_item
->
lock
);
p_input
->
input
.
p_item
->
i_duration
=
i_length
;
vlc_mutex_unlock
(
&
p_input
->
input
.
p_item
->
lock
);
input_Control
(
p_input
,
INPUT_ADD_INFO
,
_
(
"General"
),
_
(
"Duration"
),
msecstotimestr
(
psz_buffer
,
i_length
/
1000
)
);
}
/*****************************************************************************
* InputSourceNew:
*****************************************************************************/
...
...
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