@@ -74,7 +74,7 @@ public static MediaTranscoder getInstance() {
7474 * @deprecated Use {@link #transcodeVideo(FileDescriptor, String, MediaFormatStrategy, MediaTranscoder.Listener)} which accepts output video format.
7575 */
7676 @ Deprecated
77- public Future transcodeVideo (final FileDescriptor inFileDescriptor , final String outPath , final Listener listener ) {
77+ public Future < Void > transcodeVideo (final FileDescriptor inFileDescriptor , final String outPath , final Listener listener ) {
7878 return transcodeVideo (inFileDescriptor , outPath , new MediaFormatStrategy () {
7979 @ Override
8080 public MediaFormat createVideoOutputFormat (MediaFormat inputFormat ) {
@@ -98,7 +98,7 @@ public MediaFormat createAudioOutputFormat(MediaFormat inputFormat) {
9898 * @param listener Listener instance for callback.
9999 * @throws IOException if input file could not be read.
100100 */
101- public Future transcodeVideo (final String inPath , final String outPath , final MediaFormatStrategy outFormatStrategy , final Listener listener ) throws IOException {
101+ public Future < Void > transcodeVideo (final String inPath , final String outPath , final MediaFormatStrategy outFormatStrategy , final Listener listener ) throws IOException {
102102 FileInputStream fileInputStream = null ;
103103 FileDescriptor inFileDescriptor ;
104104 try {
@@ -158,11 +158,11 @@ private void closeStream() {
158158 * @param outFormatStrategy Strategy for output video format.
159159 * @param listener Listener instance for callback.
160160 */
161- public Future transcodeVideo (final FileDescriptor inFileDescriptor , final String outPath , final MediaFormatStrategy outFormatStrategy , final Listener listener ) {
161+ public Future < Void > transcodeVideo (final FileDescriptor inFileDescriptor , final String outPath , final MediaFormatStrategy outFormatStrategy , final Listener listener ) {
162162 Looper looper = Looper .myLooper ();
163163 if (looper == null ) looper = Looper .getMainLooper ();
164164 final Handler handler = new Handler (looper );
165- final AtomicReference <Future > futureReference = new AtomicReference <>();
165+ final AtomicReference <Future < Void > > futureReference = new AtomicReference <>();
166166 final Future <Void > createdFuture = mExecutor .submit (new Callable <Void >() {
167167 @ Override
168168 public Void call () throws Exception {
@@ -201,7 +201,7 @@ public void run() {
201201 if (exception == null ) {
202202 listener .onTranscodeCompleted ();
203203 } else {
204- Future future = futureReference .get ();
204+ Future < Void > future = futureReference .get ();
205205 if (future != null && future .isCancelled ()) {
206206 listener .onTranscodeCanceled ();
207207 } else {
0 commit comments