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
aa3da61d
Commit
aa3da61d
authored
Mar 08, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dialog_Progress
parent
d36df636
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
25 deletions
+22
-25
modules/access/dvb/scan.c
modules/access/dvb/scan.c
+7
-6
modules/access/dvb/scan.h
modules/access/dvb/scan.h
+1
-1
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+6
-7
src/misc/update.c
src/misc/update.c
+8
-11
No files found.
modules/access/dvb/scan.c
View file @
aa3da61d
...
...
@@ -30,7 +30,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_
interface
.h>
#include <vlc_
dialog
.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
...
...
@@ -136,7 +136,7 @@ int scan_Init( vlc_object_t *p_obj, scan_t *p_scan, const scan_parameter_t *p_pa
void
scan_Clean
(
scan_t
*
p_scan
)
{
if
(
p_scan
->
p_dialog
!=
NULL
)
intf_UserHide
(
p_scan
->
p_dialog
);
dialog_ProgressDestroy
(
p_scan
->
p_dialog
);
for
(
int
i
=
0
;
i
<
p_scan
->
i_service
;
i
++
)
scan_service_Delete
(
p_scan
->
pp_service
[
i
]
);
...
...
@@ -318,9 +318,10 @@ int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg )
msg_Info
(
p_scan
->
p_obj
,
"Scan ETA %s | %f"
,
secstotimestr
(
psz_eta
,
i_eta
/
1000000
),
f_position
*
100
);
if
(
p_scan
->
p_dialog
==
NULL
)
p_scan
->
p_dialog
=
intf_UserProgress
(
p_scan
->
p_obj
,
_
(
"Scanning DVB-T"
),
psz_text
,
100
.
0
*
f_position
,
-
1
);
else
intf_ProgressUpdate
(
p_scan
->
p_dialog
,
psz_text
,
100
*
f_position
,
-
1
);
p_scan
->
p_dialog
=
dialog_ProgressCreate
(
p_scan
->
p_obj
,
_
(
"Scanning DVB-T"
),
psz_text
,
_
(
"Cancel"
)
);
if
(
p_scan
->
p_dialog
!=
NULL
)
/* FIXME: update text, not just percentage */
dialog_ProgressSet
(
p_scan
->
p_dialog
,
/*psz_text, */
100
*
f_position
);
free
(
psz_text
);
}
...
...
@@ -330,7 +331,7 @@ int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg )
bool
scan_IsCancelled
(
scan_t
*
p_scan
)
{
return
p_scan
->
p_dialog
&&
intf_ProgressI
sCancelled
(
p_scan
->
p_dialog
);
return
p_scan
->
p_dialog
&&
dialog_Progres
sCancelled
(
p_scan
->
p_dialog
);
}
static
scan_service_t
*
ScanFindService
(
scan_t
*
p_scan
,
int
i_service_start
,
int
i_program
)
...
...
modules/access/dvb/scan.h
View file @
aa3da61d
...
...
@@ -127,7 +127,7 @@ typedef struct
typedef
struct
{
vlc_object_t
*
p_obj
;
interaction_dialog
_t
*
p_dialog
;
struct
dialog_progress_bar
_t
*
p_dialog
;
int64_t
i_index
;
scan_parameter_t
parameter
;
int64_t
i_time_start
;
...
...
modules/demux/avi/avi.c
View file @
aa3da61d
...
...
@@ -32,7 +32,6 @@
#include <vlc_plugin.h>
#include <vlc_demux.h>
#include <vlc_interface.h>
#include <vlc_dialog.h>
#include <vlc_meta.h>
...
...
@@ -2373,7 +2372,7 @@ static void AVI_IndexCreate( demux_t *p_demux )
off_t
i_movi_end
;
mtime_t
i_dialog_update
;
interaction_dialog
_t
*
p_dialog
=
NULL
;
dialog_progress_bar
_t
*
p_dialog
=
NULL
;
p_riff
=
AVI_ChunkFind
(
&
p_sys
->
ck_root
,
AVIFOURCC_RIFF
,
0
);
p_movi
=
AVI_ChunkFind
(
p_riff
,
AVIFOURCC_movi
,
0
);
...
...
@@ -2400,7 +2399,8 @@ static void AVI_IndexCreate( demux_t *p_demux )
/* Only show dialog if AVI is > 10MB */
i_dialog_update
=
mdate
();
if
(
stream_Size
(
p_demux
->
s
)
>
10000000
)
p_dialog
=
intf_IntfProgress
(
p_demux
,
_
(
"Fixing AVI Index..."
),
0
.
0
);
p_dialog
=
dialog_ProgressCreate
(
p_demux
,
NULL
,
_
(
"Fixing AVI Index..."
),
_
(
"Cancel"
)
);
for
(
;;
)
{
...
...
@@ -2412,13 +2412,12 @@ static void AVI_IndexCreate( demux_t *p_demux )
/* Don't update/check dialog too often */
if
(
p_dialog
&&
mdate
()
-
i_dialog_update
>
100000
)
{
if
(
intf_ProgressI
sCancelled
(
p_dialog
)
)
if
(
dialog_Progres
sCancelled
(
p_dialog
)
)
break
;
double
f_pos
=
100
.
0
*
stream_Tell
(
p_demux
->
s
)
/
stream_Size
(
p_demux
->
s
);
intf_ProgressUpdate
(
p_dialog
,
_
(
"Fixing AVI Index..."
),
f_pos
,
-
1
);
dialog_ProgressSet
(
p_dialog
,
f_pos
);
i_dialog_update
=
mdate
();
}
...
...
@@ -2482,7 +2481,7 @@ static void AVI_IndexCreate( demux_t *p_demux )
print_stat:
if
(
p_dialog
!=
NULL
)
intf_UserHide
(
p_dialog
);
dialog_ProgressDestroy
(
p_dialog
);
for
(
i_stream
=
0
;
i_stream
<
p_sys
->
i_track
;
i_stream
++
)
{
...
...
src/misc/update.c
View file @
aa3da61d
...
...
@@ -50,7 +50,6 @@
#include <vlc_stream.h>
#include <vlc_strings.h>
#include <vlc_charset.h>
#include <vlc_interface.h>
#include <vlc_dialog.h>
#include <gcrypt.h>
...
...
@@ -1512,7 +1511,7 @@ void update_Download( update_t *p_update, const char *destination )
static
void
*
update_DownloadReal
(
vlc_object_t
*
p_this
)
{
update_download_thread_t
*
p_udt
=
(
update_download_thread_t
*
)
p_this
;
interaction_dialog_t
*
p_progress
=
0
;
dialog_progress_bar_t
*
p_progress
=
NULL
;
long
int
l_size
;
long
int
l_downloaded
=
0
;
float
f_progress
;
...
...
@@ -1590,14 +1589,14 @@ static void* update_DownloadReal( vlc_object_t *p_this )
if
(
asprintf
(
&
psz_status
,
_
(
"%s
\n
Downloading... %s/%s %.1f%% done"
),
p_update
->
release
.
psz_url
,
"0.0"
,
psz_size
,
0
.
0
)
!=
-
1
)
{
p_progress
=
intf_UserProgress
(
p_udt
,
_
(
"Downloading ..."
),
psz_status
,
0
.
0
,
0
);
p_progress
=
dialog_ProgressCreate
(
p_udt
,
_
(
"Downloading ..."
),
psz_status
,
_
(
"Cancel"
)
);
free
(
psz_status
);
}
while
(
vlc_object_alive
(
p_udt
)
&&
(
i_read
=
stream_Read
(
p_stream
,
p_buffer
,
1
<<
10
)
)
&&
!
intf_ProgressI
sCancelled
(
p_progress
)
)
!
dialog_Progres
sCancelled
(
p_progress
)
)
{
if
(
fwrite
(
p_buffer
,
i_read
,
1
,
p_file
)
<
1
)
{
...
...
@@ -1613,7 +1612,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
p_update
->
release
.
psz_url
,
psz_downloaded
,
psz_size
,
f_progress
)
!=
-
1
)
{
intf_ProgressUpdate
(
p_progress
,
psz_status
,
f_progress
,
0
);
dialog_ProgressSet
(
p_progress
,
/*FIXME psz_status,*/
f_progress
);
free
(
psz_status
);
}
free
(
psz_downloaded
);
...
...
@@ -1624,12 +1623,12 @@ static void* update_DownloadReal( vlc_object_t *p_this )
p_file
=
NULL
;
if
(
vlc_object_alive
(
p_udt
)
&&
!
intf_ProgressI
sCancelled
(
p_progress
)
)
!
dialog_Progres
sCancelled
(
p_progress
)
)
{
if
(
asprintf
(
&
psz_status
,
_
(
"%s
\n
Done %s (100.0%%)"
),
p_update
->
release
.
psz_url
,
psz_size
)
!=
-
1
)
{
intf_ProgressUpdate
(
p_progress
,
psz_status
,
100
.
0
,
0
);
dialog_ProgressDestroy
(
p_progress
);
p_progress
=
NULL
;
free
(
psz_status
);
}
...
...
@@ -1720,9 +1719,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
end:
if
(
p_progress
)
{
intf_ProgressUpdate
(
p_progress
,
_
(
"Cancelled"
),
100
.
0
,
0
);
}
dialog_ProgressDestroy
(
p_progress
);
if
(
p_stream
)
stream_Delete
(
p_stream
);
if
(
p_file
)
...
...
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