[vlc-commits] vout: android: remove useless pf typedef
Thomas Guillem
git at videolan.org
Mon Nov 28 16:37:46 CET 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Nov 23 10:25:16 2016 +0100| [ce3879d3df2e2621765b36db5a9e44431cb56e3f] | committer: Thomas Guillem
vout: android: remove useless pf typedef
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce3879d3df2e2621765b36db5a9e44431cb56e3f
---
modules/video_output/android/utils.c | 15 ++++------
modules/video_output/android/utils.h | 58 +++++++++++-------------------------
2 files changed, 23 insertions(+), 50 deletions(-)
diff --git a/modules/video_output/android/utils.c b/modules/video_output/android/utils.c
index 08d9f46..83a6e14 100644
--- a/modules/video_output/android/utils.c
+++ b/modules/video_output/android/utils.c
@@ -255,16 +255,11 @@ LoadNativeWindowAPI(AWindowHandler *p_awh)
return;
}
- p_awh->pf_winFromSurface =
- (ptr_ANativeWindow_fromSurface)(dlsym(p_library, "ANativeWindow_fromSurface"));
- p_awh->pf_winRelease =
- (ptr_ANativeWindow_release)(dlsym(p_library, "ANativeWindow_release"));
- p_awh->anw_api.winLock =
- (ptr_ANativeWindow_lock)(dlsym(p_library, "ANativeWindow_lock"));
- p_awh->anw_api.unlockAndPost =
- (ptr_ANativeWindow_unlockAndPost)(dlsym(p_library, "ANativeWindow_unlockAndPost"));
- p_awh->anw_api.setBuffersGeometry =
- (ptr_ANativeWindow_setBuffersGeometry)(dlsym(p_library, "ANativeWindow_setBuffersGeometry"));
+ p_awh->pf_winFromSurface = dlsym(p_library, "ANativeWindow_fromSurface");
+ p_awh->pf_winRelease = dlsym(p_library, "ANativeWindow_release");
+ p_awh->anw_api.winLock = dlsym(p_library, "ANativeWindow_lock");
+ p_awh->anw_api.unlockAndPost = dlsym(p_library, "ANativeWindow_unlockAndPost");
+ p_awh->anw_api.setBuffersGeometry = dlsym(p_library, "ANativeWindow_setBuffersGeometry");
if (p_awh->pf_winFromSurface && p_awh->pf_winRelease
&& p_awh->anw_api.winLock && p_awh->anw_api.unlockAndPost
diff --git a/modules/video_output/android/utils.h b/modules/video_output/android/utils.h
index a893fff..79cc15b 100644
--- a/modules/video_output/android/utils.h
+++ b/modules/video_output/android/utils.h
@@ -44,56 +44,34 @@ enum AWindow_ID {
/**
* native_window_api_t. See android/native_window.h in NDK
*/
-
-typedef int32_t (*ptr_ANativeWindow_lock)(ANativeWindow*, ANativeWindow_Buffer*, ARect*);
-typedef void (*ptr_ANativeWindow_unlockAndPost)(ANativeWindow*);
-typedef int32_t (*ptr_ANativeWindow_setBuffersGeometry)(ANativeWindow*, int32_t, int32_t, int32_t);
-
typedef struct
{
- ptr_ANativeWindow_lock winLock;
- ptr_ANativeWindow_unlockAndPost unlockAndPost;
- ptr_ANativeWindow_setBuffersGeometry setBuffersGeometry; /* can be NULL */
+ int32_t (*winLock)(ANativeWindow*, ANativeWindow_Buffer*, ARect*);
+ void (*unlockAndPost)(ANativeWindow*);
+ int32_t (*setBuffersGeometry)(ANativeWindow*, int32_t, int32_t, int32_t); /* can be NULL */
} native_window_api_t;
/**
* native_window_priv_api_t. See system/core/include/system/window.h in AOSP.
*/
-
typedef struct native_window_priv native_window_priv;
-typedef native_window_priv *(*ptr_ANativeWindowPriv_connect) (ANativeWindow *);
-typedef int (*ptr_ANativeWindowPriv_disconnect) (native_window_priv *);
-typedef int (*ptr_ANativeWindowPriv_setUsage) (native_window_priv *, bool, int );
-typedef int (*ptr_ANativeWindowPriv_setBuffersGeometry) (native_window_priv *, int, int, int );
-typedef int (*ptr_ANativeWindowPriv_getMinUndequeued) (native_window_priv *, unsigned int *);
-typedef int (*ptr_ANativeWindowPriv_getMaxBufferCount) (native_window_priv *, unsigned int *);
-typedef int (*ptr_ANativeWindowPriv_setBufferCount) (native_window_priv *, unsigned int );
-typedef int (*ptr_ANativeWindowPriv_setCrop) (native_window_priv *, int, int, int, int);
-typedef int (*ptr_ANativeWindowPriv_dequeue) (native_window_priv *, void **);
-typedef int (*ptr_ANativeWindowPriv_lock) (native_window_priv *, void *);
-typedef int (*ptr_ANativeWindowPriv_queue) (native_window_priv *, void *);
-typedef int (*ptr_ANativeWindowPriv_cancel) (native_window_priv *, void *);
-typedef int (*ptr_ANativeWindowPriv_lockData) (native_window_priv *, void **, ANativeWindow_Buffer *);
-typedef int (*ptr_ANativeWindowPriv_unlockData) (native_window_priv *, void *, bool b_render);
-typedef int (*ptr_ANativeWindowPriv_setOrientation) (native_window_priv *, int);
-
typedef struct
{
- ptr_ANativeWindowPriv_connect connect;
- ptr_ANativeWindowPriv_disconnect disconnect;
- ptr_ANativeWindowPriv_setUsage setUsage;
- ptr_ANativeWindowPriv_setBuffersGeometry setBuffersGeometry;
- ptr_ANativeWindowPriv_getMinUndequeued getMinUndequeued;
- ptr_ANativeWindowPriv_getMaxBufferCount getMaxBufferCount;
- ptr_ANativeWindowPriv_setBufferCount setBufferCount;
- ptr_ANativeWindowPriv_setCrop setCrop;
- ptr_ANativeWindowPriv_dequeue dequeue;
- ptr_ANativeWindowPriv_lock lock;
- ptr_ANativeWindowPriv_lockData lockData;
- ptr_ANativeWindowPriv_unlockData unlockData;
- ptr_ANativeWindowPriv_queue queue;
- ptr_ANativeWindowPriv_cancel cancel;
- ptr_ANativeWindowPriv_setOrientation setOrientation;
+ native_window_priv *(*connect)(ANativeWindow *);
+ int (*disconnect) (native_window_priv *);
+ int (*setUsage) (native_window_priv *, bool, int );
+ int (*setBuffersGeometry) (native_window_priv *, int, int, int );
+ int (*getMinUndequeued) (native_window_priv *, unsigned int *);
+ int (*getMaxBufferCount) (native_window_priv *, unsigned int *);
+ int (*setBufferCount) (native_window_priv *, unsigned int );
+ int (*setCrop) (native_window_priv *, int, int, int, int);
+ int (*dequeue) (native_window_priv *, void **);
+ int (*lock) (native_window_priv *, void *);
+ int (*queue) (native_window_priv *, void *);
+ int (*cancel) (native_window_priv *, void *);
+ int (*lockData) (native_window_priv *, void **, ANativeWindow_Buffer *);
+ int (*unlockData) (native_window_priv *, void *, bool b_render);
+ int (*setOrientation) (native_window_priv *, int);
} native_window_priv_api_t;
/**
More information about the vlc-commits
mailing list