blob: 0269896c140eeaf7ac3ebe5b48d6e23a6189db85 [file] [log] [blame]
Hangyu Kuang71b9fb42019-11-27 10:33:32 -08001/*
2 * Copyright (C) 2019 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//#define LOG_NDEBUG 0
18#define LOG_TAG "MediaTranscodingService"
19#include "MediaTranscodingService.h"
20
21#include <android/binder_manager.h>
22#include <android/binder_process.h>
23#include <utils/Log.h>
24#include <utils/Vector.h>
25
26namespace android {
27
Hangyu Kuang71b9fb42019-11-27 10:33:32 -080028MediaTranscodingService::MediaTranscodingService() {
29 ALOGV("MediaTranscodingService is created");
30}
31
32MediaTranscodingService::~MediaTranscodingService() {
33 ALOGE("Should not be in ~MediaTranscodingService");
34}
35
36binder_status_t MediaTranscodingService::dump(int /* fd */, const char** /*args*/,
37 uint32_t /*numArgs*/) {
38 // TODO(hkuang): Add implementation.
39 return OK;
40}
41
42//static
43void MediaTranscodingService::instantiate() {
44 std::shared_ptr<MediaTranscodingService> service =
45 ::ndk::SharedRefBase::make<MediaTranscodingService>();
46 binder_status_t status =
47 AServiceManager_addService(service->asBinder().get(), getServiceName());
48 if (status != STATUS_OK) {
49 return;
50 }
51}
52
53Status MediaTranscodingService::registerClient(
54 const std::shared_ptr<ITranscodingServiceClient>& /*in_client*/,
hkuang48c365e2020-01-13 16:33:42 -080055 const std::string& /* in_opPackageName */, int32_t /* in_clientUid */,
56 int32_t /* in_clientPid */, int32_t* /*_aidl_return*/) {
Hangyu Kuang71b9fb42019-11-27 10:33:32 -080057 // TODO(hkuang): Add implementation.
58 return Status::ok();
59}
60
61Status MediaTranscodingService::unregisterClient(int32_t /*clientId*/, bool* /*_aidl_return*/) {
62 // TODO(hkuang): Add implementation.
63 return Status::ok();
64}
65
66Status MediaTranscodingService::submitRequest(int32_t /*clientId*/,
hkuang48c365e2020-01-13 16:33:42 -080067 const TranscodingRequestParcel& /*request*/,
68 TranscodingJobParcel* /*job*/,
69 int32_t* /*_aidl_return*/) {
Hangyu Kuang71b9fb42019-11-27 10:33:32 -080070 // TODO(hkuang): Add implementation.
71 return Status::ok();
72}
73
74Status MediaTranscodingService::cancelJob(int32_t /*in_clientId*/, int32_t /*in_jobId*/,
75 bool* /*_aidl_return*/) {
76 // TODO(hkuang): Add implementation.
77 return Status::ok();
78}
79
hkuang48c365e2020-01-13 16:33:42 -080080Status MediaTranscodingService::getJobWithId(int32_t /*in_jobId*/,
81 TranscodingJobParcel* /*out_job*/,
Hangyu Kuang71b9fb42019-11-27 10:33:32 -080082 bool* /*_aidl_return*/) {
83 // TODO(hkuang): Add implementation.
84 return Status::ok();
85}
86
Hangyu Kuang71b9fb42019-11-27 10:33:32 -080087} // namespace android