Skip to content

Commit 54960a9

Browse files
Merge branch 'master' into master
2 parents 0789366 + cb794e0 commit 54960a9

File tree

22 files changed

+4614
-1694
lines changed

22 files changed

+4614
-1694
lines changed

.github/workflows/examples-linux-standalone.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ jobs:
247247
build"
248248
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
249249
linux debug camera-controller \
250-
out/linux-x64-camera-controller/camera-controller \
250+
out/linux-x64-camera-controller/chip-camera-controller \
251251
/tmp/bloat_reports/
252252
- name: Uploading Size Reports
253253
uses: ./.github/actions/upload-size-reports

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+307
Original file line numberDiff line numberDiff line change
@@ -7015,6 +7015,291 @@ cluster LowPower = 1288 {
70157015
command Sleep(): DefaultSuccess = 0;
70167016
}
70177017

7018+
/** The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. */
7019+
provisional cluster CameraAvStreamManagement = 1361 {
7020+
revision 1;
7021+
7022+
enum AudioCodecEnum : enum8 {
7023+
kOPUS = 0;
7024+
kAACLC = 1;
7025+
}
7026+
7027+
enum ImageCodecEnum : enum8 {
7028+
kJPEG = 0;
7029+
}
7030+
7031+
enum StreamUsageEnum : enum8 {
7032+
kInternal = 0;
7033+
kRecording = 1;
7034+
kAnalysis = 2;
7035+
kLiveView = 3;
7036+
}
7037+
7038+
enum TriStateAutoEnum : enum8 {
7039+
kOff = 0;
7040+
kOn = 1;
7041+
kAuto = 2;
7042+
}
7043+
7044+
enum TwoWayTalkSupportTypeEnum : enum8 {
7045+
kNotSupported = 0;
7046+
kHalfDuplex = 1;
7047+
kFullDuplex = 2;
7048+
}
7049+
7050+
enum VideoCodecEnum : enum8 {
7051+
kH264 = 0;
7052+
kHEVC = 1;
7053+
kVVC = 2;
7054+
kAV1 = 3;
7055+
}
7056+
7057+
bitmap Feature : bitmap32 {
7058+
kAudio = 0x1;
7059+
kVideo = 0x2;
7060+
kSnapshot = 0x4;
7061+
kPrivacy = 0x8;
7062+
kSpeaker = 0x10;
7063+
kImageControl = 0x20;
7064+
kWatermark = 0x40;
7065+
kOnScreenDisplay = 0x80;
7066+
kLocalStorage = 0x100;
7067+
kHighDynamicRange = 0x200;
7068+
}
7069+
7070+
struct VideoResolutionStruct {
7071+
int16u width = 0;
7072+
int16u height = 1;
7073+
}
7074+
7075+
struct VideoStreamStruct {
7076+
int16u videoStreamID = 0;
7077+
StreamUsageEnum streamUsage = 1;
7078+
VideoCodecEnum videoCodec = 2;
7079+
int16u minFrameRate = 3;
7080+
int16u maxFrameRate = 4;
7081+
VideoResolutionStruct minResolution = 5;
7082+
VideoResolutionStruct maxResolution = 6;
7083+
int32u minBitRate = 7;
7084+
int32u maxBitRate = 8;
7085+
int16u minFragmentLen = 9;
7086+
int16u maxFragmentLen = 10;
7087+
optional boolean watermarkEnabled = 11;
7088+
optional boolean OSDEnabled = 12;
7089+
int8u referenceCount = 13;
7090+
}
7091+
7092+
struct SnapshotStreamStruct {
7093+
int16u snapshotStreamID = 0;
7094+
ImageCodecEnum imageCodec = 1;
7095+
int16u frameRate = 2;
7096+
int32u bitRate = 3;
7097+
VideoResolutionStruct minResolution = 4;
7098+
VideoResolutionStruct maxResolution = 5;
7099+
int8u quality = 6;
7100+
int8u referenceCount = 7;
7101+
}
7102+
7103+
struct SnapshotParamsStruct {
7104+
VideoResolutionStruct resolution = 0;
7105+
int16u maxFrameRate = 1;
7106+
ImageCodecEnum imageCodec = 2;
7107+
}
7108+
7109+
struct RateDistortionTradeOffPointsStruct {
7110+
VideoCodecEnum codec = 0;
7111+
VideoResolutionStruct resolution = 1;
7112+
int32u minBitRate = 2;
7113+
}
7114+
7115+
struct AudioCapabilitiesStruct {
7116+
int8u maxNumberOfChannels = 0;
7117+
AudioCodecEnum supportedCodecs[] = 1;
7118+
int32u supportedSampleRates[] = 2;
7119+
int8u supportedBitDepths[] = 3;
7120+
}
7121+
7122+
struct AudioStreamStruct {
7123+
int16u audioStreamID = 0;
7124+
StreamUsageEnum streamUsage = 1;
7125+
AudioCodecEnum audioCodec = 2;
7126+
int8u channelCount = 3;
7127+
int32u sampleRate = 4;
7128+
int32u bitRate = 5;
7129+
int8u bitDepth = 6;
7130+
int8u referenceCount = 7;
7131+
}
7132+
7133+
struct VideoSensorParamsStruct {
7134+
int16u sensorWidth = 0;
7135+
int16u sensorHeight = 1;
7136+
int16u maxFPS = 2;
7137+
optional int16u maxHDRFPS = 3;
7138+
}
7139+
7140+
struct ViewportStruct {
7141+
int16u x1 = 0;
7142+
int16u y1 = 1;
7143+
int16u x2 = 2;
7144+
int16u y2 = 3;
7145+
}
7146+
7147+
readonly attribute optional int8u maxConcurrentVideoEncoders = 0;
7148+
readonly attribute optional int32u maxEncodedPixelRate = 1;
7149+
readonly attribute optional VideoSensorParamsStruct videoSensorParams = 2;
7150+
readonly attribute optional boolean nightVisionCapable = 3;
7151+
readonly attribute optional VideoResolutionStruct minViewport = 4;
7152+
readonly attribute optional RateDistortionTradeOffPointsStruct rateDistortionTradeOffPoints[] = 5;
7153+
readonly attribute int32u maxContentBufferSize = 6;
7154+
readonly attribute optional AudioCapabilitiesStruct microphoneCapabilities = 7;
7155+
readonly attribute optional AudioCapabilitiesStruct speakerCapabilities = 8;
7156+
readonly attribute optional TwoWayTalkSupportTypeEnum twoWayTalkSupport = 9;
7157+
readonly attribute optional SnapshotParamsStruct supportedSnapshotParams[] = 10;
7158+
readonly attribute int32u maxNetworkBandwidth = 11;
7159+
readonly attribute optional int16u currentFrameRate = 12;
7160+
attribute access(read: manage, write: manage) optional boolean HDRModeEnabled = 13;
7161+
readonly attribute StreamUsageEnum supportedStreamUsages[] = 14;
7162+
readonly attribute optional VideoStreamStruct allocatedVideoStreams[] = 15;
7163+
readonly attribute optional AudioStreamStruct allocatedAudioStreams[] = 16;
7164+
readonly attribute optional SnapshotStreamStruct allocatedSnapshotStreams[] = 17;
7165+
readonly attribute optional StreamUsageEnum rankedVideoStreamPrioritiesList[] = 18;
7166+
attribute optional boolean softRecordingPrivacyModeEnabled = 19;
7167+
attribute optional boolean softLivestreamPrivacyModeEnabled = 20;
7168+
readonly attribute optional boolean hardPrivacyModeOn = 21;
7169+
attribute access(read: manage, write: manage) optional TriStateAutoEnum nightVision = 22;
7170+
attribute access(read: manage, write: manage) optional TriStateAutoEnum nightVisionIllum = 23;
7171+
attribute access(read: manage, write: manage) optional ViewportStruct viewport = 24;
7172+
attribute access(read: manage, write: manage) optional boolean speakerMuted = 25;
7173+
attribute access(read: manage, write: manage) optional int8u speakerVolumeLevel = 26;
7174+
readonly attribute access(read: manage) optional int8u speakerMaxLevel = 27;
7175+
readonly attribute access(read: manage) optional int8u speakerMinLevel = 28;
7176+
attribute access(read: manage, write: manage) optional boolean microphoneMuted = 29;
7177+
attribute access(read: manage, write: manage) optional int8u microphoneVolumeLevel = 30;
7178+
readonly attribute access(read: manage) optional int8u microphoneMaxLevel = 31;
7179+
readonly attribute access(read: manage) optional int8u microphoneMinLevel = 32;
7180+
attribute access(read: manage, write: manage) optional boolean microphoneAGCEnabled = 33;
7181+
attribute access(read: manage, write: manage) optional int16u imageRotation = 34;
7182+
attribute access(read: manage, write: manage) optional boolean imageFlipHorizontal = 35;
7183+
attribute access(read: manage, write: manage) optional boolean imageFlipVertical = 36;
7184+
attribute access(read: manage, write: manage) optional boolean localVideoRecordingEnabled = 37;
7185+
attribute access(read: manage, write: manage) optional boolean localSnapshotRecordingEnabled = 38;
7186+
attribute access(read: manage, write: manage) optional boolean statusLightEnabled = 39;
7187+
attribute access(read: manage, write: manage) optional ThreeLevelAutoEnum statusLightBrightness = 40;
7188+
readonly attribute command_id generatedCommandList[] = 65528;
7189+
readonly attribute command_id acceptedCommandList[] = 65529;
7190+
readonly attribute event_id eventList[] = 65530;
7191+
readonly attribute attrib_id attributeList[] = 65531;
7192+
readonly attribute bitmap32 featureMap = 65532;
7193+
readonly attribute int16u clusterRevision = 65533;
7194+
7195+
request struct AudioStreamAllocateRequest {
7196+
StreamUsageEnum streamUsage = 0;
7197+
AudioCodecEnum audioCodec = 1;
7198+
int8u channelCount = 2;
7199+
int32u sampleRate = 3;
7200+
int32u bitRate = 4;
7201+
int8u bitDepth = 5;
7202+
}
7203+
7204+
response struct AudioStreamAllocateResponse = 1 {
7205+
int16u audioStreamID = 0;
7206+
}
7207+
7208+
request struct AudioStreamDeallocateRequest {
7209+
int16u audioStreamID = 0;
7210+
}
7211+
7212+
request struct VideoStreamAllocateRequest {
7213+
StreamUsageEnum streamUsage = 0;
7214+
VideoCodecEnum videoCodec = 1;
7215+
int16u minFrameRate = 2;
7216+
int16u maxFrameRate = 3;
7217+
VideoResolutionStruct minResolution = 4;
7218+
VideoResolutionStruct maxResolution = 5;
7219+
int32u minBitRate = 6;
7220+
int32u maxBitRate = 7;
7221+
int16u minFragmentLen = 8;
7222+
int16u maxFragmentLen = 9;
7223+
optional boolean watermarkEnabled = 10;
7224+
optional boolean OSDEnabled = 11;
7225+
}
7226+
7227+
response struct VideoStreamAllocateResponse = 4 {
7228+
int16u videoStreamID = 0;
7229+
}
7230+
7231+
request struct VideoStreamModifyRequest {
7232+
int16u videoStreamID = 0;
7233+
optional boolean watermarkEnabled = 1;
7234+
optional boolean OSDEnabled = 2;
7235+
}
7236+
7237+
request struct VideoStreamDeallocateRequest {
7238+
int16u videoStreamID = 0;
7239+
}
7240+
7241+
request struct SnapshotStreamAllocateRequest {
7242+
ImageCodecEnum imageCodec = 0;
7243+
int16u maxFrameRate = 1;
7244+
int32u bitRate = 2;
7245+
VideoResolutionStruct minResolution = 3;
7246+
VideoResolutionStruct maxResolution = 4;
7247+
int8u quality = 5;
7248+
optional boolean watermarkEnabled = 6;
7249+
optional boolean OSDEnabled = 7;
7250+
}
7251+
7252+
response struct SnapshotStreamAllocateResponse = 8 {
7253+
int16u snapshotStreamID = 0;
7254+
}
7255+
7256+
request struct SnapshotStreamModifyRequest {
7257+
int16u snapshotStreamID = 0;
7258+
optional boolean watermarkEnabled = 1;
7259+
optional boolean OSDEnabled = 2;
7260+
}
7261+
7262+
request struct SnapshotStreamDeallocateRequest {
7263+
int16u snapshotStreamID = 0;
7264+
}
7265+
7266+
request struct SetStreamPrioritiesRequest {
7267+
StreamUsageEnum streamPriorities[] = 0;
7268+
}
7269+
7270+
request struct CaptureSnapshotRequest {
7271+
int16u snapshotStreamID = 0;
7272+
VideoResolutionStruct requestedResolution = 1;
7273+
}
7274+
7275+
response struct CaptureSnapshotResponse = 13 {
7276+
octet_string data = 0;
7277+
ImageCodecEnum imageCodec = 1;
7278+
VideoResolutionStruct resolution = 2;
7279+
}
7280+
7281+
/** This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier. */
7282+
command access(invoke: manage) AudioStreamAllocate(AudioStreamAllocateRequest): AudioStreamAllocateResponse = 0;
7283+
/** This command SHALL deallocate an audio stream on the camera, corresponding to the given audio stream identifier. */
7284+
command access(invoke: manage) AudioStreamDeallocate(AudioStreamDeallocateRequest): DefaultSuccess = 2;
7285+
/** This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. */
7286+
command access(invoke: manage) VideoStreamAllocate(VideoStreamAllocateRequest): VideoStreamAllocateResponse = 3;
7287+
/** This command SHALL be used to modify a stream specified by the VideoStreamID. */
7288+
command access(invoke: manage) VideoStreamModify(VideoStreamModifyRequest): DefaultSuccess = 5;
7289+
/** This command SHALL deallocate a video stream on the camera, corresponding to the given video stream identifier. */
7290+
command access(invoke: manage) VideoStreamDeallocate(VideoStreamDeallocateRequest): DefaultSuccess = 6;
7291+
/** This command SHALL allocate a snapshot stream on the device and return an allocated snapshot stream identifier. */
7292+
command access(invoke: manage) SnapshotStreamAllocate(SnapshotStreamAllocateRequest): SnapshotStreamAllocateResponse = 7;
7293+
/** This command SHALL be used to modify a stream specified by the VideoStreamID. */
7294+
command access(invoke: manage) SnapshotStreamModify(SnapshotStreamModifyRequest): DefaultSuccess = 9;
7295+
/** This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. */
7296+
command access(invoke: manage) SnapshotStreamDeallocate(SnapshotStreamDeallocateRequest): DefaultSuccess = 10;
7297+
/** This command SHALL set the relative priorities of the various stream usages on the camera. */
7298+
command access(invoke: administer) SetStreamPriorities(SetStreamPrioritiesRequest): DefaultSuccess = 11;
7299+
/** This command SHALL return a Snapshot from the camera. */
7300+
command CaptureSnapshot(CaptureSnapshotRequest): CaptureSnapshotResponse = 12;
7301+
}
7302+
70187303
/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
70197304
provisional cluster Chime = 1366 {
70207305
revision 1;
@@ -9314,6 +9599,28 @@ endpoint 1 {
93149599
handle command Sleep;
93159600
}
93169601

9602+
server cluster CameraAvStreamManagement {
9603+
callback attribute maxContentBufferSize;
9604+
callback attribute supportedSnapshotParams;
9605+
callback attribute maxNetworkBandwidth;
9606+
callback attribute supportedStreamUsages;
9607+
callback attribute allocatedSnapshotStreams;
9608+
callback attribute nightVision;
9609+
callback attribute nightVisionIllum;
9610+
callback attribute generatedCommandList;
9611+
callback attribute acceptedCommandList;
9612+
callback attribute attributeList;
9613+
callback attribute featureMap;
9614+
ram attribute clusterRevision default = 1;
9615+
9616+
handle command SnapshotStreamAllocate;
9617+
handle command SnapshotStreamAllocateResponse;
9618+
handle command SnapshotStreamDeallocate;
9619+
handle command SetStreamPriorities;
9620+
handle command CaptureSnapshot;
9621+
handle command CaptureSnapshotResponse;
9622+
}
9623+
93179624
server cluster Chime {
93189625
callback attribute installedChimeSounds;
93199626
callback attribute selectedChime;

0 commit comments

Comments
 (0)