Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
4cdb851
Effects: Do not allow ViperFx effect to be supsended
rmp22 Mar 5, 2025
f693262
Effects: Do not allow SW dolby effect to be supsended
Ghosuto May 4, 2025
0ef14e5
fixup! Camera: Skip stream size check for whitelisted apps
ArianK16a Jan 30, 2023
969d880
Camera: Add support for preview frame fd
Apr 29, 2014
94457ff
av: Remove restrictions for system audio record
jhenrique09 Mar 24, 2020
111a884
CameraService: Fix deadlock in binder death cleanup
May 22, 2018
f9ca543
Camera: Flush Improvements - Result drain optimization
Aug 28, 2019
cf90455
Camera: Removing cachedump call to miminimize delay during close.
Jul 26, 2022
55e8541
camera: Don't segfault if we get a NULL parameter
hyperb1iss May 1, 2013
56b7031
stagefright: add changes related to high-framerates in CameraSource
nadinsylaa May 4, 2018
d6eff73
libstagefright: Support YVU420SemiPlanar camera format
intervigilium Jan 3, 2016
5b36b24
StagefrightRecorder: Add "set-title" parameter
cjh1249131356 Oct 9, 2022
95d20e3
nuplayer: Avoid crash when codec fails to load
Dec 15, 2015
05d89b1
av: Initial support for 24bit encoding and 6 channels
neobuddy89 Jun 2, 2022
80ee8f5
frameworks/av: Import Xiaomi Image Tags defenitions
johnmart19 May 30, 2023
1a0bdc9
libstagefright: omx: Add support for loading prebuilt ddp and ac4 dec…
javelinanddart May 6, 2022
cda1373
OMX: Remove support for prebuilt ac4 decoder
adithya2306 Sep 26, 2023
fb822ff
media: OMXStore: Import loading libstagefrightdolby
johnmart19 Dec 24, 2022
3ecb19b
media: Add changes to pick target specific media xml's
May 8, 2018
325389e
MediaProfiles: Check before overriding media settings xml
neobuddy89 Apr 1, 2023
6c5d53a
MediaHTTP: resolve mName race condition issue
Jun 4, 2025
f332fc5
issue: After connecting the Bluetooth earphones and projecting the sc…
Apr 22, 2025
009a143
skip mediametrics when statsd is not available
rmp22 Oct 5, 2025
50afbb7
libcameraservice: Add support to set vendor tag with client package name
cjh1249131356 Jul 22, 2022
76c8426
libcameraservice: Fixup! Add support to set vendor tag with client pa…
Terminator-J Jun 2, 2025
17c02c7
libcameraservice: add TARGET_CAMERA_NEEDS_CLIENT_INFO_LIB
Hikari-no-Tenshi Nov 9, 2021
29f0a17
libcameraservice: Fixup! add TARGET_CAMERA_NEEDS_CLIENT_INFO_LIB
Terminator-J Jun 2, 2025
0b0ac66
libcameraservice: support disabling torch control support
RealJohnGalt Aug 6, 2025
f0f0d28
updatePolicyState after updating all EffectHandle state.
xialei6 Aug 21, 2025
a50528b
camera: Add extension to control torch light strength
Dhina17 May 26, 2024
041e319
Fix usb camera number is not correct after plug out.
May 30, 2024
39e7783
Extends "Camera: Skip stream size check for whitelisted apps"
someone5678 Jan 5, 2025
9b91f67
CameraProviderExtension: Inject strength in fixupTorchStrengthTags
bengris32 Dec 7, 2024
e6deda5
CameraProviderExtension: Use weak linkage for default implementations
bengris32 Oct 8, 2024
afb40c4
CameraProviderExtension: Return BAD_VALUE for invalid strength level
bengris32 Dec 7, 2024
717e909
CameraProviderExtension: Update mTorchStrengthLevel with new level
bengris32 Dec 7, 2024
9a8fee1
CameraProviderExtension: Reset strength level on torch off
bengris32 Dec 7, 2024
fae9ab2
CameraProviderExtension: add enabled bool and always set torch
RealJohnGalt Jan 28, 2025
d85f7de
Null Pointer Exception in CameraServer during user switch
phoenixwxy Nov 5, 2025
913fe37
audio: fix incorrect eos in sync offload output case.
Dec 15, 2025
89971ea
MediaCodec: Improve mediacrypto async priorty
Shipeng-Sun-Amlogic Dec 15, 2025
f93f378
Revert "codec2,aom/Android.bp: add libcodec2_soft_sanitize_cfi"
neobuddy89 Feb 3, 2026
eb913ff
Add AC4Tbl params for dolby AC4 decoder [1/2]
HELLBOY017 May 24, 2022
a069b98
don't require RECORD_AUDIO permission for REMOTE_SUBMIX audio source
muhomorr Dec 10, 2024
5437357
codec2,aom/Android.bp: Disable CFI
neobuddy89 Feb 3, 2026
8eca832
av: support per-app volume [1/3]
cjybyjk Jan 24, 2026
6cd6ecc
fixup! av: support per-app volume [1/3]
someone5678 Jan 24, 2026
d498188
av: updating syntax for keyed vector -> map transition
rmp22 Jan 24, 2026
cd23f08
av: updating syntax for IAfTrackBase
rmp22 Jan 24, 2026
fa46990
audio: Check MODIFY_AUDIO_ROUTING permission for per-app volume
adithya2306 Jan 24, 2026
088bf74
fixing visualizer not working on bluetooth audio
rmp22 Dec 16, 2025
7bfda39
fix null derefence exception when surface is reset
adaim-meta Jul 23, 2025
d445983
Fix PlanesLockGuard buffer lock leak
jsebechlebsky Mar 23, 2026
9d0820a
Fix PlanesLockGuard::getStatus() return type
jsebechlebsky Mar 23, 2026
a73eb19
Fix PlanesLockGuard copy-assignment delete type
jsebechlebsky Mar 23, 2026
0bfce86
Adapt dynamic resolution in nuplayer with enable sample aspect ratio …
Mar 31, 2026
982e22b
Revert "MultiAccessUnit reflector helper allocated once per Component…
HELLBOY017 Aug 2, 2025
f74dbad
MediaSync: fix nullptr dereference when detachNextBuffer fails
Apr 14, 2026
90f37d2
MediaSync: remove InputListener death recipient dead code
Apr 22, 2026
44c63d6
MediaSync: fix nullptr dereference in onAbandoned_l on output death
May 5, 2026
2be627e
Fix Active Array Size calculation logic
May 21, 2026
b31f3d6
Explicitly initialize chrono types in VirtualCameraRenderThread
jacksonwind May 21, 2026
6bc717c
CameraService: Add OnePlus camera extension support for zoom
kde-yyds May 31, 2026
90817c2
camera: bypass roundBufferDimensionNearest for Y16
AdarshGrewal Jun 12, 2026
0cbb72f
Nuplayer: Fix use-after-free in AWakeLock
Jun 24, 2026
7debd2e
Revert "issue: After connecting the Bluetooth earphones and projectin…
neobuddy89 Jul 2, 2026
2598b56
audiopolicy: Do not wipe device's known codec during bluetooth discon…
iogh07 Jun 17, 2026
b8d2f0b
codec2: restore legacy sync fence ABI
pbzin Aug 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions camera/CameraParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ void CameraParameters::unflatten(const String8 &params)

