s***@gmail.com
2017-10-05 07:47:36 UTC
Hi,
Developing Android NDK based renderer for Video call App
When call is started, receiving Surface (S1) from App which is being passed
via JNI to Native Code where "ANativeWindow_fromSurface" is called on this
Surface to get AnativeWindow
and then on this nativewindow "ANativeWindow_acquire" is called.
Then again receiving another surface (S2) from App, this new Surface is
also passed via JNI to Native and again on this surface
"ANativeWindow_fromSurface" is called.
Before doing "ANativeWindow_acquire" on this new window, for the previous
window "ANativeWindow_release" is called, then for new window
"ANativeWindow_acquire" is called
and rendering is done using "ANativeWindow_lock" and
"ANativeWindow_unlockAndPost", till this point it works fine and rendering
is happening.
But as the device is rotated from Portrait to Landscape, again Surface (S1)
is coming from App, which is again passed via JNI to native code
and "ANativeWindow_fromSurface" is called to get Window.
Then again "ANativeWindow_acquire" is called on this window, and now when
try to render using "ANativeWindow_lock" and "ANativeWindow_unlockAndPost",
*ANativeWindow_lock is giving error -22*
*BufferQueueProducer: [SurfaceView -
com.sec.svetestapp/com.sec.svetestapp.main] connect: already connected
(cur=2 req=2)*
Has someone faced this problem, and have solution to it ??
Is something being missed to be done, when for first Surface (S1) ,
ANativeWindow_release is called, because it looks like when the same
Surface is given by App again
then this issue is happening.
*Note:* When "native_window_api_disconnect" is called on window before
releasing then this issue is not happening.
But since I am trying to do NDK build using NDK interfaces, so
"native_window_api_disconnect" cannot be called.
Thanks in advance
Developing Android NDK based renderer for Video call App
When call is started, receiving Surface (S1) from App which is being passed
via JNI to Native Code where "ANativeWindow_fromSurface" is called on this
Surface to get AnativeWindow
and then on this nativewindow "ANativeWindow_acquire" is called.
Then again receiving another surface (S2) from App, this new Surface is
also passed via JNI to Native and again on this surface
"ANativeWindow_fromSurface" is called.
Before doing "ANativeWindow_acquire" on this new window, for the previous
window "ANativeWindow_release" is called, then for new window
"ANativeWindow_acquire" is called
and rendering is done using "ANativeWindow_lock" and
"ANativeWindow_unlockAndPost", till this point it works fine and rendering
is happening.
But as the device is rotated from Portrait to Landscape, again Surface (S1)
is coming from App, which is again passed via JNI to native code
and "ANativeWindow_fromSurface" is called to get Window.
Then again "ANativeWindow_acquire" is called on this window, and now when
try to render using "ANativeWindow_lock" and "ANativeWindow_unlockAndPost",
*ANativeWindow_lock is giving error -22*
*BufferQueueProducer: [SurfaceView -
com.sec.svetestapp/com.sec.svetestapp.main] connect: already connected
(cur=2 req=2)*
Has someone faced this problem, and have solution to it ??
Is something being missed to be done, when for first Surface (S1) ,
ANativeWindow_release is called, because it looks like when the same
Surface is given by App again
then this issue is happening.
*Note:* When "native_window_api_disconnect" is called on window before
releasing then this issue is not happening.
But since I am trying to do NDK build using NDK interfaces, so
"native_window_api_disconnect" cannot be called.
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/8f7e5c10-4648-4b3f-8ef4-d9da1d8b929d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/8f7e5c10-4648-4b3f-8ef4-d9da1d8b929d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.