Lines Matching refs:name

256         void *me, const char *name, const char **attrs) {
257 static_cast<MediaCodecList *>(me)->startElementHandler(name, attrs);
261 void MediaCodecList::EndElementHandlerWrapper(void *me, const char *name) {
262 static_cast<MediaCodecList *>(me)->endElementHandler(name);
290 ALOGE("invalid include file name: %s", href);
297 ALOGE("invalid include file name: %s", href);
307 const char *name, const char **attrs) {
314 if (!strcmp(name, "Include")) {
327 if (!strcmp(name, "Decoders")) {
329 } else if (!strcmp(name, "Encoders")) {
337 if (!strcmp(name, "MediaCodec")) {
348 if (!strcmp(name, "MediaCodec")) {
360 if (!strcmp(name, "Quirk")) {
362 } else if (!strcmp(name, "Type")) {
377 if (outside && (!strcmp(name, "Limit") || !strcmp(name, "Feature"))) {
378 ALOGW("ignoring %s specified outside of a Type", name);
379 } else if (!strcmp(name, "Limit")) {
381 } else if (!strcmp(name, "Feature")) {
394 void MediaCodecList::endElementHandler(const char *name) {
402 if (!strcmp(name, "Decoders")) {
410 if (!strcmp(name, "Encoders")) {
419 if (!strcmp(name, "Type")) {
431 if (!strcmp(name, "MediaCodec")) {
441 if (!strcmp(name, "MediaCodec")) {
451 if (!strcmp(name, "Include") && mPastSections.size() > 0) {
467 const char *name = NULL;
472 if (!strcmp(attrs[i], "name")) {
476 name = attrs[i + 1];
491 if (name == NULL) {
495 mCurrentInfo = new MediaCodecInfo(name, encoder, type);
529 const char *name = NULL;
533 if (!strcmp(attrs[i], "name")) {
537 name = attrs[i + 1];
546 if (name == NULL) {
550 mCurrentInfo->addQuirk(name);
555 const char *name = NULL;
559 if (!strcmp(attrs[i], "name")) {
563 name = attrs[i + 1];
572 if (name == NULL) {
576 status_t ret = mCurrentInfo->addMime(name);
583 if (initializeCapabilities(name) != OK) {
584 mCurrentInfo->removeMime(name);
628 static status_t limitFoundMissingAttr(AString name, const char *attr, bool found = true) {
629 ALOGE("limit '%s' with %s'%s' attribute", name.c_str(),
634 static status_t limitError(AString name, const char *msg) {
635 ALOGE("limit '%s' %s", name.c_str(), msg);
639 static status_t limitInvalidAttr(AString name, const char *attr, AString value) {
640 ALOGE("limit '%s' with invalid '%s' attribute (%s)", name.c_str(),
655 if (!strcmp(attrs[i], "name")
672 AString name;
673 if (!msg->findString("name", &name)) {
674 ALOGE("limit with no 'name' attribute");
683 if (name == "aspect-ratio" || name == "bitrate" || name == "block-count"
684 || name == "blocks-per-second" || name == "complexity"
685 || name == "frame-rate" || name == "quality" || name == "size") {
691 return limitError(name, "has 'min' and 'max' as well as 'range' or "
696 return limitError(name, "has only 'min' or 'max' attribute");
702 return limitError(name, "has both 'range' and 'value' attributes");
709 return limitError(name, "with no 'range', 'value' or 'min'/'max' attributes");
712 if ((name == "quality" || name == "complexity") ^
714 return limitFoundMissingAttr(name, "default", found);
716 if (name != "quality" && msg->findString("scale", &scale)) {
717 return limitFoundMissingAttr(name, "scale");
719 if ((name == "aspect-ratio") ^ (found = msg->findString("in", &in_))) {
720 return limitFoundMissingAttr(name, "in", found);
723 if (name == "aspect-ratio") {
725 return limitInvalidAttr(name, "in", in_);
729 in_.append(name);
730 name = in_;
732 if (name == "quality") {
735 if (name == "quality" || name == "complexity") {
736 AString tag = name;
740 AString tag = name;
746 return limitFoundMissingAttr(name, "default");
748 return limitFoundMissingAttr(name, "in");
749 } else if ((name == "channel-count") ^
751 return limitFoundMissingAttr(name, "max", found);
753 return limitFoundMissingAttr(name, "min");
755 return limitFoundMissingAttr(name, "range");
756 } else if ((name == "sample-rate") ^
758 return limitFoundMissingAttr(name, "ranges", found);
760 return limitFoundMissingAttr(name, "scale");
761 } else if ((name == "alignment" || name == "block-size") ^
763 return limitFoundMissingAttr(name, "value", found);
768 tag.append(name);
771 mCurrentInfo->addDetail(name, value);
773 AString tag = name;
777 ALOGW("Ignoring unrecognized limit '%s'", name.c_str());
794 const char *name = NULL;
805 if (!strcmp(attrs[i], "name")) {
806 name = attrs[i + 1];
824 if (name == NULL) {
825 ALOGE("feature with no 'name' attribute");
830 ALOGE("feature '%s' is both/neither optional and required", name);
835 ALOGE("feature '%s' has both a value and optional/required attribute", name);
840 mCurrentInfo->addFeature(name, value);
842 mCurrentInfo->addFeature(name, (required == 1) || (optional == 0));
847 ssize_t MediaCodecList::findCodecByName(const char *name) const {
851 if (info.mName == name) {