blob: 7471cb711a7ad726079660464b125104a8ce37dd [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;
Chong Zhang6d58e4b2020-03-31 09:41:10 -070040 transcodingType = parcel.transcodingType;
Chong Zhang6d58e4b2020-03-31 09:41:10 -070041 priority = parcel.priority;
42 requestUpdate = parcel.requestUpdate;
hkuang22d6ae82020-05-27 11:05:55 -070043 isForTesting = parcel.isForTesting;
44 testConfig = parcel.testConfig;
Chong Zhang6d58e4b2020-03-31 09:41:10 -070045 }
46};
47
48} // namespace android
49#endif // ANDROID_MEDIA_TRANSCODING_REQUEST_H