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