blob: 485403fbf05fd9859408d10689da928516cb2390 [file] [log] [blame]
Chong Zhang6d58e4b2020-03-31 09:41:10 -07001/*
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
22namespace android {
23
24using ::aidl::android::media::TranscodingRequestParcel;
25
26// Helper class for duplicating a TranscodingRequestParcel
27class TranscodingRequest : public TranscodingRequestParcel {
28public:
29 TranscodingRequest() = default;
30 TranscodingRequest(const TranscodingRequestParcel& parcel) { setTo(parcel); }
31 TranscodingRequest& operator=(const TranscodingRequest& request) {
32 setTo(request);
33 return *this;
34 }
35
36private:
37 void setTo(const TranscodingRequestParcel& parcel) {
hkuang72d105f2020-05-21 10:48:55 -070038 sourceFilePath = parcel.sourceFilePath;
39 destinationFilePath = parcel.destinationFilePath;
hkuang37a586d2020-09-18 22:25:02 -070040 clientUid = parcel.clientUid;
41 clientPid = parcel.clientPid;
Chong Zhangcf3f8ee2020-10-29 18:38:37 -070042 clientPackageName = parcel.clientPackageName;
Chong Zhang6d58e4b2020-03-31 09:41:10 -070043 transcodingType = parcel.transcodingType;
Chong Zhang66469272020-06-04 16:51:55 -070044 requestedVideoTrackFormat = parcel.requestedVideoTrackFormat;
Chong Zhang6d58e4b2020-03-31 09:41:10 -070045 priority = parcel.priority;
hkuang96471b82020-06-08 11:12:46 -070046 requestProgressUpdate = parcel.requestProgressUpdate;
Chong Zhangbc062482020-10-14 16:43:53 -070047 requestSessionEventUpdate = parcel.requestSessionEventUpdate;
hkuang22d6ae82020-05-27 11:05:55 -070048 isForTesting = parcel.isForTesting;
49 testConfig = parcel.testConfig;
Chong Zhang6d58e4b2020-03-31 09:41:10 -070050 }
51};
52
53} // namespace android
54#endif // ANDROID_MEDIA_TRANSCODING_REQUEST_H