Merge "Add DataId for Audio Handle in Audio Track"
This commit is contained in:
commit
c670dca9c6
7 changed files with 90 additions and 27 deletions
|
@ -120,12 +120,13 @@ interface IFilter {
|
|||
* presented by file descripor in the handle as released.
|
||||
*
|
||||
* @param avMemory A handle associated to the memory for audio or video.
|
||||
* @param avDataId An Id provides additional information for AV data.
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_ARGUMENT if failed for wrong parameter.
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
releaseAvHandle(handle avMemory) generates (Result result);
|
||||
releaseAvHandle(handle avMemory, uint64_t avDataId) generates (Result result);
|
||||
|
||||
/**
|
||||
* Set the filter's data source.
|
||||
|
|
|
@ -123,4 +123,21 @@ interface ITuner {
|
|||
* @return lnb the newly created Lnb interface.
|
||||
*/
|
||||
openLnbById(LnbId lnbId) generates (Result result, ILnb lnb);
|
||||
|
||||
/**
|
||||
* Create a new instance of Lnb given a LNB name.
|
||||
*
|
||||
* It is used by the client to create a LNB instance for external device.
|
||||
*
|
||||
* @param lnbName the name for an external LNB to be opened. The app
|
||||
* provides the name. Frammework doesn't depend on the name, instead
|
||||
* use lnbId return from this call.
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* UNAVAILABLE if no resource.
|
||||
* UNKNOWN_ERROR if creation failed for other reasons.
|
||||
* @return lnbId the id of the LNB to be opened.
|
||||
* @return lnb the newly created Lnb interface.
|
||||
*/
|
||||
openLnbByName(string lnbName) generates (Result result, LnbId lnbId, ILnb lnb);
|
||||
};
|
||||
|
|
|
@ -120,7 +120,7 @@ Return<Result> Filter::flush() {
|
|||
return Result::SUCCESS;
|
||||
}
|
||||
|
||||
Return<Result> Filter::releaseAvHandle(const hidl_handle& /*avMemory*/) {
|
||||
Return<Result> Filter::releaseAvHandle(const hidl_handle& /*avMemory*/, uint64_t /*avDataId*/) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
return Result::SUCCESS;
|
||||
|
|
|
@ -70,7 +70,7 @@ class Filter : public IFilter {
|
|||
|
||||
virtual Return<Result> flush() override;
|
||||
|
||||
virtual Return<Result> releaseAvHandle(const hidl_handle& avMemory) override;
|
||||
virtual Return<Result> releaseAvHandle(const hidl_handle& avMemory, uint64_t avDataId) override;
|
||||
|
||||
virtual Return<Result> close() override;
|
||||
|
||||
|
|
|
@ -139,6 +139,15 @@ sp<Frontend> Tuner::getFrontendById(uint32_t frontendId) {
|
|||
return mFrontends[frontendId];
|
||||
}
|
||||
|
||||
Return<void> Tuner::openLnbByName(const hidl_string& /*lnbName*/, openLnbByName_cb _hidl_cb) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
sp<ILnb> lnb = new Lnb();
|
||||
|
||||
_hidl_cb(Result::SUCCESS, 1234, lnb);
|
||||
return Void();
|
||||
}
|
||||
|
||||
void Tuner::setFrontendAsDemuxSource(uint32_t frontendId, uint32_t demuxId) {
|
||||
mFrontendToDemux[frontendId] = demuxId;
|
||||
}
|
||||
|
|
|
@ -55,6 +55,9 @@ class Tuner : public ITuner {
|
|||
|
||||
virtual Return<void> openLnbById(LnbId lnbId, openLnbById_cb _hidl_cb) override;
|
||||
|
||||
virtual Return<void> openLnbByName(const hidl_string& lnbName,
|
||||
openLnbByName_cb _hidl_cb) override;
|
||||
|
||||
sp<Frontend> getFrontendById(uint32_t frontendId);
|
||||
|
||||
void setFrontendAsDemuxSource(uint32_t frontendId, uint32_t demuxId);
|
||||
|
|
|
@ -536,6 +536,16 @@ enum FrontendDvbsStandard : uint8_t {
|
|||
S2X = 1 << 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* VCM mode in DVBS.
|
||||
*/
|
||||
@export
|
||||
enum FrontendDvbsVcmMode : uint32_t {
|
||||
UNDEFINED,
|
||||
AUTO,
|
||||
MANUAL,
|
||||
};
|
||||
|
||||
/**
|
||||
* Signal Settings for an DVBS Frontend.
|
||||
*/
|
||||
|
@ -561,6 +571,8 @@ struct FrontendDvbsSettings {
|
|||
uint32_t inputStreamId;
|
||||
|
||||
FrontendDvbsStandard standard;
|
||||
|
||||
FrontendDvbsVcmMode vcmMode;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -960,7 +972,7 @@ enum FrontendIsdbs3Modulation : uint32_t {
|
|||
/**
|
||||
* hardware is able to detect and set Modulation automatically
|
||||
*/
|
||||
AUTO = 1 << 5,
|
||||
AUTO = 1 << 0,
|
||||
MOD_BPSK = 1 << 1,
|
||||
MOD_QPSK = 1 << 2,
|
||||
MOD_8PSK = 1 << 3,
|
||||
|
@ -1105,7 +1117,7 @@ struct FrontendIsdbtCapabilities {
|
|||
|
||||
bitfield<FrontendIsdbtBandwidth> bandwidthCap;
|
||||
|
||||
bitfield<FrontendIsdbtModulation> constellationCap;
|
||||
bitfield<FrontendIsdbtModulation> modulationCap;
|
||||
|
||||
bitfield<FrontendIsdbtCoderate> coderateCap;
|
||||
|
||||
|
@ -1227,6 +1239,11 @@ enum FrontendScanMessageType : uint32_t {
|
|||
* Locked symbol rate.
|
||||
*/
|
||||
SYMBOL_RATE,
|
||||
/**
|
||||
* Locked HIERARCHY for DVBT2 frontend.
|
||||
*/
|
||||
HIERARCHY,
|
||||
ANALOG_TYPE,
|
||||
/**
|
||||
* Locked Plp Ids for DVBT2 frontend.
|
||||
*/
|
||||
|
@ -1272,14 +1289,18 @@ safe_union FrontendScanMessage {
|
|||
uint8_t progressPercent;
|
||||
|
||||
/**
|
||||
* Signal frequency in Hertz
|
||||
* Signal frequencies in Hertz
|
||||
*/
|
||||
uint32_t frequency;
|
||||
vec<uint32_t> frequencies;
|
||||
|
||||
/**
|
||||
* Symbols per second
|
||||
*/
|
||||
uint32_t symbolRate;
|
||||
vec<uint32_t> symbolRates;
|
||||
|
||||
FrontendDvbtHierarchy hierarchy;
|
||||
|
||||
FrontendAnalogType analogType;
|
||||
|
||||
vec<uint8_t> plpIds;
|
||||
|
||||
|
@ -1287,10 +1308,12 @@ safe_union FrontendScanMessage {
|
|||
|
||||
vec<uint16_t> inputStreamIds;
|
||||
|
||||
safe_union standard {
|
||||
safe_union Standard {
|
||||
FrontendDvbsStandard sStd;
|
||||
|
||||
FrontendDvbtStandard tStd;
|
||||
|
||||
FrontendAnalogSifStandard sifStd;
|
||||
} std;
|
||||
|
||||
/**
|
||||
|
@ -2020,18 +2043,14 @@ enum DemuxScHevcIndex : uint32_t {
|
|||
};
|
||||
|
||||
/**
|
||||
* Index type to be used in the filter for record
|
||||
* Start Code Index type to be used in the filter for record
|
||||
*/
|
||||
@export
|
||||
enum DemuxRecordIndexType : uint32_t {
|
||||
enum DemuxRecordScIndexType : uint32_t {
|
||||
/**
|
||||
* Don't use index
|
||||
* Don't use SC index
|
||||
*/
|
||||
NONE,
|
||||
/**
|
||||
* Use TS index
|
||||
*/
|
||||
TS,
|
||||
/**
|
||||
* Use Start Code index
|
||||
*/
|
||||
|
@ -2046,15 +2065,16 @@ enum DemuxRecordIndexType : uint32_t {
|
|||
* Filter Settings for Record data.
|
||||
*/
|
||||
struct DemuxFilterRecordSettings {
|
||||
DemuxRecordIndexType indexType;
|
||||
bitfield<DemuxTsIndex> tsIndexMask;
|
||||
|
||||
safe_union IndexMask {
|
||||
bitfield<DemuxTsIndex> tsIndexMask;
|
||||
DemuxRecordScIndexType scIndexType;
|
||||
|
||||
bitfield<DemuxScIndex> scIndexMask;
|
||||
safe_union ScIndexMask {
|
||||
|
||||
bitfield<DemuxScHevcIndex> scHevcIndexMask;
|
||||
} indexMask;
|
||||
bitfield<DemuxScIndex> sc;
|
||||
|
||||
bitfield<DemuxScHevcIndex> scHevc;
|
||||
} scIndexMask;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -2398,6 +2418,12 @@ struct DemuxFilterMediaEvent {
|
|||
*/
|
||||
uint32_t dataLength;
|
||||
|
||||
/**
|
||||
* The offset in the memory block which is shared among multiple
|
||||
* MediaEvents.
|
||||
*/
|
||||
uint32_t offset;
|
||||
|
||||
/**
|
||||
* A handle associated to the memory where audio or video data stays.
|
||||
*/
|
||||
|
@ -2408,6 +2434,12 @@ struct DemuxFilterMediaEvent {
|
|||
*/
|
||||
bool isSecureMemory;
|
||||
|
||||
/**
|
||||
* An Id is used by HAL to provide additional information for AV data.
|
||||
* For secure audio, it's the audio handle used by Audio Track.
|
||||
*/
|
||||
uint64_t avDataId;
|
||||
|
||||
/**
|
||||
* MPU sequence number of filtered data (only for MMTP)
|
||||
*/
|
||||
|
@ -2448,16 +2480,17 @@ struct DemuxFilterPesEvent {
|
|||
struct DemuxFilterTsRecordEvent {
|
||||
DemuxPid pid;
|
||||
|
||||
bitfield<DemuxTsIndex> tsIndexMask;
|
||||
|
||||
/**
|
||||
* Indexes of record output
|
||||
*/
|
||||
safe_union IndexMask {
|
||||
bitfield<DemuxTsIndex> tsIndexMask;
|
||||
safe_union ScIndexMask {
|
||||
|
||||
bitfield<DemuxScIndex> scIndexMask;
|
||||
bitfield<DemuxScIndex> sc;
|
||||
|
||||
bitfield<DemuxScHevcIndex> scHevcIndexMask;
|
||||
} indexMask;
|
||||
bitfield<DemuxScHevcIndex> scHevc;
|
||||
} scIndexMask;
|
||||
|
||||
/**
|
||||
* Byte number from beginning of the filter's output
|
||||
|
|
Loading…
Reference in a new issue