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_TUNERHIDLTIMEFILTER_H 18 #define ANDROID_MEDIA_TUNERHIDLTIMEFILTER_H 19 20 #include <aidl/android/media/tv/tuner/BnTunerTimeFilter.h> 21 #include <android/hardware/tv/tuner/1.0/ITimeFilter.h> 22 #include <utils/Log.h> 23 24 using ::android::sp; 25 using ::android::hardware::Return; 26 using ::android::hardware::Void; 27 28 using HidlITimeFilter = ::android::hardware::tv::tuner::V1_0::ITimeFilter; 29 30 namespace aidl { 31 namespace android { 32 namespace media { 33 namespace tv { 34 namespace tuner { 35 36 class TunerHidlTimeFilter : public BnTunerTimeFilter { 37 public: 38 TunerHidlTimeFilter(sp<HidlITimeFilter> timeFilter); 39 virtual ~TunerHidlTimeFilter(); 40 41 ::ndk::ScopedAStatus setTimeStamp(int64_t in_timeStamp) override; 42 ::ndk::ScopedAStatus clearTimeStamp() override; 43 ::ndk::ScopedAStatus getSourceTime(int64_t* _aidl_return) override; 44 ::ndk::ScopedAStatus getTimeStamp(int64_t* _aidl_return) override; 45 ::ndk::ScopedAStatus close() override; 46 47 private: 48 sp<HidlITimeFilter> mTimeFilter; 49 }; 50 51 } // namespace tuner 52 } // namespace tv 53 } // namespace media 54 } // namespace android 55 } // namespace aidl 56 57 #endif // ANDROID_MEDIA_TUNERHIDLTIMEFILTER_H 58