1// Signature format: 2.0 2package android.media { 3 4 public final class MediaTranscodingManager { 5 method @Nullable public android.media.MediaTranscodingManager.TranscodingSession enqueueRequest(@NonNull android.media.MediaTranscodingManager.TranscodingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.media.MediaTranscodingManager.OnTranscodingFinishedListener); 6 } 7 8 @java.lang.FunctionalInterface public static interface MediaTranscodingManager.OnTranscodingFinishedListener { 9 method public void onTranscodingFinished(@NonNull android.media.MediaTranscodingManager.TranscodingSession); 10 } 11 12 public abstract static class MediaTranscodingManager.TranscodingRequest { 13 method public int getClientPid(); 14 method public int getClientUid(); 15 method @Nullable public android.os.ParcelFileDescriptor getDestinationFileDescriptor(); 16 method @NonNull public android.net.Uri getDestinationUri(); 17 method @Nullable public android.os.ParcelFileDescriptor getSourceFileDescriptor(); 18 method @NonNull public android.net.Uri getSourceUri(); 19 } 20 21 public static class MediaTranscodingManager.TranscodingRequest.VideoFormatResolver { 22 ctor public MediaTranscodingManager.TranscodingRequest.VideoFormatResolver(@NonNull android.media.ApplicationMediaCapabilities, @NonNull android.media.MediaFormat); 23 method @Nullable public android.media.MediaFormat resolveVideoFormat(); 24 method public boolean shouldTranscode(); 25 } 26 27 public static final class MediaTranscodingManager.TranscodingSession { 28 method public boolean addClientUid(int); 29 method public void cancel(); 30 method public void clearOnProgressUpdateListener(); 31 method @NonNull public java.util.List<java.lang.Integer> getClientUids(); 32 method public int getErrorCode(); 33 method @IntRange(from=0, to=100) public int getProgress(); 34 method public int getResult(); 35 method public int getSessionId(); 36 method public int getStatus(); 37 method public void setOnProgressUpdateListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaTranscodingManager.TranscodingSession.OnProgressUpdateListener); 38 field public static final int ERROR_DROPPED_BY_SERVICE = 1; // 0x1 39 field public static final int ERROR_NONE = 0; // 0x0 40 field public static final int ERROR_SERVICE_DIED = 2; // 0x2 41 field public static final int RESULT_CANCELED = 4; // 0x4 42 field public static final int RESULT_ERROR = 3; // 0x3 43 field public static final int RESULT_NONE = 1; // 0x1 44 field public static final int RESULT_SUCCESS = 2; // 0x2 45 field public static final int STATUS_FINISHED = 3; // 0x3 46 field public static final int STATUS_PAUSED = 4; // 0x4 47 field public static final int STATUS_PENDING = 1; // 0x1 48 field public static final int STATUS_RUNNING = 2; // 0x2 49 } 50 51 @java.lang.FunctionalInterface public static interface MediaTranscodingManager.TranscodingSession.OnProgressUpdateListener { 52 method public void onProgressUpdate(@NonNull android.media.MediaTranscodingManager.TranscodingSession, @IntRange(from=0, to=100) int); 53 } 54 55 public static final class MediaTranscodingManager.VideoTranscodingRequest extends android.media.MediaTranscodingManager.TranscodingRequest { 56 method @NonNull public android.media.MediaFormat getVideoTrackFormat(); 57 } 58 59 public static final class MediaTranscodingManager.VideoTranscodingRequest.Builder { 60 ctor public MediaTranscodingManager.VideoTranscodingRequest.Builder(@NonNull android.net.Uri, @NonNull android.net.Uri, @NonNull android.media.MediaFormat); 61 method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest build(); 62 method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setClientPid(int); 63 method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setClientUid(int); 64 method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setDestinationFileDescriptor(@NonNull android.os.ParcelFileDescriptor); 65 method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setSourceFileDescriptor(@NonNull android.os.ParcelFileDescriptor); 66 } 67 68} 69 70