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
22c96ab6
Commit
22c96ab6
authored
Dec 26, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move a few large inlines out of include/
parent
f895d9b7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
91 deletions
+95
-91
include/vlc_input.h
include/vlc_input.h
+2
-91
src/input/input_internal.h
src/input/input_internal.h
+93
-0
No files found.
include/vlc_input.h
View file @
22c96ab6
...
...
@@ -99,33 +99,6 @@ struct input_item_t
#define ITEM_TYPE_NODE 8
#define ITEM_TYPE_NUMBER 9
static
inline
void
input_ItemInit
(
vlc_object_t
*
p_o
,
input_item_t
*
p_i
)
{
memset
(
p_i
,
0
,
sizeof
(
input_item_t
)
);
p_i
->
psz_name
=
NULL
;
p_i
->
psz_uri
=
NULL
;
TAB_INIT
(
p_i
->
i_es
,
p_i
->
es
);
TAB_INIT
(
p_i
->
i_options
,
p_i
->
ppsz_options
);
TAB_INIT
(
p_i
->
i_categories
,
p_i
->
pp_categories
);
p_i
->
i_type
=
ITEM_TYPE_UNKNOWN
;
p_i
->
b_fixed_name
=
VLC_TRUE
;
p_i
->
p_stats
=
NULL
;
p_i
->
p_meta
=
NULL
;
vlc_mutex_init
(
p_o
,
&
p_i
->
lock
);
vlc_event_manager_init
(
&
p_i
->
event_manager
,
p_i
,
p_o
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemMetaChanged
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemSubItemAdded
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemDurationChanged
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemPreparsedChanged
);
}
static
inline
void
input_ItemCopyOptions
(
input_item_t
*
p_parent
,
input_item_t
*
p_child
)
{
...
...
@@ -327,80 +300,18 @@ static inline void input_item_SetDuration( input_item_t * p_i, mtime_t i_duratio
return
;
}
static
inline
void
input_item_SetPreparsed
(
input_item_t
*
p_i
,
vlc_bool_t
preparsed
)
{
vlc_bool_t
send_event
=
VLC_FALSE
;
if
(
!
p_i
->
p_meta
)
p_i
->
p_meta
=
vlc_meta_New
();
vlc_mutex_lock
(
&
p_i
->
lock
);
int
new_status
;
if
(
preparsed
)
new_status
=
p_i
->
p_meta
->
i_status
|
ITEM_PREPARSED
;
else
new_status
=
p_i
->
p_meta
->
i_status
&
~
ITEM_PREPARSED
;
if
(
p_i
->
p_meta
->
i_status
!=
new_status
)
{
p_i
->
p_meta
->
i_status
=
new_status
;
send_event
=
VLC_TRUE
;
}
vlc_mutex_unlock
(
&
p_i
->
lock
);
if
(
send_event
==
VLC_TRUE
)
{
vlc_event_t
event
;
event
.
type
=
vlc_InputItemPreparsedChanged
;
event
.
u
.
input_item_preparsed_changed
.
new_status
=
new_status
;
vlc_event_send
(
&
p_i
->
event_manager
,
&
event
);
}
}
static
inline
vlc_bool_t
input_item_IsPreparsed
(
input_item_t
*
p_i
)
{
return
p_i
->
p_meta
?
p_i
->
p_meta
->
i_status
&
ITEM_PREPARSED
:
VLC_FALSE
;
}
static
inline
void
input_item_SetMetaFetched
(
input_item_t
*
p_i
,
vlc_bool_t
metafetched
)
{
if
(
!
p_i
->
p_meta
)
p_i
->
p_meta
=
vlc_meta_New
();
if
(
metafetched
)
p_i
->
p_meta
->
i_status
|=
ITEM_META_FETCHED
;
else
p_i
->
p_meta
->
i_status
&=
~
ITEM_META_FETCHED
;
}
static
inline
vlc_bool_t
input_item_IsMetaFetched
(
input_item_t
*
p_i
)
{
return
p_i
->
p_meta
?
p_i
->
p_meta
->
i_status
&
ITEM_META_FETCHED
:
VLC_FALSE
;
}
static
inline
void
input_item_SetArtNotFound
(
input_item_t
*
p_i
,
vlc_bool_t
notfound
)
{
if
(
!
p_i
->
p_meta
)
p_i
->
p_meta
=
vlc_meta_New
();
if
(
notfound
)
p_i
->
p_meta
->
i_status
|=
ITEM_ART_NOTFOUND
;
else
p_i
->
p_meta
->
i_status
&=
~
ITEM_ART_NOTFOUND
;
}
static
inline
void
input_item_SetArtFetched
(
input_item_t
*
p_i
,
vlc_bool_t
artfetched
)
{
if
(
!
p_i
->
p_meta
)
p_i
->
p_meta
=
vlc_meta_New
();
if
(
artfetched
)
p_i
->
p_meta
->
i_status
|=
ITEM_ART_FETCHED
;
else
p_i
->
p_meta
->
i_status
&=
~
ITEM_ART_FETCHED
;
}
static
inline
vlc_bool_t
input_item_IsArtFetched
(
input_item_t
*
p_i
)
{
return
p_i
->
p_meta
?
p_i
->
p_meta
->
i_status
&
ITEM_ART_FETCHED
:
VLC_FALSE
;
...
...
src/input/input_internal.h
View file @
22c96ab6
...
...
@@ -217,6 +217,99 @@ static inline void input_ControlPush( input_thread_t *p_input,
vlc_mutex_unlock
(
&
p_input
->
p
->
lock_control
);
}
/** Stuff moved out of vlc_input.h -- FIXME: should probably not be inline
* anyway. */
static
inline
void
input_ItemInit
(
vlc_object_t
*
p_o
,
input_item_t
*
p_i
)
{
memset
(
p_i
,
0
,
sizeof
(
input_item_t
)
);
p_i
->
psz_name
=
NULL
;
p_i
->
psz_uri
=
NULL
;
TAB_INIT
(
p_i
->
i_es
,
p_i
->
es
);
TAB_INIT
(
p_i
->
i_options
,
p_i
->
ppsz_options
);
TAB_INIT
(
p_i
->
i_categories
,
p_i
->
pp_categories
);
p_i
->
i_type
=
ITEM_TYPE_UNKNOWN
;
p_i
->
b_fixed_name
=
VLC_TRUE
;
p_i
->
p_stats
=
NULL
;
p_i
->
p_meta
=
NULL
;
vlc_mutex_init
(
p_o
,
&
p_i
->
lock
);
vlc_event_manager_init
(
&
p_i
->
event_manager
,
p_i
,
p_o
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemMetaChanged
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemSubItemAdded
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemDurationChanged
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemPreparsedChanged
);
}
static
inline
void
input_item_SetPreparsed
(
input_item_t
*
p_i
,
vlc_bool_t
preparsed
)
{
vlc_bool_t
send_event
=
VLC_FALSE
;
if
(
!
p_i
->
p_meta
)
p_i
->
p_meta
=
vlc_meta_New
();
vlc_mutex_lock
(
&
p_i
->
lock
);
int
new_status
;
if
(
preparsed
)
new_status
=
p_i
->
p_meta
->
i_status
|
ITEM_PREPARSED
;
else
new_status
=
p_i
->
p_meta
->
i_status
&
~
ITEM_PREPARSED
;
if
(
p_i
->
p_meta
->
i_status
!=
new_status
)
{
p_i
->
p_meta
->
i_status
=
new_status
;
send_event
=
VLC_TRUE
;
}
vlc_mutex_unlock
(
&
p_i
->
lock
);
if
(
send_event
==
VLC_TRUE
)
{
vlc_event_t
event
;
event
.
type
=
vlc_InputItemPreparsedChanged
;
event
.
u
.
input_item_preparsed_changed
.
new_status
=
new_status
;
vlc_event_send
(
&
p_i
->
event_manager
,
&
event
);
}
}
static
inline
void
input_item_SetMetaFetched
(
input_item_t
*
p_i
,
vlc_bool_t
metafetched
)
{
if
(
!
p_i
->
p_meta
)
p_i
->
p_meta
=
vlc_meta_New
();
if
(
metafetched
)
p_i
->
p_meta
->
i_status
|=
ITEM_META_FETCHED
;
else
p_i
->
p_meta
->
i_status
&=
~
ITEM_META_FETCHED
;
}
static
inline
void
input_item_SetArtNotFound
(
input_item_t
*
p_i
,
vlc_bool_t
notfound
)
{
if
(
!
p_i
->
p_meta
)
p_i
->
p_meta
=
vlc_meta_New
();
if
(
notfound
)
p_i
->
p_meta
->
i_status
|=
ITEM_ART_NOTFOUND
;
else
p_i
->
p_meta
->
i_status
&=
~
ITEM_ART_NOTFOUND
;
}
static
inline
void
input_item_SetArtFetched
(
input_item_t
*
p_i
,
vlc_bool_t
artfetched
)
{
if
(
!
p_i
->
p_meta
)
p_i
->
p_meta
=
vlc_meta_New
();
if
(
artfetched
)
p_i
->
p_meta
->
i_status
|=
ITEM_ART_FETCHED
;
else
p_i
->
p_meta
->
i_status
&=
~
ITEM_ART_FETCHED
;
}
/**********************************************************************
* Item metadata
**********************************************************************/
...
...
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