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 @NonNull public java.util.List<java.lang.Integer> getClientUids();
31    method public int getErrorCode();
32    method @IntRange(from=0, to=100) public int getProgress();
33    method public int getResult();
34    method public int getSessionId();
35    method public int getStatus();
36    method public void setOnProgressUpdateListener(@NonNull java.util.concurrent.Executor, @Nullable android.media.MediaTranscodingManager.TranscodingSession.OnProgressUpdateListener);
37    field public static final int ERROR_DROPPED_BY_SERVICE = 1; // 0x1
38    field public static final int ERROR_NONE = 0; // 0x0
39    field public static final int ERROR_SERVICE_DIED = 2; // 0x2
40    field public static final int RESULT_CANCELED = 4; // 0x4
41    field public static final int RESULT_ERROR = 3; // 0x3
42    field public static final int RESULT_NONE = 1; // 0x1
43    field public static final int RESULT_SUCCESS = 2; // 0x2
44    field public static final int STATUS_FINISHED = 3; // 0x3
45    field public static final int STATUS_PAUSED = 4; // 0x4
46    field public static final int STATUS_PENDING = 1; // 0x1
47    field public static final int STATUS_RUNNING = 2; // 0x2
48  }
49
50  @java.lang.FunctionalInterface public static interface MediaTranscodingManager.TranscodingSession.OnProgressUpdateListener {
51    method public void onProgressUpdate(@NonNull android.media.MediaTranscodingManager.TranscodingSession, @IntRange(from=0, to=100) int);
52  }
53
54  public static final class MediaTranscodingManager.VideoTranscodingRequest extends android.media.MediaTranscodingManager.TranscodingRequest {
55    method @NonNull public android.media.MediaFormat getVideoTrackFormat();
56  }
57
58  public static final class MediaTranscodingManager.VideoTranscodingRequest.Builder {
59    ctor public MediaTranscodingManager.VideoTranscodingRequest.Builder(@NonNull android.net.Uri, @NonNull android.net.Uri, @NonNull android.media.MediaFormat);
60    method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest build();
61    method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setClientPid(int);
62    method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setClientUid(int);
63    method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setDestinationFileDescriptor(@NonNull android.os.ParcelFileDescriptor);
64    method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setSourceFileDescriptor(@NonNull android.os.ParcelFileDescriptor);
65  }
66
67}
68
69