Loading media/libmedia/Android.bp +39 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,44 @@ cc_library_static { }, } cc_library_shared { name: "libmedia_codeclist_capabilities", srcs: [ "CodecCapabilities.cpp", "CodecCapabilitiesUtils.cpp", ], local_include_dirs: [ "include", ], shared_libs: [ "libbinder", "liblog", "libstagefright_foundation", "libutils", ], export_include_dirs: [ "include", ], cflags: [ "-Werror", "-Wno-error=deprecated-declarations", "-Wall", ], sanitize: { misc_undefined: [ "unsigned-integer-overflow", "signed-integer-overflow", ], cfi: true, }, } cc_library_shared { name: "libmedia_codeclist", Loading @@ -270,6 +308,7 @@ cc_library_shared { "android.hardware.media.omx@1.0", "libbinder", "liblog", "libmedia_codeclist_capabilities", "libstagefright_foundation", "libutils", ], Loading media/libmedia/CodecCapabilities.cpp 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright 2024, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ //#define LOG_NDEBUG 0 #define LOG_TAG "CodecCapabilities" #include <utils/Log.h> #include <media/CodecCapabilities.h> #include <media/CodecCapabilitiesUtils.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AMessage.h> namespace android { } // namespace android No newline at end of file media/libmedia/CodecCapabilitiesUtils.cpp 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ //#define LOG_NDEBUG 0 #define LOG_TAG "CodecCapabilitiesUtils" #include <utils/Log.h> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <media/CodecCapabilitiesUtils.h> #include <media/stagefright/foundation/AUtils.h> namespace android { } // namespace android No newline at end of file media/libmedia/include/media/CodecCapabilities.h 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright 2024, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef CODEC_CAPABILITIES_H_ #define CODEC_CAPABILITIES_H_ #include <media/CodecCapabilitiesUtils.h> #include <media/stagefright/foundation/ABase.h> #include <media/stagefright/foundation/AMessage.h> #include <media/stagefright/foundation/AString.h> #include <media/stagefright/MediaCodecConstants.h> #include <utils/Errors.h> #include <utils/RefBase.h> #include <utils/Vector.h> #include <utils/StrongPointer.h> namespace android { struct CodecCapabilities { }; } // namespace android #endif // CODEC_CAPABILITIES_H_ No newline at end of file media/libmedia/include/media/CodecCapabilitiesUtils.h 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef CODEC_CAPABILITIES__UTILS_H_ #define CODEC_CAPABILITIES__UTILS_H_ #include <algorithm> #include <cmath> #include <optional> #include <string> #include <vector> #include <utils/Log.h> #include <media/stagefright/foundation/AUtils.h> namespace android { struct ProfileLevel { uint32_t mProfile; uint32_t mLevel; bool operator <(const ProfileLevel &o) const { return mProfile < o.mProfile || (mProfile == o.mProfile && mLevel < o.mLevel); } }; } // namespace android #endif // CODEC_CAPABILITIES__UTILS_H_ No newline at end of file Loading
media/libmedia/Android.bp +39 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,44 @@ cc_library_static { }, } cc_library_shared { name: "libmedia_codeclist_capabilities", srcs: [ "CodecCapabilities.cpp", "CodecCapabilitiesUtils.cpp", ], local_include_dirs: [ "include", ], shared_libs: [ "libbinder", "liblog", "libstagefright_foundation", "libutils", ], export_include_dirs: [ "include", ], cflags: [ "-Werror", "-Wno-error=deprecated-declarations", "-Wall", ], sanitize: { misc_undefined: [ "unsigned-integer-overflow", "signed-integer-overflow", ], cfi: true, }, } cc_library_shared { name: "libmedia_codeclist", Loading @@ -270,6 +308,7 @@ cc_library_shared { "android.hardware.media.omx@1.0", "libbinder", "liblog", "libmedia_codeclist_capabilities", "libstagefright_foundation", "libutils", ], Loading
media/libmedia/CodecCapabilities.cpp 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright 2024, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ //#define LOG_NDEBUG 0 #define LOG_TAG "CodecCapabilities" #include <utils/Log.h> #include <media/CodecCapabilities.h> #include <media/CodecCapabilitiesUtils.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AMessage.h> namespace android { } // namespace android No newline at end of file
media/libmedia/CodecCapabilitiesUtils.cpp 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ //#define LOG_NDEBUG 0 #define LOG_TAG "CodecCapabilitiesUtils" #include <utils/Log.h> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <media/CodecCapabilitiesUtils.h> #include <media/stagefright/foundation/AUtils.h> namespace android { } // namespace android No newline at end of file
media/libmedia/include/media/CodecCapabilities.h 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright 2024, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef CODEC_CAPABILITIES_H_ #define CODEC_CAPABILITIES_H_ #include <media/CodecCapabilitiesUtils.h> #include <media/stagefright/foundation/ABase.h> #include <media/stagefright/foundation/AMessage.h> #include <media/stagefright/foundation/AString.h> #include <media/stagefright/MediaCodecConstants.h> #include <utils/Errors.h> #include <utils/RefBase.h> #include <utils/Vector.h> #include <utils/StrongPointer.h> namespace android { struct CodecCapabilities { }; } // namespace android #endif // CODEC_CAPABILITIES_H_ No newline at end of file
media/libmedia/include/media/CodecCapabilitiesUtils.h 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef CODEC_CAPABILITIES__UTILS_H_ #define CODEC_CAPABILITIES__UTILS_H_ #include <algorithm> #include <cmath> #include <optional> #include <string> #include <vector> #include <utils/Log.h> #include <media/stagefright/foundation/AUtils.h> namespace android { struct ProfileLevel { uint32_t mProfile; uint32_t mLevel; bool operator <(const ProfileLevel &o) const { return mProfile < o.mProfile || (mProfile == o.mProfile && mLevel < o.mLevel); } }; } // namespace android #endif // CODEC_CAPABILITIES__UTILS_H_ No newline at end of file