| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef _ANDROID_MEDIA_TV_DEMUX_CLIENT_H_ |
| 18 |
#define _ANDROID_MEDIA_TV_DEMUX_CLIENT_H_ |
| 19 |
|
| 20 |
#include <aidl/android/hardware/tv/tuner/Result.h> |
| 21 |
#include <aidl/android/media/tv/tuner/ITunerDemux.h> |
| 22 |
|
| 23 |
#include "ClientHelper.h" |
| 24 |
#include "DvrClient.h" |
| 25 |
#include "DvrClientCallback.h" |
| 26 |
#include "FilterClient.h" |
| 27 |
#include "FilterClientCallback.h" |
| 28 |
#include "FrontendClient.h" |
| 29 |
#include "TimeFilterClient.h" |
| 30 |
|
| 31 |
using Status = ::ndk::ScopedAStatus; |
| 32 |
using ::aidl::android::hardware::tv::tuner::DemuxFilterType; |
| 33 |
using ::aidl::android::hardware::tv::tuner::DvrType; |
| 34 |
using ::aidl::android::hardware::tv::tuner::Result; |
| 35 |
using ::aidl::android::media::tv::tuner::ITunerDemux; |
| 36 |
using ::aidl::android::media::tv::tuner::ITunerTimeFilter; |
| 37 |
|
| 38 |
using namespace std; |
| 39 |
|
| 40 |
namespace android { |
| 41 |
|
| 42 |
struct DemuxClient : public RefBase { |
| 43 |
|
| 44 |
public: |
| 45 |
DemuxClient(shared_ptr<ITunerDemux> tunerDemux); |
| 46 |
~DemuxClient(); |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
Result setFrontendDataSource(sp<FrontendClient> frontendClient); |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
Result setFrontendDataSourceById(int frontendId); |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
sp<FilterClient> openFilter(const DemuxFilterType& type, int32_t bufferSize, |
| 62 |
sp<FilterClientCallback> cb); |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
sp<TimeFilterClient> openTimeFilter(); |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
int32_t getAvSyncHwId(sp<FilterClient> filterClient); |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
int64_t getAvSyncTime(int32_t avSyncHwId); |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
sp<DvrClient> openDvr(DvrType dvbType, int32_t bufferSize, sp<DvrClientCallback> cb); |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
Result connectCiCam(int32_t ciCamId); |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
Result disconnectCiCam(); |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
Result close(); |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
shared_ptr<ITunerDemux> getAidlDemux() { return mTunerDemux; } |
| 103 |
|
| 104 |
private: |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
shared_ptr<ITunerDemux> mTunerDemux; |
| 110 |
}; |
| 111 |
} |
| 112 |
|
| 113 |
#endif |