Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
0f9d2a04
Commit
0f9d2a04
authored
8 years ago
by
Thomas Guillem
Browse files
Options
Downloads
Patches
Plain Diff
LibVLC: handle libvlc_MediaParsedStatus event
parent
e7e6f012
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libvlc/jni/libvlcjni-media.c
+6
-2
6 additions, 2 deletions
libvlc/jni/libvlcjni-media.c
libvlc/src/org/videolan/libvlc/Media.java
+6
-0
6 additions, 0 deletions
libvlc/src/org/videolan/libvlc/Media.java
with
12 additions
and
2 deletions
libvlc/jni/libvlcjni-media.c
+
6
−
2
View file @
0f9d2a04
...
...
@@ -39,6 +39,7 @@ static const libvlc_event_type_t m_events[] = {
libvlc_MediaDurationChanged
,
libvlc_MediaStateChanged
,
libvlc_MediaParsedChanged
,
libvlc_MediaParsedStatus
,
libvlc_MediaSubItemTreeAdded
,
-
1
,
};
...
...
@@ -52,11 +53,12 @@ Media_event_cb(vlcjni_object *p_obj, const libvlc_event_t *p_ev,
pthread_mutex_lock
(
&
p_sys
->
lock
);
if
(
p_ev
->
type
==
libvlc_MediaParsed
Changed
)
if
(
p_ev
->
type
==
libvlc_MediaParsed
Status
)
{
/* no need to send libvlc_MediaParsed
Changed
when parsing is synchronous */
/* no need to send libvlc_MediaParsed
Status
when parsing is synchronous */
if
(
p_sys
->
b_parsing_sync
)
b_dispatch
=
false
;
p_sys
->
b_parsing_sync
=
false
;
p_sys
->
b_parsing_async
=
false
;
pthread_cond_signal
(
&
p_sys
->
wait
);
...
...
@@ -87,6 +89,8 @@ Media_event_cb(vlcjni_object *p_obj, const libvlc_event_t *p_ev,
break
;
case
libvlc_MediaStateChanged
:
p_java_event
->
arg1
=
p_ev
->
u
.
media_state_changed
.
new_state
;
case
libvlc_MediaParsedStatus
:
p_java_event
->
arg1
=
p_ev
->
u
.
media_parsed_status
.
new_status
;
}
p_java_event
->
type
=
p_ev
->
type
;
return
true
;
...
...
This diff is collapsed.
Click to expand it.
libvlc/src/org/videolan/libvlc/Media.java
+
6
−
0
View file @
0f9d2a04
...
...
@@ -39,6 +39,7 @@ public class Media extends VLCObject<Media.Event> {
//public static final int Freed = 4;
public
static
final
int
StateChanged
=
5
;
public
static
final
int
SubItemTreeAdded
=
6
;
public
static
final
int
ParsedStatus
=
7
;
protected
Event
(
int
type
)
{
super
(
type
);
...
...
@@ -387,6 +388,9 @@ public class Media extends VLCObject<Media.Event> {
case
Event
.
ParsedChanged
:
postParse
();
break
;
case
Event
.
ParsedStatus
:
postParse
();
return
new
Event
(
eventType
,
arg1
);
case
Event
.
StateChanged
:
mState
=
-
1
;
break
;
...
...
@@ -459,6 +463,8 @@ public class Media extends VLCObject<Media.Event> {
private
synchronized
void
postParse
()
{
// fetch if parsed and not fetched
if
((
mParseStatus
&
PARSE_STATUS_PARSED
)
!=
0
)
return
;
mParseStatus
&=
~
PARSE_STATUS_PARSING
;
mParseStatus
|=
PARSE_STATUS_PARSED
;
mNativeTracks
=
null
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment