Lines Matching refs:sel

103 ProgramType getType(const ProgramSelector& sel) {  in getType()  argument
104 return static_cast<ProgramType>(sel.programType); in getType()
127 static bool maybeGetId(const ProgramSelector& sel, const IdentifierType type, uint64_t* val) { in maybeGetId() argument
130 if (sel.primaryId.type == itype) { in maybeGetId()
131 if (val) *val = sel.primaryId.value; in maybeGetId()
136 for (auto&& id : sel.secondaryIds) { in maybeGetId()
146 bool hasId(const ProgramSelector& sel, const IdentifierType type) { in hasId() argument
147 return maybeGetId(sel, type, nullptr); in hasId()
150 uint64_t getId(const ProgramSelector& sel, const IdentifierType type) { in getId() argument
153 if (maybeGetId(sel, type, &val)) { in getId()
161 uint64_t getId(const ProgramSelector& sel, const IdentifierType type, uint64_t defval) { in getId() argument
162 if (!hasId(sel, type)) return defval; in getId()
163 return getId(sel, type); in getId()
167 ProgramSelector sel = {}; in make_selector() local
182 sel.programType = static_cast<uint32_t>(type); in make_selector()
183 sel.primaryId.type = static_cast<uint32_t>(IdentifierType::AMFM_FREQUENCY); in make_selector()
184 sel.primaryId.value = channel; in make_selector()
191 sel.secondaryIds = hidl_vec<ProgramIdentifier>{ in make_selector()
196 return sel; in make_selector()
199 bool getLegacyChannel(const ProgramSelector& sel, uint32_t* channelOut, uint32_t* subChannelOut) { in getLegacyChannel() argument
202 if (isAmFm(getType(sel))) { in getLegacyChannel()
203 if (channelOut) *channelOut = getId(sel, IdentifierType::AMFM_FREQUENCY); in getLegacyChannel()
204 if (subChannelOut && hasId(sel, IdentifierType::HD_SUBCHANNEL)) { in getLegacyChannel()
206 *subChannelOut = getId(sel, IdentifierType::HD_SUBCHANNEL) + 1; in getLegacyChannel()
213 bool isDigital(const ProgramSelector& sel) { in isDigital() argument
214 switch (getType(sel)) { in isDigital()