void CameraParameters::set(const char *key, const char *value)
{
if (key == NULL || value == NULL)
return;

// XXX i think i can do this with strspn()
if (strchr(key, '=') || strchr(key, ';')) {
//XXX ALOGE("Key \"%s\"contains invalid character (= or ;)", key);
Expand Down
4 changes: 4 additions & 0 deletions camera/CameraSessionStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ const int CameraSessionStats::CAMERA_STATE_ACTIVE = 1;
const int CameraSessionStats::CAMERA_STATE_IDLE = 2;
const int CameraSessionStats::CAMERA_STATE_CLOSED = 3;

const int CameraSessionStats::CAMERA_STATE_EXCEPTION = 4;
const int CameraSessionStats::CAMERA_STATE_SESSION_CONFIGURED = 5;
const int CameraSessionStats::CAMERA_STATE_FIRST_FRAME_ARRIVED = 6;

const int CameraSessionStats::CAMERA_FACING_BACK = 0;
const int CameraSessionStats::CAMERA_FACING_FRONT = 1;
const int CameraSessionStats::CAMERA_FACING_EXTERNAL = 2;
Expand Down
17 changes: 14 additions & 3 deletions camera/ICameraClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ class BpCameraClient: public BpInterface<ICameraClient>
data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor());
data.writeInt32(msgType);
data.writeInt32(ext1);
data.writeInt32(ext2);
if ((msgType == CAMERA_MSG_PREVIEW_FRAME) && (ext1 == CAMERA_FRAME_DATA_FD)) {
ALOGD("notifyCallback: CAMERA_MSG_PREVIEW_FRAME fd = %d", ext2);
data.writeFileDescriptor(ext2);
} else {
data.writeInt32(ext2);
}
remote()->transact(NOTIFY_CALLBACK, data, &reply, IBinder::FLAG_ONEWAY);
}

