Thomas Guillem
1b1e20dde2
android/utils: clear the surface starting Android M
10 years ago
Thomas Guillem
6aa4e946a5
android/utils: fail early if there is no private libs
This will be soon the most common case.
10 years ago
Thomas Guillem
810a890dc7
android_window: clear the video surface when closing
10 years ago
Thomas Guillem
029ef55a42
android/utils: AWindowHandler_releaseANativeWindow can clear the surface
10 years ago
Thomas Guillem
64252ac8e4
android/utils: remove AWindowHandler_releaseSurface
AWindowHandler_releaseANativeWindow should be used instead.
AWindowHandler_getSurface and AWindowHandler_getANativeWindow do the same
initialisation now.
10 years ago
Thomas Guillem
71de36547e
android/utils: fix warning
10 years ago
Thomas Guillem
a1a141457a
nativewindowpriv.c: fix warnings
10 years ago
Thomas Guillem
4e213ff344
video_output/android: remove sendHardwareAccelerationError
10 years ago
Thomas Guillem
155fbc6bbc
mediacodec: fix crash when reporting a hw error
11 years ago
Thomas Guillem
4f5af4a46a
mediacodec: fix Android error callback not sent in case of early fail
This is the last android ugly hack. This will be gone with the decoder fallback.
11 years ago
Thomas Guillem
61e7080da3
mediacodec: remove external jni_EventHardwareAccelerationError
Replace it by AWindowHandler_sendHardwareAccelerationError.
This avoid a dependency towards android libvlcjni.
This solution is not perfect, it will be removed when decoder fallback is
implemented.
11 years ago
Thomas Guillem
f920713596
android_utils: use ExceptionCheck
Convenience function to check for pending exceptions without creating a local
reference to the exception object (that was not released).
11 years ago
Rémi Denis-Courmont
f343ca522c
Fix use of %p format string specifier
%p is only for pointers to void, not just any type of pointers. Due to
variable arguments, there is no implicit conversion here.
11 years ago
Jean-Baptiste Kempf
a80264d83d
Android vout: log when you can't get a subtitle surface
If there is no secondary surface, and we're using opaque -> no blend,
and no spu
11 years ago
Romain Bentz
96a0873655
Android vout: Correctly clear SPU regions when Close() is called
Previously, when Close() was called, SPU region were not properly cleared.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
11 years ago
Jean-Baptiste Kempf
77407471e4
Android vout: remove trailing space
11 years ago
Romain Bentz
97f1d2bdc1
Android vout: Correctly display SPU on region change
Previously, when SPU id was identical but its region changed, it wasn't correctly redrawn.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
11 years ago
Thomas Guillem
890f8e0f98
android: remove get_android_opaque_mutex()
Replace it with a mutex per picture_sys_t. When doing direct rendering, the
picture_sys_t is refcounted between the vout and the decoder.
11 years ago
Thomas Guillem
08e519a420
android: AWindowHandler_releaseSurface now release the ANativeWindow
11 years ago
Thomas Guillem
52e2e90f91
Revert "android: rework AWindowHandler interface"
This reverts commit 159a6f1eb0 .
This is finally not needed by a future patch, and it's less obvious.
11 years ago
Thomas Guillem
9d9f6d4d74
android_window: use vlc_mutex
11 years ago
Thomas Guillem
db9a3864c2
android_window: don't try to configure if opaque
11 years ago
Thomas Guillem
159a6f1eb0
android: rework AWindowHandler interface
Use the jsurface instead of the id for AWindowHandler_getANativeWindow and
AWindowHandler_setBuffersGeometry.
AWindowHandler_releaseSurface now release the jsurface and the ANativeWindow.
11 years ago
Thomas Guillem
e29f8ecf6a
android: add AWindowHandler and android_getEnv
android_getEnv: get a JNIEnv* from the Java VM passed via the "android-jvm"
option.
AWindowHandler: utility class that provide a way to get the Video / Subtitles
Java Surface or ANativeWindow.
11 years ago
Thomas Guillem
64ea87bec4
android_window: add chroma option
This option was previously set by androidsurface.
11 years ago
Thomas Guillem
918ed4d12d
android: merge android_surface with android_window
This commits remove the android_surface module. The old android surface API is
now used by the android_window module via native_window_api_t.
11 years ago
Thomas Guillem
107f9f6aff
android_window: add a fallback to SW subpicture blending
Fallback to SW subpicture blending if there is no subtitle surfaces.
12 years ago
Thomas Guillem
64354a2722
android_window: setup surface from AndroidWindow_New
12 years ago
Thomas Guillem
429baf94ff
android_window: move AndroidWindow_SetSurface up
12 years ago
Thomas Guillem
a83f5d13fa
android_window: fix segfault if PictureAlloc fails
12 years ago
Thomas Guillem
027663d02d
android: remove jni_IsVideoPlayerActivityCreated
VideoPlayer is now started when surfaces are available.
If no surfaces are available, don't wait for it, and return an error (and
fallback to audio only).
12 years ago
Thomas Guillem
6ce78b99b6
android: update with last jni_LockAndGetAndroidJavaSurface changes
if jni_LockAndGetAndroidJavaSurface returns NULL, no need to unlock.
12 years ago
Thomas Guillem
0b83473c64
android_window: refactor and move functions
12 years ago
Thomas Guillem
16c0f37bc7
android: simplify/improve the attachment of a thread to the Java VM
There is now only one way to get a JNIEnv: jni_get_env. This function use the
thread-specific data (TSD) areas to save a JNIEnv into a TSD key. The thread
will be automatically detached to the Java VM when it's canceled or exited.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
2229cd9ca9
android_window: fix typo from "fix subtitles placement"
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
d32c329299
android_window: check subpicture i_order instead of comparing md5
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
35fc5692e1
android_window: fix subtitles placement
Use the biggest size available between display and video size.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
362e47dc77
android_window: don't call setBuffersGeometry if already configured on java side
It fixes buffer allocations on some old android versions.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
aadd0e16a6
nativewindowpriv: split setup into setUsage and setBuffersGeometry
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
43c9fa302c
android_window: fix deadlock if android surface won't be created
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Jean-Baptiste Kempf
9315b25ab8
Bump Android Window priority: it can do hardware subpicture blending
12 years ago
Thomas Guillem
e5d6c04c14
android_window: check subtitles bounds
(fixes #13350 )
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
bff20615be
android/surface: fix prototype
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
7ead8cf09e
android_window: fix subtitle clear area too big
This led to a memory corruption.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
a97bb6d840
android_window: prepare subtitles on vd->prepare
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
03b99beed1
android_window: don't clear full subtitle area
Do a memset only on previous area.
Subtitle Display is now 15% - 25% faster (depends on window resolution).
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
e0675b9e72
android_window: improve subtitles resolution
This commit scale the subtitles to the android window size.
The vout is now fullscreen and update the display size with the value returned
by jni_GetWindowSize.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
347926827a
android_window: set i_angle for anw too
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
fb1e47e8eb
android_window: create sub filter after sub pic alloc
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Thomas Guillem
1b8c3ae1dd
android_window: don't release sub_pic in vd->control
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago