Lines Matching refs:atts

410 MediaProfiles::createVideoCodec(const char **atts, size_t natts, MediaProfiles *profiles)  in createVideoCodec()  argument
413 !strcmp("codec", atts[0]) && in createVideoCodec()
414 !strcmp("bitRate", atts[2]) && in createVideoCodec()
415 !strcmp("width", atts[4]) && in createVideoCodec()
416 !strcmp("height", atts[6]) && in createVideoCodec()
417 !strcmp("frameRate", atts[8])); in createVideoCodec()
420 const int codec = findTagForName(sVideoEncoderNameMap, nMappings, atts[1]); in createVideoCodec()
422 ALOGE("MediaProfiles::createVideoCodec failed to locate codec %s", atts[1]); in createVideoCodec()
435 if (natts >= 12 && !strcmp("profile", atts[10])) { in createVideoCodec()
436 profile = atoi(atts[11]); in createVideoCodec()
441 if (!strcmp("chroma", atts[ix])) { in createVideoCodec()
443 NELEM(sChromaSubsamplingNameMap), atts[ix + 1]); in createVideoCodec()
445 ALOGE("MediaProfiles::createVideoCodec invalid chroma %s", atts[ix + 1]); in createVideoCodec()
450 } else if (!strcmp("bitDepth", atts[ix])) { in createVideoCodec()
451 bitDepth = atoi(atts[ix + 1]); in createVideoCodec()
453 ALOGE("MediaProfiles::createVideoCodec invalid bidDepth %s", atts[ix + 1]); in createVideoCodec()
456 } else if (!strcmp("hdr", atts[ix])) { in createVideoCodec()
458 NELEM(sHdrFormatNameMap), atts[ix + 1]); in createVideoCodec()
460 ALOGE("MediaProfiles::createVideoCodec invalid hdr %s", atts[ix + 1]); in createVideoCodec()
467 ALOGD("MediaProfiles::createVideoCodec ignoring invalid attr %s", atts[ix]); in createVideoCodec()
475 atoi(atts[3]) /* bitRate */, atoi(atts[5]) /* width */, atoi(atts[7]) /* height */, in createVideoCodec()
476 atoi(atts[9]) /* frameRate */, profile, chroma, bitDepth, hdr }; in createVideoCodec()
485 MediaProfiles::createAudioCodec(const char **atts, size_t natts, MediaProfiles *profiles) in createAudioCodec() argument
488 !strcmp("codec", atts[0]) && in createAudioCodec()
489 !strcmp("bitRate", atts[2]) && in createAudioCodec()
490 !strcmp("sampleRate", atts[4]) && in createAudioCodec()
491 !strcmp("channels", atts[6])); in createAudioCodec()
493 const int codec = findTagForName(sAudioEncoderNameMap, nMappings, atts[1]); in createAudioCodec()
495 ALOGE("MediaProfiles::createAudioCodec failed to locate codec %s", atts[1]); in createAudioCodec()
500 if (natts >= 10 && !strcmp("profile", atts[8])) { in createAudioCodec()
501 profile = atoi(atts[9]); in createAudioCodec()
506 atoi(atts[3]), atoi(atts[5]), atoi(atts[7]), profile }; in createAudioCodec()
515 MediaProfiles::createAudioDecoderCap(const char **atts, size_t natts) in createAudioDecoderCap() argument
518 !strcmp("name", atts[0]) && in createAudioDecoderCap()
519 !strcmp("enabled", atts[2])); in createAudioDecoderCap()
522 const int codec = findTagForName(sAudioDecoderNameMap, nMappings, atts[1]); in createAudioDecoderCap()
524 ALOGE("MediaProfiles::createAudioDecoderCap failed to locate codec %s", atts[1]); in createAudioDecoderCap()
535 MediaProfiles::createVideoDecoderCap(const char **atts, size_t natts) in createVideoDecoderCap() argument
538 !strcmp("name", atts[0]) && in createVideoDecoderCap()
539 !strcmp("enabled", atts[2])); in createVideoDecoderCap()
542 const int codec = findTagForName(sVideoDecoderNameMap, nMappings, atts[1]); in createVideoDecoderCap()
544 ALOGE("MediaProfiles::createVideoDecoderCap failed to locate codec %s", atts[1]); in createVideoDecoderCap()
555 MediaProfiles::createVideoEncoderCap(const char **atts, size_t natts) in createVideoEncoderCap() argument
558 !strcmp("name", atts[0]) && in createVideoEncoderCap()
559 !strcmp("enabled", atts[2]) && in createVideoEncoderCap()
560 !strcmp("minBitRate", atts[4]) && in createVideoEncoderCap()
561 !strcmp("maxBitRate", atts[6]) && in createVideoEncoderCap()
562 !strcmp("minFrameWidth", atts[8]) && in createVideoEncoderCap()
563 !strcmp("maxFrameWidth", atts[10]) && in createVideoEncoderCap()
564 !strcmp("minFrameHeight", atts[12]) && in createVideoEncoderCap()
565 !strcmp("maxFrameHeight", atts[14]) && in createVideoEncoderCap()
566 !strcmp("minFrameRate", atts[16]) && in createVideoEncoderCap()
567 !strcmp("maxFrameRate", atts[18])); in createVideoEncoderCap()
570 const int codec = findTagForName(sVideoEncoderNameMap, nMappings, atts[1]); in createVideoEncoderCap()
572 ALOGE("MediaProfiles::createVideoEncoderCap failed to locate codec %s", atts[1]); in createVideoEncoderCap()
578 atoi(atts[5]), atoi(atts[7]), atoi(atts[9]), atoi(atts[11]), atoi(atts[13]), in createVideoEncoderCap()
579 atoi(atts[15]), atoi(atts[17]), atoi(atts[19])); in createVideoEncoderCap()
585 MediaProfiles::createAudioEncoderCap(const char **atts, size_t natts) in createAudioEncoderCap() argument
588 !strcmp("name", atts[0]) && in createAudioEncoderCap()
589 !strcmp("enabled", atts[2]) && in createAudioEncoderCap()
590 !strcmp("minBitRate", atts[4]) && in createAudioEncoderCap()
591 !strcmp("maxBitRate", atts[6]) && in createAudioEncoderCap()
592 !strcmp("minSampleRate", atts[8]) && in createAudioEncoderCap()
593 !strcmp("maxSampleRate", atts[10]) && in createAudioEncoderCap()
594 !strcmp("minChannels", atts[12]) && in createAudioEncoderCap()
595 !strcmp("maxChannels", atts[14])); in createAudioEncoderCap()
598 const int codec = findTagForName(sAudioEncoderNameMap, nMappings, atts[1]); in createAudioEncoderCap()
600 ALOGE("MediaProfiles::createAudioEncoderCap failed to locate codec %s", atts[1]); in createAudioEncoderCap()
605 new MediaProfiles::AudioEncoderCap(static_cast<audio_encoder>(codec), atoi(atts[5]), in createAudioEncoderCap()
606 atoi(atts[7]), atoi(atts[9]), atoi(atts[11]), atoi(atts[13]), atoi(atts[15])); in createAudioEncoderCap()
612 MediaProfiles::createEncoderOutputFileFormat(const char **atts, size_t natts) in createEncoderOutputFileFormat() argument
615 !strcmp("name", atts[0])); in createEncoderOutputFileFormat()
618 const int format = findTagForName(sFileFormatMap, nMappings, atts[1]); in createEncoderOutputFileFormat()
635 int cameraId, const char **atts, size_t natts, Vector<int>& cameraIds) in createCamcorderProfile() argument
638 !strcmp("quality", atts[0]) && in createCamcorderProfile()
639 !strcmp("fileFormat", atts[2]) && in createCamcorderProfile()
640 !strcmp("duration", atts[4])); in createCamcorderProfile()
644 const int quality = findTagForName(sCamcorderQualityNameMap, nProfileMappings, atts[1]); in createCamcorderProfile()
646 ALOGE("MediaProfiles::createCamcorderProfile failed to locate quality %s", atts[1]); in createCamcorderProfile()
651 const int fileFormat = findTagForName(sFileFormatMap, nFormatMappings, atts[3]); in createCamcorderProfile()
653 ALOGE("MediaProfiles::createCamcorderProfile failed to locate file format %s", atts[1]); in createCamcorderProfile()
664 profile->mDuration = atoi(atts[5]); in createCamcorderProfile()
681 void MediaProfiles::addImageEncodingQualityLevel(int cameraId, const char** atts, size_t natts) in addImageEncodingQualityLevel() argument
684 !strcmp("quality", atts[0])); in addImageEncodingQualityLevel()
685 int quality = atoi(atts[1]); in addImageEncodingQualityLevel()
699 MediaProfiles::getCameraId(const char** atts, size_t natts) in getCameraId() argument
701 if (!atts[0]) return 0; // default cameraId = 0 in getCameraId()
703 !strcmp("cameraId", atts[0])); in getCameraId()
704 return atoi(atts[1]); in getCameraId()
707 void MediaProfiles::addStartTimeOffset(int cameraId, const char** atts, size_t natts) in addStartTimeOffset() argument
710 if (natts >= 3 && atts[2]) { in addStartTimeOffset()
711 CHECK(natts >= 4 && !strcmp("startOffsetMs", atts[2])); in addStartTimeOffset()
712 offsetTimeMs = atoi(atts[3]); in addStartTimeOffset()
720 MediaProfiles::startElementHandler(void *userData, const char *name, const char **atts) in startElementHandler() argument
724 while (atts[natts]) { in startElementHandler()
730 createVideoCodec(atts, natts, profiles); in startElementHandler()
732 createAudioCodec(atts, natts, profiles); in startElementHandler()
735 strcmp("true", atts[3]) == 0) { in startElementHandler()
736 MediaProfiles::VideoEncoderCap* cap = createVideoEncoderCap(atts, natts); in startElementHandler()
742 strcmp("true", atts[3]) == 0) { in startElementHandler()
743 MediaProfiles::AudioEncoderCap* cap = createAudioEncoderCap(atts, natts); in startElementHandler()
749 strcmp("true", atts[3]) == 0) { in startElementHandler()
750 MediaProfiles::VideoDecoderCap* cap = createVideoDecoderCap(atts, natts); in startElementHandler()
756 strcmp("true", atts[3]) == 0) { in startElementHandler()
757 MediaProfiles::AudioDecoderCap* cap = createAudioDecoderCap(atts, natts); in startElementHandler()
762 profiles->mEncoderOutputFileFormats.add(createEncoderOutputFileFormat(atts, natts)); in startElementHandler()
764 profiles->mCurrentCameraId = getCameraId(atts, natts); in startElementHandler()
765 profiles->addStartTimeOffset(profiles->mCurrentCameraId, atts, natts); in startElementHandler()
768 profiles->mCurrentCameraId, atts, natts, profiles->mCameraIds); in startElementHandler()
773 profiles->addImageEncodingQualityLevel(profiles->mCurrentCameraId, atts, natts); in startElementHandler()