Expand Down Expand Up @@ -129,8 +134,14 @@ status_t BnCameraClient::onTransact(
ALOGV("NOTIFY_CALLBACK");
CHECK_INTERFACE(ICameraClient, data, reply);
int32_t msgType = data.readInt32();
int32_t ext1 = data.readInt32();
int32_t ext2 = data.readInt32();
int32_t ext1 = data.readInt32();
int32_t ext2 = 0;
if ((msgType == CAMERA_MSG_PREVIEW_FRAME) && (ext1 == CAMERA_FRAME_DATA_FD)) {
ext2 = data.readFileDescriptor();
ALOGD("onTransact: CAMERA_MSG_PREVIEW_FRAME fd = %d", ext2);
} else {
ext2 = data.readInt32();
}
notifyCallback(msgType, ext1, ext2);
return NO_ERROR;
} break;
Expand Down
18 changes: 16 additions & 2 deletions camera/cameraserver/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,31 @@ cc_binary {
"android.hardware.camera.device@1.0",
"android.hardware.camera.device@3.2",
"android.hardware.camera.device@3.4",
],
] + select(soong_config_variable("camera", "needs_client_info_lib"), {
true: ["//hardware/oneplus:vendor.oneplus.hardware.camera@1.0"],
false: [],
default: [],
}) + select(soong_config_variable("camera", "needs_client_info_lib_oplus"), {
true: ["vendor.oplus.hardware.cameraMDM@2.0"],
false: [],
default: [],
}),

static_libs: [
"libcameraservice",
],

compile_multilib: "first",

cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wno-unused-parameter",
],
] + select(soong_config_variable("camera", "package_name"), {
any @ flag_val: ["-DCAMERA_PACKAGE_NAME=\"" + flag_val + "\""],
default: [],
}),

init_rc: ["cameraserver.rc"],

