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