Skip to content

Commit 8ab4499

Browse files
committed
Merge remote-tracking branch 'remotes/upstream/main' into feature/expose-payment-request-enabled
2 parents 5575248 + 5866014 commit 8ab4499

File tree

65 files changed

+3832
-1776
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3832
-1776
lines changed

.ci/flutter_master.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
92a6bfbfd6ef6f76c945cbd4facaa138f25c123f
1+
f4334d27934b2ec5ddbbcdb16c15ba4acd5f6c49

.gemini/styleguide.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ auto-formatter, for each language, as described in
2121
- PR descriptions should include the Pre-Review Checklist from
2222
[the PR template](https://github.com/flutter/packages/blob/main/.github/PULL_REQUEST_TEMPLATE.md),
2323
with all of the steps completed.
24+
25+
## Review Agent Guidelines
26+
27+
When providing a summary, the review agent must adhere to the following principles:
28+
- **Be Objective:** Focus on a neutral, descriptive summary of the changes. Avoid subjective value judgments
29+
like "good," "bad," "positive," or "negative." The goal is to report what the code does, not to evaluate it.
30+
- **Use Code as the Source of Truth:** Base all summaries on the code diff. Do not trust or rephrase the PR
31+
description, which may be outdated or inaccurate. A summary must reflect the actual changes in the code.
32+
- **Be Concise:** Generate summaries that are brief and to the point. Focus on the most significant changes,
33+
and avoid unnecessary details or verbose explanations. This ensures the feedback is easy to scan and understand.

packages/camera/camera_avfoundation/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 0.9.21+1
2+
3+
* Migrates `startImageStream` and `setUpCaptureSessionForAudioIfNeeded` methods to Swift.
4+
* Removes Objective-C implementation of `reportErrorMessage` method.
5+
6+
## 0.9.21
7+
8+
* Fixes crash when streaming is enabled during recording.
9+
110
## 0.9.20+7
211

312
* Updates kotlin version to 2.2.0 to enable gradle 8.11 support.

packages/camera/camera_avfoundation/example/ios/RunnerTests/StreamingTests.swift

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ final class StreamingTests: XCTestCase {
3636
DefaultCamera,
3737
AVCaptureOutput,
3838
CMSampleBuffer,
39+
CMSampleBuffer,
3940
AVCaptureConnection
4041
) {
4142
let captureSessionQueue = DispatchQueue(label: "testing")
@@ -45,13 +46,14 @@ final class StreamingTests: XCTestCase {
4546
let camera = CameraTestUtils.createTestCamera(configuration)
4647
let testAudioOutput = CameraTestUtils.createTestAudioOutput()
4748
let sampleBuffer = CameraTestUtils.createTestSampleBuffer()
49+
let audioSampleBuffer = CameraTestUtils.createTestAudioSampleBuffer()
4850
let testAudioConnection = CameraTestUtils.createTestConnection(testAudioOutput)
4951

50-
return (camera, testAudioOutput, sampleBuffer, testAudioConnection)
52+
return (camera, testAudioOutput, sampleBuffer, audioSampleBuffer, testAudioConnection)
5153
}
5254

5355
func testExceedMaxStreamingPendingFramesCount() {
54-
let (camera, testAudioOutput, sampleBuffer, testAudioConnection) = createCamera()
56+
let (camera, testAudioOutput, sampleBuffer, _, testAudioConnection) = createCamera()
5557
let handlerMock = MockImageStreamHandler()
5658

5759
let finishStartStreamExpectation = expectation(
@@ -87,7 +89,7 @@ final class StreamingTests: XCTestCase {
8789
}
8890

8991
func testReceivedImageStreamData() {
90-
let (camera, testAudioOutput, sampleBuffer, testAudioConnection) = createCamera()
92+
let (camera, testAudioOutput, sampleBuffer, _, testAudioConnection) = createCamera()
9193
let handlerMock = MockImageStreamHandler()
9294

9395
let finishStartStreamExpectation = expectation(
@@ -124,8 +126,34 @@ final class StreamingTests: XCTestCase {
124126
waitForExpectations(timeout: 30, handler: nil)
125127
}
126128

129+
func testIgnoresNonImageBuffers() {
130+
let (camera, testAudioOutput, _, audioSampleBuffer, testAudioConnection) = createCamera()
131+
let handlerMock = MockImageStreamHandler()
132+
handlerMock.eventSinkStub = { event in
133+
XCTFail()
134+
}
135+
136+
let finishStartStreamExpectation = expectation(
137+
description: "Finish startStream")
138+
139+
let messenger = MockFlutterBinaryMessenger()
140+
camera.startImageStream(
141+
with: messenger, imageStreamHandler: handlerMock,
142+
completion: {
143+
_ in
144+
finishStartStreamExpectation.fulfill()
145+
})
146+
147+
waitForExpectations(timeout: 30, handler: nil)
148+
XCTAssertEqual(camera.isStreamingImages, true)
149+
150+
camera.captureOutput(testAudioOutput, didOutput: audioSampleBuffer, from: testAudioConnection)
151+
152+
waitForQueueRoundTrip(with: DispatchQueue.main)
153+
}
154+
127155
func testImageStreamEventFormat() {
128-
let (camera, testAudioOutput, sampleBuffer, testAudioConnection) = createCamera()
156+
let (camera, testAudioOutput, sampleBuffer, _, testAudioConnection) = createCamera()
129157

130158
let expectation = expectation(description: "Received a valid event")
131159

0 commit comments

Comments
 (0)