1 /** 2 * Copyright 2021, 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_TUNERFTIMEFILTER_H 18 #define ANDROID_MEDIA_TUNERFTIMEFILTER_H 19 20 #include <aidl/android/media/tv/tuner/BnTunerTimeFilter.h> 21 #include <android/hardware/tv/tuner/1.0/ITimeFilter.h> 22 #include <android/hardware/tv/tuner/1.1/types.h> 23 #include <media/stagefright/foundation/ADebug.h> 24 #include <utils/Log.h> 25 26 using Status = ::ndk::ScopedAStatus; 27 using ::aidl::android::media::tv::tuner::BnTunerTimeFilter; 28 using ::android::hardware::Return; 29 using ::android::hardware::Void; 30 using ::android::hardware::hidl_vec; 31 using ::android::hardware::tv::tuner::V1_0::ITimeFilter; 32 33 using namespace std; 34 35 namespace android { 36 37 class TunerTimeFilter : public BnTunerTimeFilter { 38 39 public: 40 TunerTimeFilter(sp<ITimeFilter> timeFilter); 41 virtual ~TunerTimeFilter(); 42 Status setTimeStamp(int64_t timeStamp) override; 43 Status clearTimeStamp() override; 44 Status getSourceTime(int64_t* _aidl_return) override; 45 Status getTimeStamp(int64_t* _aidl_return) override; 46 Status close() override; 47 48 private: 49 sp<ITimeFilter> mTimeFilter; 50 }; 51 52 } // namespace android 53 54 #endif // ANDROID_MEDIA_TUNERFTIMEFILTER_H 55