You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.0 KiB
71 lines
2.0 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2019. All rights reserved.
|
|
* Description: API of DTV client.
|
|
* Author: DTV stack software group
|
|
* Create: 2012-09-18
|
|
*/
|
|
#ifndef DTVCLIENT_H
|
|
#define DTVCLIENT_H
|
|
|
|
#include <binder/IMemory.h>
|
|
#include <utils/KeyedVector.h>
|
|
#include <utils/String8.h>
|
|
#include <utils/threads.h>
|
|
#include "IDtvClient.h"
|
|
#include "ImplDtvClient.h"
|
|
|
|
#ifndef PRODUCT_FULL_TREBLE
|
|
#include "IDtvService.h"
|
|
#include "IDtvServiceServer.h"
|
|
#endif
|
|
|
|
class DTVListener : virtual public RefBase {
|
|
public:
|
|
DTVListener() {};
|
|
virtual ~DTVListener() {};
|
|
virtual void Notify(SVR_S32 msg, SVR_S32 ext1, SVR_S32 ext2, SVR_S32 ext3, const Parcel *parcelObj) = 0;
|
|
};
|
|
|
|
class HwDTVListener;
|
|
|
|
class DTVClient : public BnDTVClient {
|
|
public:
|
|
DTVClient();
|
|
virtual ~DTVClient();
|
|
|
|
status_t SetPlugins(const SVR_CHAR *url) const;
|
|
status_t Invoke(Parcel &request, Parcel *reply);
|
|
status_t SetListener(const sp<DTVListener> &dtvListener);
|
|
status_t Disconnect();
|
|
void SetSurface(SVR_VOID *spSurface, int width, int height);
|
|
void Notify(SVR_S32 msg, SVR_S32 ext1, SVR_S32 ext2, SVR_S32 ext3,
|
|
const Parcel *parcelObj = static_cast<Parcel *>(SVR_NULL));
|
|
void hwNotify(SVR_S32 msg, SVR_S32 ext1, SVR_S32 ext2, SVR_S32 ext3,
|
|
const Parcel *parcelObj = static_cast<Parcel *>(SVR_NULL),
|
|
Parcel *parcelReply = static_cast<Parcel *>(SVR_NULL));
|
|
|
|
private:
|
|
class DeathNotifier : public IBinder::DeathRecipient {
|
|
public:
|
|
~DeathNotifier();
|
|
|
|
virtual SVR_VOID binderDied(const wp<IBinder> &who);
|
|
};
|
|
static sp<DeathNotifier> mDeathNotifier;
|
|
|
|
#ifndef PRODUCT_FULL_TREBLE
|
|
const sp<IDTVServiceServer> &GetDTVServiceServer();
|
|
static sp<IDTVServiceServer> mDTVServiceServer;
|
|
|
|
sp<IDTVService> mDTVService;
|
|
#endif
|
|
sp<DTVListener> mListener;
|
|
sp<HwDTVListener> mHwListener;
|
|
|
|
ImplDTVClient *mImplDTVClient;
|
|
Mutex mLock;
|
|
Mutex mNotifyLock;
|
|
};
|
|
|
|
#endif // DTVCLIENT_H
|