Expand Down
3 changes: 3 additions & 0 deletions camera/include/camera/CameraSessionStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ class CameraSessionStats : public android::Parcelable {
static const int CAMERA_STATE_ACTIVE;
static const int CAMERA_STATE_IDLE;
static const int CAMERA_STATE_CLOSED;
static const int CAMERA_STATE_EXCEPTION;
static const int CAMERA_STATE_SESSION_CONFIGURED;
static const int CAMERA_STATE_FIRST_FRAME_ARRIVED;

/**
* Values for notifyCameraState facing
Expand Down
85 changes: 85 additions & 0 deletions include/media/AppVolume.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* Copyright (C) 2022 Project Kaleidoscope
*
* 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 APP_VOLUME_H
#define APP_VOLUME_H

#include <android/media/AppVolumeData.h>
#include <utils/String8.h>
#include <binder/Parcel.h>
#include <binder/Parcelable.h>
#include <media/AidlConversionUtil.h>

namespace android {
namespace media {
class AppVolume : public Parcelable {
public:
String8 packageName;
bool muted;
float volume;
bool active;

bool operator <(const AppVolume &obj) const {
if (active != obj.active) return active < obj.active;
return packageName < obj.packageName;
}

virtual status_t writeToParcel(Parcel* parcel) const {
AppVolumeData parcelable;
return writeToParcelable(&parcelable)
?: parcelable.writeToParcel(parcel);
}

virtual status_t writeToParcelable(AppVolumeData* parcelable) const {
parcelable->packageName = packageName.c_str();
parcelable->muted = muted;
parcelable->volume = volume;
parcelable->active = active;
return OK;
}

virtual status_t readFromParcel(const Parcel* parcel) {
AppVolumeData data;
return data.readFromParcel(parcel)
?: readFromParcelable(data);
}

virtual status_t readFromParcelable(const AppVolumeData& parcelable) {
packageName = parcelable.packageName.c_str();
muted = parcelable.muted;
volume = parcelable.volume;
active = parcelable.active;
return OK;
}
};

inline ConversionResult<AppVolume>
aidl2legacy_AppVolume(const AppVolumeData& aidl) {
AppVolume legacy;
RETURN_IF_ERROR(legacy.readFromParcelable(aidl));
return legacy;
}

inline ConversionResult<AppVolumeData>
legacy2aidl_AppVolume(const AppVolume& legacy) {
AppVolumeData aidl;
RETURN_IF_ERROR(legacy.writeToParcelable(&aidl));
return aidl;
}
} // namespace media
}; // namespace android

#endif // APP_VOLUME_H
1 change: 1 addition & 0 deletions media/aidl/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ aidl_interface {
double_loadable: true,
local_include_dir: ".",
srcs: [
"android/media/AppVolumeData.aidl",
"android/media/IAudioManagerNative.aidl",
"android/media/InterpolatorConfig.aidl",
"android/media/InterpolatorType.aidl",
Expand Down
27 changes: 27 additions & 0 deletions media/aidl/android/media/AppVolumeData.aidl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (C) 2022 Project Kaleidoscope
*
* 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.
*/

package android.media;

/**
* {@hide}
*/
parcelable AppVolumeData {
@utf8InCpp String packageName;
int muted;
float volume;
int active;
}
9 changes: 7 additions & 2 deletions media/codec2/components/aom/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ cc_library {
defaults: [
"libcodec2_soft-defaults",
"libcodec2_soft_sanitize_all-defaults",
"libcodec2_soft_sanitize_cfi-defaults",
],

// coordinated with frameworks/av/media/codec2/components/gav1/Android.bp
Expand All @@ -23,14 +22,17 @@ cc_library {

srcs: ["C2SoftAomDec.cpp"],
static_libs: ["libaom"],

sanitize: {
cfi: false,
},
}

cc_library {
name: "libcodec2_soft_av1enc",
defaults: [
"libcodec2_soft-defaults",
"libcodec2_soft_sanitize_all-defaults",
"libcodec2_soft_sanitize_cfi-defaults",
],

static_libs: ["libaom"],
Expand All @@ -44,4 +46,7 @@ cc_library {
"com.android.media.swcodec",
],

sanitize: {
cfi: false,
},
}
11 changes: 3 additions & 8 deletions media/codec2/hal/aidl/ComponentStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store)
mParamReflectors.push_back(paramReflector);
}
#endif
// MultiAccessUnit reflector helper is allocated once per store.
// All components in this store can reuse this reflector helper.
if (MultiAccessUnitHelper::isEnabledOnPlatform()) {
std::shared_ptr<C2ReflectorHelper> helper = std::make_shared<C2ReflectorHelper>();
mParamReflectors.push_back(helper);
mMultiAccessUnitReflector = helper;
}

// Retrieve supported parameters from store
using namespace std::placeholders;
Expand Down Expand Up @@ -250,9 +243,11 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn
// param reflectors. Currently filters work on video domain only,
// and the MultiAccessUnitHelper is only enabled on audio domain;
// thus we pass the component's param reflector, which is mParamReflectors[0].
std::shared_ptr<C2ReflectorHelper> multiAccessReflector(new C2ReflectorHelper());
multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>(
c2interface,
mMultiAccessUnitReflector);
multiAccessReflector);
mParamReflectors.push_back(multiAccessReflector);
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ struct ComponentStore : public BnComponentStore {
std::shared_ptr<C2ComponentStore> mStore;
std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors;

// Reflector helper for MultiAccessUnitHelper
std::shared_ptr<C2ReflectorHelper> mMultiAccessUnitReflector;

std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors;
std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors;
std::set<C2String> mLoadedInterfaces;
Expand Down
13 changes: 4 additions & 9 deletions media/codec2/hal/hidl/1.0/utils/ComponentStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store)
}
#endif

