<div dir="ltr"><div dir="ltr">Looks good to me.</div></div><br><div class="gmail_quote"><div dir="ltr">Le mer. 31 mai 2017 à 18:42, Duncan McNamara <<a href="mailto:dcn.mcnamara@gmail.com">dcn.mcnamara@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 .../org/videolan/vlc/gui/video/benchmark/BenchActivity.java | 13 +++++++++++--<br>
 1 file changed, 11 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java<br>
index 791c99c..d4e2c33 100644<br>
--- a/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java<br>
+++ b/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java<br>
@@ -68,6 +68,7 @@ public class BenchActivity extends ShallowVideoPlayer {<br>
     private static final String PLAYBACK = "org.videolan.vlc.gui.video.benchmark.ACTION_PLAYBACK";<br>
<br>
     private static final String TIMESTAMPS = "org.videolan.vlc.gui.video.benchmark.TIMESTAMPS";<br>
+    private static final String INTENT_SCREENSHOT_DIR = "SCREENSHOT_DIR";<br>
     private static final String TAG = "VLCBenchmark";<br>
     private static final int REQUEST_SCREENSHOT = 666;<br>
<br>
@@ -101,6 +102,8 @@ public class BenchActivity extends ShallowVideoPlayer {<br>
     /* set to true when Vout event is received<br>
      * used to check if hardware decoder works */<br>
     private boolean mHasVout = false;<br>
+    /* screenshot directory location */<br>
+    private String screenshotDir;<br>
<br>
     @Override<br>
     protected void loadMedia() {<br>
@@ -126,6 +129,11 @@ public class BenchActivity extends ShallowVideoPlayer {<br>
         }<br>
         mIsBenchmark = true;<br>
<br>
+        if (!intent.hasExtra(INTENT_SCREENSHOT_DIR)) {<br>
+            errorFinish("Failed to get screenshot directory location");<br>
+        }<br>
+        screenshotDir = intent.getStringExtra(INTENT_SCREENSHOT_DIR);<br>
+<br>
         super.onCreate(savedInstanceState);<br>
<br>
         /* Determining the benchmark mode */<br>
@@ -422,11 +430,12 @@ public class BenchActivity extends ShallowVideoPlayer {<br>
                         if (bitmap != null) {<br>
                             bitmap.copyPixelsFromBuffer(buffer);<br>
<br>
-                            File folder = new File(Environment.getExternalStorageDirectory() + File.separator + "screenshotFolder");<br>
+                            String folderStr = screenshotDir;<br>
+                            File folder = new File(folderStr);<br>
<br>
                             if (!folder.exists()) {<br>
                                 if (!folder.mkdir()) {<br>
-                                    errorFinish("Failed to create screenshotFolder");<br>
+                                    errorFinish("Failed to create screenshot directory");<br>
                                 }<br>
                             }<br>
<br>
--<br>
2.7.5<br>
<br>
_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org" target="_blank">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
</blockquote></div>