From 55e2d7ad3a07aef0556f75b623509356f6e90d61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Romain=20Roff=C3=A9?= <rofferom@gmail.com>
Date: Thu, 29 Sep 2022 14:59:55 +0200
Subject: [PATCH] Bind libvlc_media_player_set_android_context()

---
 src/media_player.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/media_player.rs b/src/media_player.rs
index ee38b4c..5508148 100644
--- a/src/media_player.rs
+++ b/src/media_player.rs
@@ -147,6 +147,13 @@ impl MediaPlayer {
         unsafe{ sys::libvlc_media_player_set_hwnd(self.ptr, drawable) };
     }
 
+    /// Set an Android surface where the media player should render its video output.
+    ///
+    /// drawable is a org.videolan.libvlc.AWindow jobject from the libvlcjni project
+    pub fn set_android_context(&self, drawable: *mut c_void) {
+        unsafe{ sys::libvlc_media_player_set_android_context(self.ptr, drawable) };
+    }
+
     /// Get the Windows API window handle (HWND) previously set with set_hwnd().
     pub fn get_hwnd(&self) -> Option<*mut c_void> {
         let hwnd = unsafe{ sys::libvlc_media_player_get_hwnd(self.ptr) };