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
a77a1283
Commit
a77a1283
authored
May 20, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: QString.sprintf is a bad solution for complex PRI*64
parent
d93e3c37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
18 deletions
+22
-18
modules/gui/qt4/components/info_panels.cpp
modules/gui/qt4/components/info_panels.cpp
+21
-17
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+1
-1
No files found.
modules/gui/qt4/components/info_panels.cpp
View file @
a77a1283
...
...
@@ -560,32 +560,36 @@ void InputStatsPanel::update( input_item_t *p_item )
assert
(
p_item
);
vlc_mutex_lock
(
&
p_item
->
p_stats
->
lock
);
#define UPDATE( widget, format, calc... ) \
#define UPDATE_INT( widget, calc... ) \
{ widget->setText( 1, QString::number( (qulonglong)calc ) ); }
#define UPDATE_FLOAT( widget, format, calc... ) \
{ QString str; widget->setText( 1 , str.sprintf( format, ## calc ) ); }
UPDATE
(
read_media_stat
,
"%"
PRIu64
,
(
p_item
->
p_stats
->
i_read_bytes
/
1024
)
);
UPDATE
(
input_bitrate_stat
,
"%6.0f"
,
(
float
)(
p_item
->
p_stats
->
f_input_bitrate
*
8000
));
UPDATE
(
demuxed_stat
,
"%"
PRIu64
,
(
p_item
->
p_stats
->
i_demux_read_bytes
/
1024
)
);
UPDATE
(
stream_bitrate_stat
,
"%6.0f"
,
(
float
)(
p_item
->
p_stats
->
f_demux_bitrate
*
8000
));
UPDATE
(
corrupted_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_demux_corrupted
);
UPDATE
(
discontinuity_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_demux_discontinuity
);
UPDATE
_INT
(
read_media_stat
,
(
p_item
->
p_stats
->
i_read_bytes
/
1024
)
);
UPDATE
_FLOAT
(
input_bitrate_stat
,
"%6.0f"
,
(
float
)(
p_item
->
p_stats
->
f_input_bitrate
*
8000
));
UPDATE
_INT
(
demuxed_stat
,
(
p_item
->
p_stats
->
i_demux_read_bytes
/
1024
)
);
UPDATE
_FLOAT
(
stream_bitrate_stat
,
"%6.0f"
,
(
float
)(
p_item
->
p_stats
->
f_demux_bitrate
*
8000
));
UPDATE
_INT
(
corrupted_stat
,
p_item
->
p_stats
->
i_demux_corrupted
);
UPDATE
_INT
(
discontinuity_stat
,
p_item
->
p_stats
->
i_demux_discontinuity
);
/* Video */
UPDATE
(
vdecoded_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_decoded_video
);
UPDATE
(
vdisplayed_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_displayed_pictures
);
UPDATE
(
vlost_frames_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_lost_pictures
);
UPDATE
_INT
(
vdecoded_stat
,
p_item
->
p_stats
->
i_decoded_video
);
UPDATE
_INT
(
vdisplayed_stat
,
p_item
->
p_stats
->
i_displayed_pictures
);
UPDATE
_INT
(
vlost_frames_stat
,
p_item
->
p_stats
->
i_lost_pictures
);
/* Sout */
UPDATE
(
send_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_sent_packets
);
UPDATE
(
send_bytes_stat
,
"%"
PRIu64
,
(
p_item
->
p_stats
->
i_sent_bytes
)
/
1024
);
UPDATE
(
send_bitrate_stat
,
"%6.0f"
,
(
float
)(
p_item
->
p_stats
->
f_send_bitrate
*
8000
)
);
UPDATE
_INT
(
send_stat
,
p_item
->
p_stats
->
i_sent_packets
);
UPDATE
_INT
(
send_bytes_stat
,
(
p_item
->
p_stats
->
i_sent_bytes
)
/
1024
);
UPDATE
_FLOAT
(
send_bitrate_stat
,
"%6.0f"
,
(
float
)(
p_item
->
p_stats
->
f_send_bitrate
*
8000
)
);
/* Audio*/
UPDATE
(
adecoded_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_decoded_audio
);
UPDATE
(
aplayed_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_played_abuffers
);
UPDATE
(
alost_stat
,
"%"
PRIu64
,
p_item
->
p_stats
->
i_lost_abuffers
);
UPDATE
_INT
(
adecoded_stat
,
p_item
->
p_stats
->
i_decoded_audio
);
UPDATE
_INT
(
aplayed_stat
,
p_item
->
p_stats
->
i_played_abuffers
);
UPDATE
_INT
(
alost_stat
,
p_item
->
p_stats
->
i_lost_abuffers
);
#undef UPDATE
#undef UPDATE_INT
#undef UPDATE_FLOAT
vlc_mutex_unlock
(
&
p_item
->
p_stats
->
lock
);
}
...
...
modules/gui/qt4/menus.cpp
View file @
a77a1283
...
...
@@ -1370,7 +1370,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
case
VLC_VAR_INTEGER
:
var_Get
(
p_object
,
psz_var
,
&
val
);
if
(
CURTEXT
)
menutext
=
qfu
(
CURTEXT
);
else
menutext
.
sprintf
(
"%"
PRId64
,
CURVAL
.
i_int
);
else
menutext
=
QString
::
number
(
CURVAL
.
i_int
);
CreateAndConnect
(
submenu
,
psz_var
,
menutext
,
""
,
RADIO_OR_COMMAND
,
p_object
,
CURVAL
,
i_type
,
(
CURVAL
.
i_int
==
val
.
i_int
)
...
...
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