Loading apex/manifest.json +1 −1 Original line number Original line Diff line number Diff line { { "name": "com.android.media", "name": "com.android.media", "version": 309999910, "version": 319999900, "requireNativeLibs": [ "requireNativeLibs": [ "libandroid.so", "libandroid.so", "libbinder_ndk.so", "libbinder_ndk.so", Loading apex/manifest_codec.json +1 −1 Original line number Original line Diff line number Diff line { { "name": "com.android.media.swcodec", "name": "com.android.media.swcodec", "version": 309999910, "version": 319999900, "requireNativeLibs": [ "requireNativeLibs": [ ":sphal" ":sphal" ] ] Loading media/codec2/sfplugin/Codec2InfoBuilder.cpp +17 −4 Original line number Original line Diff line number Diff line Loading @@ -67,7 +67,8 @@ bool hasSuffix(const std::string& s, const char* suffix) { s.compare(s.size() - suffixLen, suffixLen, suffix) == 0; s.compare(s.size() - suffixLen, suffixLen, suffix) == 0; } } void addSupportedProfileLevels( // returns true if component advertised supported profile level(s) bool addSupportedProfileLevels( std::shared_ptr<Codec2Client::Interface> intf, std::shared_ptr<Codec2Client::Interface> intf, MediaCodecInfo::CapabilitiesWriter *caps, MediaCodecInfo::CapabilitiesWriter *caps, const Traits& trait, const std::string &mediaType) { const Traits& trait, const std::string &mediaType) { Loading @@ -87,12 +88,12 @@ void addSupportedProfileLevels( c2_status_t err = intf->querySupportedValues(profileQuery, C2_DONT_BLOCK); c2_status_t err = intf->querySupportedValues(profileQuery, C2_DONT_BLOCK); ALOGV("query supported profiles -> %s | %s", asString(err), asString(profileQuery[0].status)); ALOGV("query supported profiles -> %s | %s", asString(err), asString(profileQuery[0].status)); if (err != C2_OK || profileQuery[0].status != C2_OK) { if (err != C2_OK || profileQuery[0].status != C2_OK) { return; return false; } } // we only handle enumerated values // we only handle enumerated values if (profileQuery[0].values.type != C2FieldSupportedValues::VALUES) { if (profileQuery[0].values.type != C2FieldSupportedValues::VALUES) { return; return false; } } // determine if codec supports HDR // determine if codec supports HDR Loading Loading @@ -125,6 +126,8 @@ void addSupportedProfileLevels( supportsHdr |= (mediaType == MIMETYPE_VIDEO_VP9); supportsHdr |= (mediaType == MIMETYPE_VIDEO_VP9); supportsHdr |= (mediaType == MIMETYPE_VIDEO_AV1); supportsHdr |= (mediaType == MIMETYPE_VIDEO_AV1); bool added = false; for (C2Value::Primitive profile : profileQuery[0].values.values) { for (C2Value::Primitive profile : profileQuery[0].values.values) { pl.profile = (C2Config::profile_t)profile.ref<uint32_t>(); pl.profile = (C2Config::profile_t)profile.ref<uint32_t>(); std::vector<std::unique_ptr<C2SettingResult>> failures; std::vector<std::unique_ptr<C2SettingResult>> failures; Loading Loading @@ -165,6 +168,7 @@ void addSupportedProfileLevels( } else if (!mapper) { } else if (!mapper) { caps->addProfileLevel(pl.profile, pl.level); caps->addProfileLevel(pl.profile, pl.level); } } added = true; // for H.263 also advertise the second highest level if the // for H.263 also advertise the second highest level if the // codec supports level 45, as level 45 only covers level 10 // codec supports level 45, as level 45 only covers level 10 Loading @@ -188,6 +192,7 @@ void addSupportedProfileLevels( } } } } } } return added; } } void addSupportedColorFormats( void addSupportedColorFormats( Loading Loading @@ -604,7 +609,15 @@ status_t Codec2InfoBuilder::buildMediaCodecList(MediaCodecListWriter* writer) { } } } } addSupportedProfileLevels(intf, caps.get(), trait, mediaType); if (!addSupportedProfileLevels(intf, caps.get(), trait, mediaType)) { // TODO(b/193279646) This will get fixed in C2InterfaceHelper // Some components may not advertise supported values if they use a const // param for profile/level (they support only one profile). For now cover // only VP8 here until it is fixed. if (mediaType == MIMETYPE_VIDEO_VP8) { caps->addProfileLevel(VP8ProfileMain, VP8Level_Version0); } } addSupportedColorFormats(intf, caps.get(), trait, mediaType); addSupportedColorFormats(intf, caps.get(), trait, mediaType); } } } } Loading Loading
apex/manifest.json +1 −1 Original line number Original line Diff line number Diff line { { "name": "com.android.media", "name": "com.android.media", "version": 309999910, "version": 319999900, "requireNativeLibs": [ "requireNativeLibs": [ "libandroid.so", "libandroid.so", "libbinder_ndk.so", "libbinder_ndk.so", Loading
apex/manifest_codec.json +1 −1 Original line number Original line Diff line number Diff line { { "name": "com.android.media.swcodec", "name": "com.android.media.swcodec", "version": 309999910, "version": 319999900, "requireNativeLibs": [ "requireNativeLibs": [ ":sphal" ":sphal" ] ] Loading
media/codec2/sfplugin/Codec2InfoBuilder.cpp +17 −4 Original line number Original line Diff line number Diff line Loading @@ -67,7 +67,8 @@ bool hasSuffix(const std::string& s, const char* suffix) { s.compare(s.size() - suffixLen, suffixLen, suffix) == 0; s.compare(s.size() - suffixLen, suffixLen, suffix) == 0; } } void addSupportedProfileLevels( // returns true if component advertised supported profile level(s) bool addSupportedProfileLevels( std::shared_ptr<Codec2Client::Interface> intf, std::shared_ptr<Codec2Client::Interface> intf, MediaCodecInfo::CapabilitiesWriter *caps, MediaCodecInfo::CapabilitiesWriter *caps, const Traits& trait, const std::string &mediaType) { const Traits& trait, const std::string &mediaType) { Loading @@ -87,12 +88,12 @@ void addSupportedProfileLevels( c2_status_t err = intf->querySupportedValues(profileQuery, C2_DONT_BLOCK); c2_status_t err = intf->querySupportedValues(profileQuery, C2_DONT_BLOCK); ALOGV("query supported profiles -> %s | %s", asString(err), asString(profileQuery[0].status)); ALOGV("query supported profiles -> %s | %s", asString(err), asString(profileQuery[0].status)); if (err != C2_OK || profileQuery[0].status != C2_OK) { if (err != C2_OK || profileQuery[0].status != C2_OK) { return; return false; } } // we only handle enumerated values // we only handle enumerated values if (profileQuery[0].values.type != C2FieldSupportedValues::VALUES) { if (profileQuery[0].values.type != C2FieldSupportedValues::VALUES) { return; return false; } } // determine if codec supports HDR // determine if codec supports HDR Loading Loading @@ -125,6 +126,8 @@ void addSupportedProfileLevels( supportsHdr |= (mediaType == MIMETYPE_VIDEO_VP9); supportsHdr |= (mediaType == MIMETYPE_VIDEO_VP9); supportsHdr |= (mediaType == MIMETYPE_VIDEO_AV1); supportsHdr |= (mediaType == MIMETYPE_VIDEO_AV1); bool added = false; for (C2Value::Primitive profile : profileQuery[0].values.values) { for (C2Value::Primitive profile : profileQuery[0].values.values) { pl.profile = (C2Config::profile_t)profile.ref<uint32_t>(); pl.profile = (C2Config::profile_t)profile.ref<uint32_t>(); std::vector<std::unique_ptr<C2SettingResult>> failures; std::vector<std::unique_ptr<C2SettingResult>> failures; Loading Loading @@ -165,6 +168,7 @@ void addSupportedProfileLevels( } else if (!mapper) { } else if (!mapper) { caps->addProfileLevel(pl.profile, pl.level); caps->addProfileLevel(pl.profile, pl.level); } } added = true; // for H.263 also advertise the second highest level if the // for H.263 also advertise the second highest level if the // codec supports level 45, as level 45 only covers level 10 // codec supports level 45, as level 45 only covers level 10 Loading @@ -188,6 +192,7 @@ void addSupportedProfileLevels( } } } } } } return added; } } void addSupportedColorFormats( void addSupportedColorFormats( Loading Loading @@ -604,7 +609,15 @@ status_t Codec2InfoBuilder::buildMediaCodecList(MediaCodecListWriter* writer) { } } } } addSupportedProfileLevels(intf, caps.get(), trait, mediaType); if (!addSupportedProfileLevels(intf, caps.get(), trait, mediaType)) { // TODO(b/193279646) This will get fixed in C2InterfaceHelper // Some components may not advertise supported values if they use a const // param for profile/level (they support only one profile). For now cover // only VP8 here until it is fixed. if (mediaType == MIMETYPE_VIDEO_VP8) { caps->addProfileLevel(VP8ProfileMain, VP8Level_Version0); } } addSupportedColorFormats(intf, caps.get(), trait, mediaType); addSupportedColorFormats(intf, caps.get(), trait, mediaType); } } } } Loading