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
b9304629
Commit
b9304629
authored
Jan 15, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Layout stuff
parent
72e28abd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
26 deletions
+51
-26
modules/gui/wxwidgets/dialogs/fileinfo.cpp
modules/gui/wxwidgets/dialogs/fileinfo.cpp
+3
-1
modules/gui/wxwidgets/dialogs/fileinfo.hpp
modules/gui/wxwidgets/dialogs/fileinfo.hpp
+2
-0
modules/gui/wxwidgets/dialogs/infopanels.cpp
modules/gui/wxwidgets/dialogs/infopanels.cpp
+37
-25
modules/gui/wxwidgets/dialogs/infopanels.hpp
modules/gui/wxwidgets/dialogs/infopanels.hpp
+9
-0
No files found.
modules/gui/wxwidgets/dialogs/fileinfo.cpp
View file @
b9304629
...
@@ -63,7 +63,7 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
...
@@ -63,7 +63,7 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
SetIcon
(
*
p_intf
->
p_sys
->
p_icon
);
SetIcon
(
*
p_intf
->
p_sys
->
p_icon
);
SetAutoLayout
(
TRUE
);
SetAutoLayout
(
TRUE
);
wxBoxSizer
*
panel_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
panel_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
wxNotebook
*
notebook
=
new
wxNotebook
(
this
,
-
1
);
wxNotebook
*
notebook
=
new
wxNotebook
(
this
,
-
1
);
#if (!wxCHECK_VERSION(2,5,2))
#if (!wxCHECK_VERSION(2,5,2))
...
@@ -134,6 +134,8 @@ void FileInfo::Update()
...
@@ -134,6 +134,8 @@ void FileInfo::Update()
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
b_need_update
=
VLC_FALSE
;
b_need_update
=
VLC_FALSE
;
panel_sizer
->
Layout
();
return
;
return
;
}
}
...
...
modules/gui/wxwidgets/dialogs/fileinfo.hpp
View file @
b9304629
...
@@ -54,6 +54,8 @@ namespace wxvlc
...
@@ -54,6 +54,8 @@ namespace wxvlc
ItemInfoPanel
*
item_info
;
ItemInfoPanel
*
item_info
;
InputStatsInfoPanel
*
stats_info
;
InputStatsInfoPanel
*
stats_info
;
wxBoxSizer
*
panel_sizer
;
};
};
};
};
...
...
modules/gui/wxwidgets/dialogs/infopanels.cpp
View file @
b9304629
...
@@ -78,8 +78,8 @@ ItemInfoPanel::ItemInfoPanel( intf_thread_t *_p_intf,
...
@@ -78,8 +78,8 @@ ItemInfoPanel::ItemInfoPanel( intf_thread_t *_p_intf,
info_root
=
info_tree
->
AddRoot
(
wxU
(
""
)
);
info_root
=
info_tree
->
AddRoot
(
wxU
(
""
)
);
sizer
->
Layout
();
sizer
->
Layout
();
panel_sizer
->
Add
(
sizer
,
0
,
wxEXPAND
,
5
);
panel_sizer
->
Add
(
sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
info_tree
,
0
,
wxEXPAND
,
5
);
panel_sizer
->
Add
(
info_tree
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Layout
();
panel_sizer
->
Layout
();
SetSizerAndFit
(
panel_sizer
);
SetSizerAndFit
(
panel_sizer
);
}
}
...
@@ -142,28 +142,30 @@ InputStatsInfoPanel::InputStatsInfoPanel( intf_thread_t *_p_intf,
...
@@ -142,28 +142,30 @@ InputStatsInfoPanel::InputStatsInfoPanel( intf_thread_t *_p_intf,
SetAutoLayout
(
TRUE
);
SetAutoLayout
(
TRUE
);
wxBoxSizer
*
panel_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
panel_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
wxFlexGridSizer
*
sizer
=
new
wxFlexGridSizer
(
2
,
2
,
20
);
sizer
=
new
wxFlexGridSizer
(
2
,
2
,
20
);
/* Input */
/* Input */
wxStaticBox
*
input_box
=
new
wxStaticBox
(
this
,
-
1
,
wxStaticBox
*
input_box
=
new
wxStaticBox
(
this
,
-
1
,
wxU
(
_
(
"Input"
)
)
);
wxU
(
_
(
"Input"
)
)
);
wxStaticBoxSizer
*
input_bsizer
=
new
wxStaticBoxSizer
(
input_box
,
input_box
->
SetAutoLayout
(
TRUE
);
wxVERTICAL
);
input_bsizer
=
new
wxStaticBoxSizer
(
input_box
,
wxVERTICAL
);
wxFlexGridSizer
*
input_sizer
=
new
wxFlexGridSizer
(
2
,
2
,
20
);
input_sizer
=
new
wxFlexGridSizer
(
2
,
2
,
20
);
#define INPUT_ADD(txt,widget,dflt) \
#define INPUT_ADD(txt,widget,dflt) \
{ input_sizer->Add ( new wxStaticText( this, -1, wxU(_( txt ) ) ) ); \
{ input_sizer->Add ( new wxStaticText( this, -1, wxU(_( txt ) ) ), \
widget = new wxStaticText( this, -1, wxU( dflt ) ); \
0, wxEXPAND| wxRIGHT, 5 ); \
input_sizer->Add( widget ); \
widget = new wxStaticText( this, -1, wxU( dflt ) ); \
input_sizer->Add( widget, 0, wxEXPAND| wxLEFT, 5 ); \
}
}
INPUT_ADD
(
"Read at media"
,
read_bytes_text
,
"0"
);
INPUT_ADD
(
"Read at media"
,
read_bytes_text
,
"0"
);
INPUT_ADD
(
"Input bitrate"
,
input_bitrate_text
,
"0"
);
INPUT_ADD
(
"Input bitrate"
,
input_bitrate_text
,
"0"
);
INPUT_ADD
(
"Demuxed"
,
demux_bytes_text
,
"0"
);
INPUT_ADD
(
"Demuxed"
,
demux_bytes_text
,
"0"
);
INPUT_ADD
(
"Stream bitrate"
,
demux_bitrate_text
,
"0"
);
/* Hack to get enough size */
INPUT_ADD
(
"Stream bitrate"
,
demux_bitrate_text
,
"0 "
);
input_sizer
->
Layout
();
input_sizer
->
Layout
();
input_bsizer
->
Add
(
input_sizer
,
0
,
wxALL
|
wxGROW
,
5
);
input_bsizer
->
Add
(
input_sizer
,
0
,
wxALL
|
wxGROW
,
5
);
...
@@ -173,17 +175,20 @@ InputStatsInfoPanel::InputStatsInfoPanel( intf_thread_t *_p_intf,
...
@@ -173,17 +175,20 @@ InputStatsInfoPanel::InputStatsInfoPanel( intf_thread_t *_p_intf,
/* Vout */
/* Vout */
wxStaticBox
*
video_box
=
new
wxStaticBox
(
this
,
-
1
,
wxStaticBox
*
video_box
=
new
wxStaticBox
(
this
,
-
1
,
wxU
(
_
(
"Video"
)
)
);
wxU
(
_
(
"Video"
)
)
);
wxStaticBoxSizer
*
video_bsizer
=
new
wxStaticBoxSizer
(
video_box
,
video_box
->
SetAutoLayout
(
TRUE
);
wxVERTICAL
);
video_bsizer
=
new
wxStaticBoxSizer
(
video_box
,
wxFlexGridSizer
*
video_sizer
=
new
wxFlexGridSizer
(
2
,
3
,
20
);
wxVERTICAL
);
video_sizer
=
new
wxFlexGridSizer
(
2
,
3
,
20
);
#define VIDEO_ADD(txt,widget,dflt) \
#define VIDEO_ADD(txt,widget,dflt) \
{ video_sizer->Add ( new wxStaticText( this, -1, wxU(_( txt ) ) ) ); \
{ video_sizer->Add ( new wxStaticText( this, -1, wxU(_( txt ) ) ), \
0, wxEXPAND|wxLEFT , 5 ); \
widget = new wxStaticText( this, -1, wxU( dflt ) ); \
widget = new wxStaticText( this, -1, wxU( dflt ) ); \
video_sizer->Add( widget
);
\
video_sizer->Add( widget
, 0, wxEXPAND|wxRIGHT, 5 );
\
}
}
VIDEO_ADD
(
"Decoded blocks"
,
video_decoded_text
,
"0"
);
VIDEO_ADD
(
"Decoded blocks"
,
video_decoded_text
,
"0"
);
VIDEO_ADD
(
"Displayed frames"
,
displayed_text
,
"0"
);
/* Hack to get enough size */
VIDEO_ADD
(
"Displayed frames"
,
displayed_text
,
"0 "
);
VIDEO_ADD
(
"Lost frames"
,
lost_frames_text
,
"0"
);
VIDEO_ADD
(
"Lost frames"
,
lost_frames_text
,
"0"
);
...
@@ -192,10 +197,10 @@ InputStatsInfoPanel::InputStatsInfoPanel( intf_thread_t *_p_intf,
...
@@ -192,10 +197,10 @@ InputStatsInfoPanel::InputStatsInfoPanel( intf_thread_t *_p_intf,
video_bsizer
->
Layout
();
video_bsizer
->
Layout
();
sizer
->
Add
(
video_bsizer
,
0
,
wxALL
|
wxGROW
,
5
);
sizer
->
Add
(
video_bsizer
,
0
,
wxALL
|
wxGROW
,
5
);
sizer
->
Layout
();
panel_sizer
->
Add
(
sizer
,
0
,
wxEXPAND
,
5
);
panel_sizer
->
Add
(
sizer
,
0
,
wxEXPAND
,
5
);
panel_sizer
->
Layout
();
panel_sizer
->
Layout
();
SetSizerAndFit
(
panel_sizer
);
SetSizerAndFit
(
panel_sizer
);
}
}
InputStatsInfoPanel
::~
InputStatsInfoPanel
()
InputStatsInfoPanel
::~
InputStatsInfoPanel
()
...
@@ -213,17 +218,24 @@ void InputStatsInfoPanel::Update( input_item_t *p_item )
...
@@ -213,17 +218,24 @@ void InputStatsInfoPanel::Update( input_item_t *p_item )
formatted.Printf( wxString( wxT(format) ), ## calc ); \
formatted.Printf( wxString( wxT(format) ), ## calc ); \
widget->SetLabel( formatted ); \
widget->SetLabel( formatted ); \
}
}
UPDATE
(
read_bytes_text
,
"%.0f kB"
,(
float
)(
p_item
->
p_stats
->
i_read_bytes
)
/
1000
);
UPDATE
(
read_bytes_text
,
"%
8
.0f kB"
,(
float
)(
p_item
->
p_stats
->
i_read_bytes
)
/
1000
);
UPDATE
(
input_bitrate_text
,
"%.0f kB/s"
,
(
float
)(
p_item
->
p_stats
->
f_input_bitrate
)
*
1000
);
UPDATE
(
input_bitrate_text
,
"%
6
.0f kB/s"
,
(
float
)(
p_item
->
p_stats
->
f_input_bitrate
)
*
1000
);
UPDATE
(
demux_bytes_text
,
"%.0f kB"
,
(
float
)(
p_item
->
p_stats
->
i_demux_read_bytes
)
/
1000
);
UPDATE
(
demux_bytes_text
,
"%
8
.0f kB"
,
(
float
)(
p_item
->
p_stats
->
i_demux_read_bytes
)
/
1000
);
UPDATE
(
demux_bitrate_text
,
"%.0f kB/s"
,
(
float
)(
p_item
->
p_stats
->
f_demux_bitrate
)
*
1000
);
UPDATE
(
demux_bitrate_text
,
"%
6
.0f kB/s"
,
(
float
)(
p_item
->
p_stats
->
f_demux_bitrate
)
*
1000
);
/* Video */
/* Video */
UPDATE
(
video_decoded_text
,
"%i"
,
p_item
->
p_stats
->
i_decoded_video
);
UPDATE
(
video_decoded_text
,
"%
5
i"
,
p_item
->
p_stats
->
i_decoded_video
);
UPDATE
(
displayed_text
,
"%i"
,
p_item
->
p_stats
->
i_displayed_pictures
);
UPDATE
(
displayed_text
,
"%
5
i"
,
p_item
->
p_stats
->
i_displayed_pictures
);
UPDATE
(
lost_frames_text
,
"%i"
,
p_item
->
p_stats
->
i_lost_pictures
);
UPDATE
(
lost_frames_text
,
"%
5
i"
,
p_item
->
p_stats
->
i_lost_pictures
);
vlc_mutex_unlock
(
&
p_item
->
p_stats
->
lock
);
vlc_mutex_unlock
(
&
p_item
->
p_stats
->
lock
);
input_sizer
->
Layout
();
video_sizer
->
Layout
();
sizer
->
Layout
();
panel_sizer
->
Layout
();
SetSizerAndFit
(
panel_sizer
);
}
}
void
InputStatsInfoPanel
::
Clear
()
void
InputStatsInfoPanel
::
Clear
()
...
...
modules/gui/wxwidgets/dialogs/infopanels.hpp
View file @
b9304629
...
@@ -81,11 +81,20 @@ private:
...
@@ -81,11 +81,20 @@ private:
input_item_t
*
p_item
;
input_item_t
*
p_item
;
wxWindow
*
p_parent
;
wxWindow
*
p_parent
;
wxBoxSizer
*
panel_sizer
;
wxFlexGridSizer
*
sizer
;
wxFlexGridSizer
*
input_sizer
;
wxStaticBoxSizer
*
input_bsizer
;
wxStaticText
*
read_bytes_text
;
wxStaticText
*
read_bytes_text
;
wxStaticText
*
input_bitrate_text
;
wxStaticText
*
input_bitrate_text
;
wxStaticText
*
demux_bytes_text
;
wxStaticText
*
demux_bytes_text
;
wxStaticText
*
demux_bitrate_text
;
wxStaticText
*
demux_bitrate_text
;
wxFlexGridSizer
*
video_sizer
;
wxStaticBoxSizer
*
video_bsizer
;
wxStaticText
*
video_decoded_text
;
wxStaticText
*
video_decoded_text
;
wxStaticText
*
displayed_text
;
wxStaticText
*
displayed_text
;
wxStaticText
*
lost_frames_text
;
wxStaticText
*
lost_frames_text
;
...
...
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