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
f6ee16ae
Commit
f6ee16ae
authored
Jul 15, 2007
by
Philippe Morin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add libvlc_media_instance_release(input) call to correctly release
the media instance.
parent
179c1855
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
bindings/java/src/audio-jni.cc
bindings/java/src/audio-jni.cc
+3
-1
bindings/java/src/input-jni.cc
bindings/java/src/input-jni.cc
+9
-0
bindings/java/src/video-jni.cc
bindings/java/src/video-jni.cc
+14
-0
No files found.
bindings/java/src/audio-jni.cc
View file @
f6ee16ae
...
...
@@ -41,7 +41,8 @@ JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Audio__1getTrack (JNIEnv *env, job
jint
res
=
0
;
res
=
libvlc_audio_get_track
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -54,6 +55,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1setTrack (JNIEnv *env, job
libvlc_audio_set_track
(
input
,
value
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
}
...
...
bindings/java/src/input-jni.cc
View file @
f6ee16ae
...
...
@@ -39,6 +39,8 @@ JNIEXPORT jlong JNICALL Java_org_videolan_jvlc_Input__1getLength (JNIEnv *env, j
GET_INPUT_THREAD
;
res
=
libvlc_media_instance_get_length
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -52,6 +54,7 @@ JNIEXPORT jfloat JNICALL Java_org_videolan_jvlc_Input__1getPosition (JNIEnv *env
GET_INPUT_THREAD
;
res
=
libvlc_media_instance_get_position
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -65,6 +68,7 @@ JNIEXPORT jlong JNICALL Java_org_videolan_jvlc_Input__1getTime (JNIEnv *env, job
GET_INPUT_THREAD
;
res
=
libvlc_media_instance_get_time
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -78,6 +82,7 @@ JNIEXPORT jfloat JNICALL Java_org_videolan_jvlc_Input__1getFPS (JNIEnv *env, job
GET_INPUT_THREAD
;
res
=
libvlc_media_instance_get_fps
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -90,6 +95,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Input__1setTime (JNIEnv *env, jobj
GET_INPUT_THREAD
;
libvlc_media_instance_set_time
(
input
,
time
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
}
...
...
@@ -101,6 +107,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Input__1setPosition (JNIEnv *env,
GET_INPUT_THREAD
;
libvlc_media_instance_set_position
(
input
,
position
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
}
...
...
@@ -112,6 +119,7 @@ JNIEXPORT jboolean JNICALL Java_org_videolan_jvlc_Input__1isPlaying (JNIEnv *env
GET_INPUT_THREAD
;
res
=
libvlc_media_instance_will_play
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -125,6 +133,7 @@ JNIEXPORT jboolean JNICALL Java_org_videolan_jvlc_Input__1hasVout (JNIEnv *env,
GET_INPUT_THREAD
;
res
=
libvlc_media_instance_has_vout
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
bindings/java/src/video-jni.cc
View file @
f6ee16ae
...
...
@@ -42,6 +42,8 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1toggleFullscreen (JNIEnv *
libvlc_toggle_fullscreen
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
}
...
...
@@ -53,6 +55,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1setFullscreen (JNIEnv *env
libvlc_set_fullscreen
(
input
,
value
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
}
...
...
@@ -65,6 +68,7 @@ JNIEXPORT jboolean JNICALL Java_org_videolan_jvlc_Video__1getFullscreen (JNIEnv
res
=
libvlc_get_fullscreen
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -79,6 +83,7 @@ JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Video__1getHeight (JNIEnv *env, jo
res
=
libvlc_video_get_height
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -93,6 +98,7 @@ JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Video__1getWidth (JNIEnv *env, job
res
=
libvlc_video_get_width
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
return
res
;
...
...
@@ -108,6 +114,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1getSnapshot (JNIEnv *env,
libvlc_video_take_snapshot
(
input
,
(
char
*
)
psz_filepath
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
if
(
psz_filepath
!=
NULL
)
{
...
...
@@ -124,6 +131,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1destroyVideo (JNIEnv *env,
libvlc_video_destroy
(
input
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
}
...
...
@@ -150,6 +158,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
awt
.
version
=
JAWT_VERSION_1_3
;
if
(
JAWT_GetAWT
(
env
,
&
awt
)
==
JNI_FALSE
)
{
printf
(
"AWT Not found
\n
"
);
libvlc_media_instance_release
(
input
);
return
;
}
...
...
@@ -157,6 +166,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
ds
=
awt
.
GetDrawingSurface
(
env
,
canvas
);
if
(
ds
==
NULL
)
{
printf
(
"NULL drawing surface
\n
"
);
libvlc_media_instance_release
(
input
);
return
;
}
...
...
@@ -165,6 +175,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
if
((
lock
&
JAWT_LOCK_ERROR
)
!=
0
)
{
printf
(
"Error locking surface
\n
"
);
awt
.
FreeDrawingSurface
(
ds
);
libvlc_media_instance_release
(
input
);
return
;
}
...
...
@@ -174,6 +185,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
printf
(
"Error getting surface info
\n
"
);
ds
->
Unlock
(
ds
);
awt
.
FreeDrawingSurface
(
ds
);
libvlc_media_instance_release
(
input
);
return
;
}
...
...
@@ -184,6 +196,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
drawable
=
reinterpret_cast
<
int
>
(
dsi_win
->
hwnd
);
libvlc_video_set_parent
((
libvlc_instance_t
*
)
instance
,
drawable
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
...
...
@@ -311,5 +324,6 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1setSize (JNIEnv *env, jobj
libvlc_video_resize
(
input
,
width
,
height
,
exception
);
libvlc_media_instance_release
(
input
);
CHECK_EXCEPTION_FREE
;
}
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