Loading media/java/android/media/videoeditor/VideoEditorImpl.java +22 −3 Original line number Diff line number Diff line Loading @@ -59,6 +59,11 @@ public class VideoEditorImpl implements VideoEditor { */ final Semaphore mPreviewSemaphore = new Semaphore(1, true); /* * Semaphore to control export calls */ final Semaphore mExportSemaphore = new Semaphore(1, true); /* * XML tags */ Loading Loading @@ -401,8 +406,15 @@ public class VideoEditorImpl implements VideoEditor { throw new IllegalArgumentException("Argument Bitrate incorrect"); } try { mExportSemaphore.acquire(); mMANativeHelper.export(filename, mProjectPath, height,bitrate,audioCodec, videoCodec,mMediaItems, mTransitions, mAudioTracks,listener); } catch (InterruptedException ex) { Log.e("VideoEditorImpl", "Sem acquire NOT successful in export"); } finally { mExportSemaphore.release(); } } /* Loading Loading @@ -466,9 +478,16 @@ public class VideoEditorImpl implements VideoEditor { throw new IllegalArgumentException("Argument Bitrate incorrect"); } try { mExportSemaphore.acquire(); mMANativeHelper.export(filename, mProjectPath, height,bitrate, mMediaItems, mTransitions, mAudioTracks, listener); } catch (InterruptedException ex) { Log.e("VideoEditorImpl", "Sem acquire NOT successful in export"); } finally { mExportSemaphore.release(); } } /* Loading Loading
media/java/android/media/videoeditor/VideoEditorImpl.java +22 −3 Original line number Diff line number Diff line Loading @@ -59,6 +59,11 @@ public class VideoEditorImpl implements VideoEditor { */ final Semaphore mPreviewSemaphore = new Semaphore(1, true); /* * Semaphore to control export calls */ final Semaphore mExportSemaphore = new Semaphore(1, true); /* * XML tags */ Loading Loading @@ -401,8 +406,15 @@ public class VideoEditorImpl implements VideoEditor { throw new IllegalArgumentException("Argument Bitrate incorrect"); } try { mExportSemaphore.acquire(); mMANativeHelper.export(filename, mProjectPath, height,bitrate,audioCodec, videoCodec,mMediaItems, mTransitions, mAudioTracks,listener); } catch (InterruptedException ex) { Log.e("VideoEditorImpl", "Sem acquire NOT successful in export"); } finally { mExportSemaphore.release(); } } /* Loading Loading @@ -466,9 +478,16 @@ public class VideoEditorImpl implements VideoEditor { throw new IllegalArgumentException("Argument Bitrate incorrect"); } try { mExportSemaphore.acquire(); mMANativeHelper.export(filename, mProjectPath, height,bitrate, mMediaItems, mTransitions, mAudioTracks, listener); } catch (InterruptedException ex) { Log.e("VideoEditorImpl", "Sem acquire NOT successful in export"); } finally { mExportSemaphore.release(); } } /* Loading