Chong Zhang | 6d58e4b | 2020-03-31 09:41:10 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ANDROID_MEDIA_TRANSCODING_REQUEST_H |
| 18 | #define ANDROID_MEDIA_TRANSCODING_REQUEST_H |
| 19 | |
| 20 | #include <aidl/android/media/TranscodingRequestParcel.h> |
| 21 | |
| 22 | namespace android { |
| 23 | |
| 24 | using ::aidl::android::media::TranscodingRequestParcel; |
| 25 | |
| 26 | // Helper class for duplicating a TranscodingRequestParcel |
| 27 | class TranscodingRequest : public TranscodingRequestParcel { |
| 28 | public: |
| 29 | TranscodingRequest() = default; |
| 30 | TranscodingRequest(const TranscodingRequestParcel& parcel) { setTo(parcel); } |
| 31 | TranscodingRequest& operator=(const TranscodingRequest& request) { |
| 32 | setTo(request); |
| 33 | return *this; |
| 34 | } |
| 35 | |
| 36 | private: |
| 37 | void setTo(const TranscodingRequestParcel& parcel) { |
hkuang | 72d105f | 2020-05-21 10:48:55 -0700 | [diff] [blame] | 38 | sourceFilePath = parcel.sourceFilePath; |
| 39 | destinationFilePath = parcel.destinationFilePath; |
hkuang | 37a586d | 2020-09-18 22:25:02 -0700 | [diff] [blame] | 40 | clientUid = parcel.clientUid; |
| 41 | clientPid = parcel.clientPid; |
Chong Zhang | cf3f8ee | 2020-10-29 18:38:37 -0700 | [diff] [blame] | 42 | clientPackageName = parcel.clientPackageName; |
Chong Zhang | 6d58e4b | 2020-03-31 09:41:10 -0700 | [diff] [blame] | 43 | transcodingType = parcel.transcodingType; |
Chong Zhang | 6646927 | 2020-06-04 16:51:55 -0700 | [diff] [blame] | 44 | requestedVideoTrackFormat = parcel.requestedVideoTrackFormat; |
Chong Zhang | 6d58e4b | 2020-03-31 09:41:10 -0700 | [diff] [blame] | 45 | priority = parcel.priority; |
hkuang | 96471b8 | 2020-06-08 11:12:46 -0700 | [diff] [blame] | 46 | requestProgressUpdate = parcel.requestProgressUpdate; |
Chong Zhang | bc06248 | 2020-10-14 16:43:53 -0700 | [diff] [blame] | 47 | requestSessionEventUpdate = parcel.requestSessionEventUpdate; |
hkuang | 22d6ae8 | 2020-05-27 11:05:55 -0700 | [diff] [blame] | 48 | isForTesting = parcel.isForTesting; |
| 49 | testConfig = parcel.testConfig; |
Chong Zhang | 6d58e4b | 2020-03-31 09:41:10 -0700 | [diff] [blame] | 50 | } |
| 51 | }; |
| 52 | |
| 53 | } // namespace android |
| 54 | #endif // ANDROID_MEDIA_TRANSCODING_REQUEST_H |