* Ludovic Fauvet <etix@l0cal.com>
* Sébastien Toque <xilasz@gmail.com>
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- ****************************************************************************/
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#ifndef ANDROID_SYM_S_LOCK
# define ANDROID_SYM_S_LOCK "_ZN7android7Surface4lockEPNS0_11SurfaceInfoEb"
#endif
+#ifndef ANDROID_SYM_S_LOCK2
+# define ANDROID_SYM_S_LOCK2 "_ZN7android7Surface4lockEPNS0_11SurfaceInfoEPNS_6RegionE"
+#endif
#ifndef ANDROID_SYM_S_UNLOCK
# define ANDROID_SYM_S_UNLOCK "_ZN7android7Surface13unlockAndPostEv"
#endif
// _ZN7android7Surface4lockEPNS0_11SurfaceInfoEb
typedef void (*Surface_lock)(void *, void *, int);
+// _ZN7android7Surface4lockEPNS0_11SurfaceInfoEPNS_6RegionE
+typedef void (*Surface_lock2)(void *, void *, void *);
// _ZN7android7Surface13unlockAndPostEv
typedef void (*Surface_unlockAndPost)(void *);
picture_pool_t *pool;
void *p_library;
Surface_lock s_lock;
+ Surface_lock2 s_lock2;
Surface_unlockAndPost s_unlockAndPost;
picture_resource_t resource;
void *p_library = dlopen(psz_lib, RTLD_NOW);
if (p_library) {
sys->s_lock = (Surface_lock)(dlsym(p_library, ANDROID_SYM_S_LOCK));
+ sys->s_lock2 = (Surface_lock2)(dlsym(p_library, ANDROID_SYM_S_LOCK2));
sys->s_unlockAndPost =
(Surface_unlockAndPost)(dlsym(p_library, ANDROID_SYM_S_UNLOCK));
- if (sys->s_lock && sys->s_unlockAndPost) {
+ if ((sys->s_lock || sys->s_lock2) && sys->s_unlockAndPost) {
return p_library;
}
dlclose(p_library);
void *p_library;
if ((p_library = LoadSurface("libsurfaceflinger_client.so", sys)))
return p_library;
+ if ((p_library = LoadSurface("libgui.so", sys)))
+ return p_library;
return LoadSurface("libui.so", sys);
}
sys->p_library = p_library = InitLibrary(sys);
if (!p_library) {
free(sys);
- msg_Err(vd, "Could not initialize libui.so/libsurfaceflinger_client.so!");
+ msg_Err(vd, "Could not initialize libui.so/libgui.so/libsurfaceflinger_client.so!");
vlc_mutex_unlock(&single_instance);
return VLC_EGENERIC;
}
return VLC_EGENERIC;
}
- sys->s_lock(surf, info, 1);
+ if (sys->s_lock)
+ sys->s_lock(surf, info, 1);
+ else
+ sys->s_lock2(surf, info, NULL);
// input size doesn't match the surface size,
// request a resize