// MultiAccessUnit reflector helper is allocated once per store.
// All components in this store can reuse this reflector helper.
if (MultiAccessUnitHelper::isEnabledOnPlatform()) {
std::shared_ptr<C2ReflectorHelper> helper = std::make_shared<C2ReflectorHelper>();
mParamReflectors.push_back(helper);
mMultiAccessUnitReflector = helper;
}

// Retrieve supported parameters from store
using namespace std::placeholders;
mInit = mConfigurable->init(mParameterCache);
Expand Down Expand Up @@ -236,9 +228,12 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn
}
}
if (!isComponentSupportsLargeAudioFrame) {
std::shared_ptr<C2ReflectorHelper> multiAccessReflector(new C2ReflectorHelper());
multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>(
c2interface,
mMultiAccessUnitReflector);
multiAccessReflector);
mParamReflectors.push_back(multiAccessReflector);

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ struct ComponentStore : public IComponentStore {
std::shared_ptr<C2ComponentStore> mStore;
std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors;

// Reflector helper for MultiAccessUnitHelper
std::shared_ptr<C2ReflectorHelper> mMultiAccessUnitReflector;

std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors;
std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors;
std::set<C2String> mLoadedInterfaces;
Expand Down
13 changes: 4 additions & 9 deletions media/codec2/hal/hidl/1.1/utils/ComponentStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store)
}
#endif

// MultiAccessUnit reflector helper is allocated once per store.
// All components in this store can reuse this reflector helper.
if (MultiAccessUnitHelper::isEnabledOnPlatform()) {
std::shared_ptr<C2ReflectorHelper> helper = std::make_shared<C2ReflectorHelper>();
mParamReflectors.push_back(helper);
mMultiAccessUnitReflector = helper;
}

// Retrieve supported parameters from store
using namespace std::placeholders;
mInit = mConfigurable->init(mParameterCache);
Expand Down Expand Up @@ -235,10 +227,13 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn
break;
}
}

if (!isComponentSupportsLargeAudioFrame) {
std::shared_ptr<C2ReflectorHelper> multiAccessReflector(new C2ReflectorHelper());
multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>(
c2interface,
mMultiAccessUnitReflector);
multiAccessReflector);
mParamReflectors.push_back(multiAccessReflector);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ struct ComponentStore : public IComponentStore {
std::shared_ptr<C2ComponentStore> mStore;
std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors;

// Reflector helper for MultiAccessUnitHelper
std::shared_ptr<C2ReflectorHelper> mMultiAccessUnitReflector;

std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors;
std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors;
std::set<C2String> mLoadedInterfaces;
Expand Down
12 changes: 3 additions & 9 deletions media/codec2/hal/hidl/1.2/utils/ComponentStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store)
}
#endif

// MultiAccessUnit reflector helper is allocated once per store.
// All components in this store can reuse this reflector helper.
if (MultiAccessUnitHelper::isEnabledOnPlatform()) {
std::shared_ptr<C2ReflectorHelper> helper = std::make_shared<C2ReflectorHelper>();
mParamReflectors.push_back(helper);
mMultiAccessUnitReflector = helper;
}

// Retrieve supported parameters from store
using namespace std::placeholders;
mInit = mConfigurable->init(mParameterCache);
Expand Down Expand Up @@ -236,9 +228,11 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn
}
}
if (!isComponentSupportsLargeAudioFrame) {
std::shared_ptr<C2ReflectorHelper> multiAccessReflector(new C2ReflectorHelper());
multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>(
c2interface,
mMultiAccessUnitReflector);
multiAccessReflector);
mParamReflectors.push_back(multiAccessReflector);
}
}
}
Expand Down
Loading