Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
25e23b77
Commit
25e23b77
authored
Feb 19, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Show meta-information separately
* Collect more meta-information in id3
parent
554134b1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
204 additions
and
32 deletions
+204
-32
include/vlc_meta.h
include/vlc_meta.h
+1
-0
modules/demux/util/id3tag.c
modules/demux/util/id3tag.c
+20
-0
modules/gui/wxwidgets/dialogs/fileinfo.cpp
modules/gui/wxwidgets/dialogs/fileinfo.cpp
+7
-2
modules/gui/wxwidgets/dialogs/fileinfo.hpp
modules/gui/wxwidgets/dialogs/fileinfo.hpp
+4
-2
modules/gui/wxwidgets/dialogs/infopanels.cpp
modules/gui/wxwidgets/dialogs/infopanels.cpp
+122
-23
modules/gui/wxwidgets/dialogs/infopanels.hpp
modules/gui/wxwidgets/dialogs/infopanels.hpp
+48
-3
modules/gui/wxwidgets/dialogs/iteminfo.cpp
modules/gui/wxwidgets/dialogs/iteminfo.cpp
+1
-1
modules/gui/wxwidgets/dialogs/iteminfo.hpp
modules/gui/wxwidgets/dialogs/iteminfo.hpp
+1
-1
No files found.
include/vlc_meta.h
View file @
25e23b77
...
...
@@ -40,6 +40,7 @@
#define VLC_META_URL N_("URL")
#define VLC_META_LANGUAGE N_("Language")
#define VLC_META_NOW_PLAYING N_("Now Playing")
#define VLC_META_PUBLISHER N_("Publisher")
#define VLC_META_CDDB_ARTIST N_("CDDB Artist")
#define VLC_META_CDDB_CATEGORY N_("CDDB Category")
...
...
modules/demux/util/id3tag.c
View file @
25e23b77
...
...
@@ -107,6 +107,26 @@ static void ParseID3Tag( demux_t *p_demux, uint8_t *p_data, int i_size )
vlc_meta_Add
(
(
vlc_meta_t
*
)
p_demux
->
p_private
,
VLC_META_ARTIST
,
psz_temp
);
}
else
if
(
!
strcmp
(
p_frame
->
id
,
ID3_FRAME_YEAR
)
)
{
vlc_meta_Add
(
(
vlc_meta_t
*
)
p_demux
->
p_private
,
VLC_META_DATE
,
psz_temp
);
}
else
if
(
!
strcmp
(
p_frame
->
id
,
ID3_FRAME_COMMENT
)
)
{
vlc_meta_Add
(
(
vlc_meta_t
*
)
p_demux
->
p_private
,
VLC_META_DESCRIPTION
,
psz_temp
);
}
else
if
(
strstr
(
(
char
*
)
p_frame
->
description
,
"Copyright"
)
)
{
vlc_meta_Add
(
(
vlc_meta_t
*
)
p_demux
->
p_private
,
VLC_META_COPYRIGHT
,
psz_temp
);
}
else
if
(
strstr
(
(
char
*
)
p_frame
->
description
,
"Publisher"
)
)
{
vlc_meta_Add
(
(
vlc_meta_t
*
)
p_demux
->
p_private
,
VLC_META_PUBLISHER
,
psz_temp
);
}
else
{
/* Unknown meta info */
...
...
modules/gui/wxwidgets/dialogs/fileinfo.cpp
View file @
25e23b77
...
...
@@ -69,10 +69,12 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
#if (!wxCHECK_VERSION(2,5,2))
wxNotebookSizer
*
notebook_sizer
=
new
wxNotebookSizer
(
notebook
);
#endif
item_info
=
new
ItemInfoPanel
(
p_intf
,
notebook
,
false
);
item_info
=
new
MetaDataPanel
(
p_intf
,
notebook
,
false
);
advanced_info
=
new
AdvancedInfoPanel
(
p_intf
,
notebook
);
stats_info
=
new
InputStatsInfoPanel
(
p_intf
,
notebook
);
notebook
->
AddPage
(
item_info
,
wxU
(
_
(
"General"
)
),
true
);
notebook
->
AddPage
(
advanced_info
,
wxU
(
_
(
"Advanced information"
)
),
false
);
notebook
->
AddPage
(
stats_info
,
wxU
(
_
(
"Statistics"
)
),
false
);
#if (!wxCHECK_VERSION(2,5,2))
...
...
@@ -84,7 +86,6 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
panel_sizer
->
Layout
();
SetSizerAndFit
(
panel_sizer
);
if
(
p_playlist
)
{
var_AddCallback
(
p_playlist
,
"item-change"
,
ItemChanged
,
this
);
...
...
@@ -112,6 +113,7 @@ void FileInfo::Update()
if
(
!
p_input
||
p_input
->
b_dead
||
!
p_input
->
input
.
p_item
->
psz_name
)
{
item_info
->
Clear
();
advanced_info
->
Clear
();
stats_info
->
Clear
();
vlc_object_release
(
p_playlist
);
return
;
...
...
@@ -121,7 +123,10 @@ void FileInfo::Update()
vlc_mutex_lock
(
&
p_input
->
input
.
p_item
->
lock
);
if
(
b_need_update
==
VLC_TRUE
)
{
vlc_mutex_unlock
(
&
p_input
->
input
.
p_item
->
lock
);
item_info
->
Update
(
p_input
->
input
.
p_item
);
vlc_mutex_lock
(
&
p_input
->
input
.
p_item
->
lock
);
advanced_info
->
Update
(
p_input
->
input
.
p_item
);
}
stats_info
->
Update
(
p_input
->
input
.
p_item
);
vlc_mutex_unlock
(
&
p_input
->
input
.
p_item
->
lock
);
...
...
modules/gui/wxwidgets/dialogs/fileinfo.hpp
View file @
25e23b77
...
...
@@ -30,7 +30,8 @@
namespace
wxvlc
{
class
ItemInfoPanel
;
class
MetaDataPanel
;
class
AdvancedInfoPanel
;
class
InputStatsInfoPanel
;
class
FileInfo
:
public
wxFrame
{
...
...
@@ -52,7 +53,8 @@ namespace wxvlc
mtime_t
last_update
;
ItemInfoPanel
*
item_info
;
MetaDataPanel
*
item_info
;
AdvancedInfoPanel
*
advanced_info
;
InputStatsInfoPanel
*
stats_info
;
wxBoxSizer
*
panel_sizer
;
...
...
modules/gui/wxwidgets/dialogs/infopanels.cpp
View file @
25e23b77
...
...
@@ -25,17 +25,19 @@
#include <wx/combobox.h>
#include <wx/statline.h>
#include <vlc_meta.h>
#ifndef wxRB_SINGLE
# define wxRB_SINGLE 0
#endif
/*****************************************************************************
* General info
panel
* General info
(URI, name, metadata)
*****************************************************************************/
BEGIN_EVENT_TABLE
(
ItemInfo
Panel
,
wxPanel
)
BEGIN_EVENT_TABLE
(
MetaData
Panel
,
wxPanel
)
END_EVENT_TABLE
()
ItemInfoPanel
::
ItemInfo
Panel
(
intf_thread_t
*
_p_intf
,
MetaDataPanel
::
MetaData
Panel
(
intf_thread_t
*
_p_intf
,
wxWindow
*
_p_parent
,
bool
_b_modifiable
)
:
wxPanel
(
_p_parent
,
-
1
)
...
...
@@ -73,6 +75,118 @@ ItemInfoPanel::ItemInfoPanel( intf_thread_t *_p_intf,
name_text
=
new
wxTextCtrl
(
this
,
-
1
,
wxU
(
""
),
wxDefaultPosition
,
wxSize
(
300
,
-
1
),
flags
);
sizer
->
Add
(
name_text
,
1
,
wxALL
|
wxEXPAND
,
0
);
sizer
->
Layout
();
/* Metadata */
wxFlexGridSizer
*
meta_sizer
=
new
wxFlexGridSizer
(
2
,
11
,
20
);
meta_sizer
->
AddGrowableCol
(
1
);
#define ADD_META( string, widget ) { \
meta_sizer->Add( new wxStaticText( this, -1, wxU(_(string) ) ),1, \
wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 0 ); \
widget = new wxStaticText( this, -1, wxU( "" ) ); \
meta_sizer->Add( widget, 1, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 0 ); }
ADD_META
(
VLC_META_ARTIST
,
artist_text
);
ADD_META
(
VLC_META_GENRE
,
genre_text
);
ADD_META
(
VLC_META_COPYRIGHT
,
copyright_text
);
ADD_META
(
VLC_META_COLLECTION
,
collection_text
);
ADD_META
(
VLC_META_SEQ_NUM
,
seqnum_text
);
ADD_META
(
VLC_META_DESCRIPTION
,
description_text
);
ADD_META
(
VLC_META_RATING
,
rating_text
);
ADD_META
(
VLC_META_DATE
,
date_text
);
ADD_META
(
VLC_META_LANGUAGE
,
language_text
);
ADD_META
(
VLC_META_NOW_PLAYING
,
nowplaying_text
);
ADD_META
(
VLC_META_PUBLISHER
,
publisher_text
);
meta_sizer
->
Layout
();
panel_sizer
->
Add
(
sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
meta_sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Layout
();
SetSizerAndFit
(
panel_sizer
);
}
MetaDataPanel
::~
MetaDataPanel
()
{
}
void
MetaDataPanel
::
Update
(
input_item_t
*
p_item
)
{
/* Rebuild the tree */
Clear
();
uri_text
->
SetValue
(
wxU
(
p_item
->
psz_uri
)
);
name_text
->
SetValue
(
wxU
(
p_item
->
psz_name
)
);
#define UPDATE_META( meta, widget ) { \
char *psz_meta = vlc_input_item_GetInfo( p_item, _(VLC_META_INFO_CAT), \
_(meta) ); \
if( psz_meta != NULL ) \
{ \
widget->SetLabel( wxU( psz_meta ) ); \
} \
}
UPDATE_META
(
VLC_META_ARTIST
,
artist_text
);
UPDATE_META
(
VLC_META_GENRE
,
genre_text
);
UPDATE_META
(
VLC_META_COPYRIGHT
,
copyright_text
);
UPDATE_META
(
VLC_META_COLLECTION
,
collection_text
);
UPDATE_META
(
VLC_META_SEQ_NUM
,
seqnum_text
);
UPDATE_META
(
VLC_META_DESCRIPTION
,
description_text
);
UPDATE_META
(
VLC_META_RATING
,
rating_text
);
UPDATE_META
(
VLC_META_DATE
,
date_text
);
UPDATE_META
(
VLC_META_LANGUAGE
,
language_text
);
UPDATE_META
(
VLC_META_NOW_PLAYING
,
nowplaying_text
);
UPDATE_META
(
VLC_META_PUBLISHER
,
publisher_text
);
#undef UPDATE_META
}
char
*
MetaDataPanel
::
GetURI
(
)
{
return
strdup
(
uri_text
->
GetLineText
(
0
).
mb_str
()
);
}
char
*
MetaDataPanel
::
GetName
(
)
{
return
strdup
(
name_text
->
GetLineText
(
0
).
mb_str
()
);
}
void
MetaDataPanel
::
Clear
()
{
}
void
MetaDataPanel
::
OnOk
(
)
{
}
void
MetaDataPanel
::
OnCancel
(
)
{
}
/*****************************************************************************
* General info panel
*****************************************************************************/
BEGIN_EVENT_TABLE
(
AdvancedInfoPanel
,
wxPanel
)
END_EVENT_TABLE
()
AdvancedInfoPanel
::
AdvancedInfoPanel
(
intf_thread_t
*
_p_intf
,
wxWindow
*
_p_parent
)
:
wxPanel
(
_p_parent
,
-
1
)
{
int
flags
=
wxTE_PROCESS_ENTER
;
/* Initializations */
p_intf
=
_p_intf
;
p_parent
=
_p_parent
;
SetAutoLayout
(
TRUE
);
wxBoxSizer
*
panel_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
wxFlexGridSizer
*
sizer
=
new
wxFlexGridSizer
(
2
,
8
,
20
);
sizer
->
AddGrowableCol
(
1
);
/* Treeview */
info_tree
=
new
wxTreeCtrl
(
this
,
-
1
,
wxDefaultPosition
,
...
...
@@ -81,25 +195,20 @@ ItemInfoPanel::ItemInfoPanel( intf_thread_t *_p_intf,
wxTR_HIDE_ROOT
);
info_root
=
info_tree
->
AddRoot
(
wxU
(
""
)
);
sizer
->
Layout
();
panel_sizer
->
Add
(
sizer
,
0
,
wxEXPAND
|
wxALL
,
15
);
panel_sizer
->
Add
(
info_tree
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Layout
();
SetSizerAndFit
(
panel_sizer
);
}
ItemInfoPanel
::~
Item
InfoPanel
()
AdvancedInfoPanel
::~
Advanced
InfoPanel
()
{
}
void
Item
InfoPanel
::
Update
(
input_item_t
*
p_item
)
void
Advanced
InfoPanel
::
Update
(
input_item_t
*
p_item
)
{
/* Rebuild the tree */
Clear
();
uri_text
->
SetValue
(
wxU
(
p_item
->
psz_uri
)
);
name_text
->
SetValue
(
wxU
(
p_item
->
psz_name
)
);
for
(
int
i
=
0
;
i
<
p_item
->
i_categories
;
i
++
)
{
wxTreeItemId
cat
=
info_tree
->
AppendItem
(
info_root
,
...
...
@@ -117,26 +226,16 @@ void ItemInfoPanel::Update( input_item_t *p_item )
}
}
char
*
ItemInfoPanel
::
GetURI
(
)
{
return
strdup
(
uri_text
->
GetLineText
(
0
).
mb_str
()
);
}
char
*
ItemInfoPanel
::
GetName
(
)
{
return
strdup
(
name_text
->
GetLineText
(
0
).
mb_str
()
);
}
void
ItemInfoPanel
::
Clear
()
void
AdvancedInfoPanel
::
Clear
()
{
info_tree
->
DeleteChildren
(
info_root
);
}
void
Item
InfoPanel
::
OnOk
(
)
void
Advanced
InfoPanel
::
OnOk
(
)
{
}
void
Item
InfoPanel
::
OnCancel
(
)
void
Advanced
InfoPanel
::
OnCancel
(
)
{
}
...
...
modules/gui/wxwidgets/dialogs/infopanels.hpp
View file @
25e23b77
...
...
@@ -30,12 +30,57 @@
namespace
wxvlc
{
class
ItemInfo
Panel
:
public
wxPanel
class
MetaData
Panel
:
public
wxPanel
{
public:
/* Constructor */
ItemInfoPanel
(
intf_thread_t
*
p_intf
,
wxWindow
*
p_parent
,
bool
);
virtual
~
ItemInfoPanel
();
MetaDataPanel
(
intf_thread_t
*
p_intf
,
wxWindow
*
p_parent
,
bool
);
virtual
~
MetaDataPanel
();
void
Update
(
input_item_t
*
);
void
Clear
();
char
*
GetURI
();
char
*
GetName
();
void
OnOk
();
void
OnCancel
();
private:
DECLARE_EVENT_TABLE
();
intf_thread_t
*
p_intf
;
input_item_t
*
p_item
;
wxWindow
*
p_parent
;
wxTextCtrl
*
uri_text
;
wxTextCtrl
*
name_text
;
wxStaticText
*
uri_label
;
wxStaticText
*
name_label
;
wxStaticText
*
artist_text
;
wxStaticText
*
genre_text
;
wxStaticText
*
copyright_text
;
wxStaticText
*
collection_text
;
wxStaticText
*
seqnum_text
;
wxStaticText
*
description_text
;
wxStaticText
*
rating_text
;
wxStaticText
*
date_text
;
wxStaticText
*
setting_text
;
wxStaticText
*
language_text
;
wxStaticText
*
nowplaying_text
;
wxStaticText
*
publisher_text
;
bool
b_modifiable
;
};
class
AdvancedInfoPanel
:
public
wxPanel
{
public:
/* Constructor */
AdvancedInfoPanel
(
intf_thread_t
*
p_intf
,
wxWindow
*
p_parent
);
virtual
~
AdvancedInfoPanel
();
void
Update
(
input_item_t
*
);
void
Clear
();
...
...
modules/gui/wxwidgets/dialogs/iteminfo.cpp
View file @
25e23b77
...
...
@@ -69,7 +69,7 @@ ItemInfoDialog::ItemInfoDialog( intf_thread_t *_p_intf,
panel
->
SetAutoLayout
(
TRUE
);
/* Create the standard info panel */
info_panel
=
new
ItemInfo
Panel
(
p_intf
,
panel
,
true
);
info_panel
=
new
MetaData
Panel
(
p_intf
,
panel
,
true
);
info_panel
->
Update
(
&
(
p_item
->
input
)
);
/* Separation */
wxStaticLine
*
static_line
=
new
wxStaticLine
(
panel
,
wxID_OK
);
...
...
modules/gui/wxwidgets/dialogs/iteminfo.hpp
View file @
25e23b77
...
...
@@ -57,7 +57,7 @@ private:
/* Controls for the iteminfo dialog box */
wxPanel
*
info_subpanel
;
ItemInfo
Panel
*
info_panel
;
MetaData
Panel
*
info_panel
;
wxPanel
*
group_subpanel
;
wxPanel
*
group_panel
;
...
...
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