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
f2b2e37c
Commit
f2b2e37c
authored
Aug 01, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: Expose input_ItemHasErrorWhenReading.
parent
d727c459
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
15 deletions
+43
-15
include/vlc_events.h
include/vlc_events.h
+5
-0
include/vlc_input.h
include/vlc_input.h
+8
-0
src/input/input_internal.h
src/input/input_internal.h
+3
-0
src/input/item.c
src/input/item.c
+24
-13
src/libvlc-module.c
src/libvlc-module.c
+2
-2
src/misc/events.c
src/misc/events.c
+1
-0
No files found.
include/vlc_events.h
View file @
f2b2e37c
...
...
@@ -123,6 +123,7 @@ typedef enum vlc_event_type_t {
vlc_InputItemPreparsedChanged
,
vlc_InputItemNameChanged
,
vlc_InputItemInfoChanged
,
vlc_InputItemErrorWhenReadingChanged
,
/* Service Discovery event */
vlc_ServicesDiscoveryItemAdded
,
...
...
@@ -173,6 +174,10 @@ typedef struct vlc_event_t
{
void
*
unused
;
}
input_item_info_changed
;
struct
input_item_error_when_reading_changed
{
bool
new_value
;
}
input_item_error_when_reading_changed
;
/* Service discovery events */
struct
vlc_services_discovery_item_added
...
...
include/vlc_input.h
View file @
f2b2e37c
...
...
@@ -78,6 +78,8 @@ struct input_item_t
input_stats_t
*
p_stats
;
/**< Statistics */
int
i_nb_played
;
/**< Number of times played */
bool
b_error_when_reading
;
/**< Error When Reading */
vlc_meta_t
*
p_meta
;
vlc_event_manager_t
event_manager
;
...
...
@@ -157,6 +159,12 @@ int input_ItemAddOption (input_item_t *item, const char *str)
return
input_ItemAddOpt
(
item
,
str
,
VLC_INPUT_OPTION_TRUSTED
);
}
static
inline
int
input_ItemHasErrorWhenReading
(
input_item_t
*
item
)
{
return
item
->
b_error_when_reading
;
}
VLC_EXPORT
(
void
,
input_item_SetMeta
,
(
input_item_t
*
p_i
,
vlc_meta_type_t
meta_type
,
const
char
*
psz_val
));
...
...
src/input/input_internal.h
View file @
f2b2e37c
...
...
@@ -281,6 +281,7 @@ static inline void input_item_SetArtFetched( input_item_t *p_i, bool artfetched
p_i
->
p_meta
->
i_status
&=
~
ITEM_ART_FETCHED
;
}
void
input_item_SetHasErrorWhenReading
(
input_item_t
*
p_i
,
bool
error
);
/**********************************************************************
* Item metadata
...
...
@@ -390,6 +391,8 @@ static inline void input_ChangeStateWithVarCallback( input_thread_t *p_input, in
p_input
->
i_state
=
state
;
input_item_SetHasErrorWhenReading
(
p_input
->
p
->
input
.
p_item
,
(
state
==
ERROR_S
)
);
if
(
callback
)
{
var_SetInteger
(
p_input
,
"state"
,
state
);
...
...
src/input/item.c
View file @
f2b2e37c
...
...
@@ -53,19 +53,15 @@ static inline void input_ItemInit( vlc_object_t *p_o, input_item_t *p_i )
p_i
->
p_meta
=
NULL
;
vlc_mutex_init
(
&
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
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemNameChanged
);
vlc_event_manager_register_event_type
(
&
p_i
->
event_manager
,
vlc_InputItemInfoChanged
);
vlc_event_manager_t
*
p_em
=
&
p_i
->
event_manager
;
vlc_event_manager_init
(
p_em
,
p_i
,
p_o
);
vlc_event_manager_register_event_type
(
p_em
,
vlc_InputItemMetaChanged
);
vlc_event_manager_register_event_type
(
p_em
,
vlc_InputItemSubItemAdded
);
vlc_event_manager_register_event_type
(
p_em
,
vlc_InputItemDurationChanged
);
vlc_event_manager_register_event_type
(
p_em
,
vlc_InputItemPreparsedChanged
);
vlc_event_manager_register_event_type
(
p_em
,
vlc_InputItemNameChanged
);
vlc_event_manager_register_event_type
(
p_em
,
vlc_InputItemInfoChanged
);
vlc_event_manager_register_event_type
(
p_em
,
vlc_InputItemErrorWhenReadingChanged
);
}
static
inline
void
input_ItemClean
(
input_item_t
*
p_i
)
...
...
@@ -120,6 +116,21 @@ static inline void input_ItemClean( input_item_t *p_i )
vlc_mutex_destroy
(
&
p_i
->
lock
);
}
void
input_item_SetHasErrorWhenReading
(
input_item_t
*
p_i
,
bool
error
)
{
vlc_event_t
event
;
if
(
p_i
->
b_error_when_reading
==
error
)
return
;
p_i
->
b_error_when_reading
=
error
;
/* Notify interested third parties */
event
.
type
=
vlc_InputItemErrorWhenReadingChanged
;
event
.
u
.
input_item_error_when_reading_changed
.
new_value
=
error
;
vlc_event_send
(
&
p_i
->
event_manager
,
&
event
);
}
void
input_item_SetMeta
(
input_item_t
*
p_i
,
vlc_meta_type_t
meta_type
,
const
char
*
psz_val
)
{
vlc_event_t
event
;
...
...
src/libvlc-module.c
View file @
f2b2e37c
...
...
@@ -1513,8 +1513,8 @@ vlc_module_begin();
add_integer
(
"video-title-position"
,
8
,
NULL
,
VIDEO_TITLE_POSITION_TEXT
,
VIDEO_TITLE_POSITION_LONGTEXT
,
false
);
change_integer_list
(
pi_pos_values
,
ppsz_pos_descriptions
,
0
);
// autohide after
3
s
add_integer
(
"mouse-hide-timeout"
,
30
00
,
NULL
,
MOUSE_HIDE_TIMEOUT_TEXT
,
// autohide after
1.5
s
add_integer
(
"mouse-hide-timeout"
,
15
00
,
NULL
,
MOUSE_HIDE_TIMEOUT_TEXT
,
MOUSE_HIDE_TIMEOUT_LONGTEXT
,
false
);
set_section
(
N_
(
"Snapshot"
)
,
NULL
);
add_directory
(
"snapshot-path"
,
NULL
,
NULL
,
SNAP_PATH_TEXT
,
...
...
src/misc/events.c
View file @
f2b2e37c
...
...
@@ -81,6 +81,7 @@ static const char ppsz_event_type_to_name[][33] =
[
vlc_InputItemPreparsedChanged
]
=
"vlc_InputItemPreparsedChanged"
,
[
vlc_InputItemNameChanged
]
=
"vlc_InputItemNameChanged"
,
[
vlc_InputItemInfoChanged
]
=
"vlc_InputItemInfoChanged"
,
[
vlc_InputItemErrorWhenReadingChanged
]
=
"vlc_InputItemErrorWhenReadingChanged"
,
[
vlc_ServicesDiscoveryItemAdded
]
=
"vlc_ServicesDiscoveryItemAdded"
,
[
vlc_ServicesDiscoveryItemRemoved
]
=
"vlc_ServicesDiscoveryItemRemoved"
...
...
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