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
163e6d83
Commit
163e6d83
authored
Mar 03, 2015
by
Thomas Guillem
Committed by
Jean-Baptiste Kempf
Mar 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiotrack: check init state
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
20051e61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
modules/audio_output/audiotrack.c
modules/audio_output/audiotrack.c
+9
-0
No files found.
modules/audio_output/audiotrack.c
View file @
163e6d83
...
...
@@ -138,6 +138,7 @@ static struct
jclass
clazz
;
jmethodID
ctor
;
jmethodID
release
;
jmethodID
getState
;
jmethodID
play
;
jmethodID
stop
;
jmethodID
flush
;
...
...
@@ -146,6 +147,7 @@ static struct
jmethodID
getPlaybackHeadPosition
;
jmethodID
getTimestamp
;
jmethodID
getMinBufferSize
;
jint
STATE_INITIALIZED
;
jint
MODE_STREAM
;
jint
ERROR
;
jint
ERROR_BAD_VALUE
;
...
...
@@ -238,6 +240,7 @@ InitJNIFields( audio_output_t *p_aout )
GET_ID
(
GetMethodID
,
AudioTrack
.
ctor
,
"<init>"
,
"(IIIIII)V"
,
true
);
GET_ID
(
GetMethodID
,
AudioTrack
.
release
,
"release"
,
"()V"
,
true
);
GET_ID
(
GetMethodID
,
AudioTrack
.
getState
,
"getState"
,
"()I"
,
true
);
GET_ID
(
GetMethodID
,
AudioTrack
.
play
,
"play"
,
"()V"
,
true
);
GET_ID
(
GetMethodID
,
AudioTrack
.
stop
,
"stop"
,
"()V"
,
true
);
GET_ID
(
GetMethodID
,
AudioTrack
.
flush
,
"flush"
,
"()V"
,
true
);
...
...
@@ -251,6 +254,7 @@ InitJNIFields( audio_output_t *p_aout )
GET_ID
(
GetStaticMethodID
,
AudioTrack
.
getMinBufferSize
,
"getMinBufferSize"
,
"(III)I"
,
true
);
GET_CONST_INT
(
AudioTrack
.
STATE_INITIALIZED
,
"STATE_INITIALIZED"
,
true
);
GET_CONST_INT
(
AudioTrack
.
MODE_STREAM
,
"MODE_STREAM"
,
true
);
GET_CONST_INT
(
AudioTrack
.
ERROR
,
"ERROR"
,
true
);
GET_CONST_INT
(
AudioTrack
.
ERROR_BAD_VALUE
,
"ERROR_BAD_VALUE"
,
true
);
...
...
@@ -570,6 +574,11 @@ JNIThread_Start( JNIEnv *env, audio_output_t *p_aout )
(
*
env
)
->
DeleteLocalRef
(
env
,
p_audiotrack
);
if
(
!
p_sys
->
p_audiotrack
)
return
VLC_EGENERIC
;
if
(
JNI_AT_CALL_INT
(
getState
)
!=
jfields
.
AudioTrack
.
STATE_INITIALIZED
)
{
msg_Err
(
p_aout
,
"AudioTrack init failed"
);
goto
error
;
}
if
(
jfields
.
AudioTimestamp
.
clazz
)
{
...
...
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