1 /*
2 * Copyright 2024 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 "Codec2-InputSurface"
19 #include <android-base/logging.h>
20
21 #include <codec2/aidl/inputsurface/InputSurfaceConnection.h>
22
23 namespace aidl::android::hardware::media::c2::utils {
24
InputSurfaceConnection()25 InputSurfaceConnection::InputSurfaceConnection() {
26 }
27
~InputSurfaceConnection()28 InputSurfaceConnection::~InputSurfaceConnection() {
29 }
30
disconnect()31 ::ndk::ScopedAStatus InputSurfaceConnection::disconnect() {
32 return ::ndk::ScopedAStatus::ok();
33 }
34
signalEndOfStream()35 ::ndk::ScopedAStatus InputSurfaceConnection::signalEndOfStream() {
36 return ::ndk::ScopedAStatus::ok();
37 }
38
submitBuffer(int32_t bufferId,const AImage * buffer,int64_t timestamp,int fenceFd)39 c2_status_t InputSurfaceConnection::submitBuffer(
40 int32_t bufferId, const AImage *buffer, int64_t timestamp, int fenceFd) {
41 (void)bufferId;
42 (void)buffer;
43 (void)timestamp;
44 (void)fenceFd;
45 return C2_OK;
46 }
47
submitEos(int32_t bufferId)48 c2_status_t InputSurfaceConnection::submitEos(int32_t bufferId) {
49 (void)bufferId;
50 return C2_OK;
51 }
52
dispatchDataSpaceChanged(int32_t dataSpace,int32_t aspects,int32_t pixelFormat)53 void InputSurfaceConnection::dispatchDataSpaceChanged(
54 int32_t dataSpace, int32_t aspects, int32_t pixelFormat) {
55 (void)dataSpace;
56 (void)aspects;
57 (void)pixelFormat;
58 }
59
60 } // namespace aidl::android::hardware::media::c2::utils
61