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
c854d8e8
Commit
c854d8e8
authored
Dec 14, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Progress bar for AVI index creation
parent
b1bf144c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
5 deletions
+40
-5
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+40
-5
No files found.
modules/demux/avi/avi.c
View file @
c854d8e8
...
...
@@ -144,6 +144,10 @@ struct demux_sys_t
/* meta */
vlc_meta_t
*
meta
;
/* Progress box */
mtime_t
last_update
;
int
i_dialog_id
;
};
static
inline
off_t
__EVEN
(
off_t
i
)
...
...
@@ -535,14 +539,15 @@ aviindex:
(
mtime_t
)
p_avih
->
i_microsecperframe
/
(
mtime_t
)
1000000
)
{
msg_Warn
(
p_demux
,
"broken or missing index, 'seek' will be
axproximative or will have
"
"
strange behav
our"
);
msg_Warn
(
p_demux
,
"broken or missing index, 'seek' will be "
"
axproximative or will have strange behavi
our"
);
if
(
!
b_index
)
{
int
i_create
;
i_create
=
intf_UserYesNo
(
p_demux
,
"AVI Index"
,
_
(
"This AVI file is broken. Seeking will not "
"work correctly.
\n
Do you want to "
"try to repair it (this might take a long time) ?"
)
);
i_create
=
intf_UserYesNo
(
p_demux
,
_
(
"AVI Index"
)
,
_
(
"This AVI file is broken. Seeking will not "
"work correctly.
\n
Do you want to "
"try to repair it (this might take a long time) ?"
)
);
if
(
i_create
==
DIALOG_OK_YES
)
{
b_index
=
VLC_TRUE
;
...
...
@@ -2251,6 +2256,19 @@ static void AVI_IndexCreate( demux_t *p_demux )
stream_Seek
(
p_demux
->
s
,
p_movi
->
i_chunk_pos
+
12
);
msg_Warn
(
p_demux
,
"creating index from LIST-movi, will take time !"
);
/* Only show dialog if AVI is > 10MB */
p_demux
->
p_sys
->
i_dialog_id
=
-
1
;
if
(
stream_Size
(
p_demux
->
s
)
>
10000000
)
{
p_demux
->
p_sys
->
i_dialog_id
=
intf_UserProgress
(
p_demux
,
_
(
"Fixing AVI Index"
),
_
(
"Creating AVI Index ..."
),
0
.
0
);
p_demux
->
p_sys
->
last_update
=
mdate
();
}
for
(
;;
)
{
avi_packet_t
pk
;
...
...
@@ -2260,6 +2278,18 @@ static void AVI_IndexCreate( demux_t *p_demux )
return
;
}
/* Don't update dialog too often */
if
(
p_demux
->
p_sys
->
i_dialog_id
>
0
&&
mdate
()
-
p_demux
->
p_sys
->
last_update
>
100000
)
{
int64_t
i_pos
=
stream_Tell
(
p_demux
->
s
)
*
100
/
stream_Size
(
p_demux
->
s
);
float
f_pos
=
(
float
)
i_pos
;
p_demux
->
p_sys
->
last_update
=
mdate
();
intf_UserProgressUpdate
(
p_demux
,
p_demux
->
p_sys
->
i_dialog_id
,
_
(
"Creating AVI Index ..."
),
f_pos
);
}
if
(
AVI_PacketGetHeader
(
p_demux
,
&
pk
)
)
{
break
;
...
...
@@ -2317,6 +2347,11 @@ static void AVI_IndexCreate( demux_t *p_demux )
}
print_stat:
if
(
p_demux
->
p_sys
->
i_dialog_id
>
0
)
{
intf_UserHide
(
p_demux
,
p_demux
->
p_sys
->
i_dialog_id
);
}
for
(
i_stream
=
0
;
i_stream
<
p_sys
->
i_track
;
i_stream
++
)
{
msg_Dbg
(
p_demux
,
...
...
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