Skip to content

Commit 2017841

Browse files
Remove debug logging, update documentation
1 parent 7eb0057 commit 2017841

18 files changed

Lines changed: 27 additions & 115 deletions

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
shell: bash
8686
run: |
8787
grep -q '/utf-8' windows/CMakeLists.txt \
88-
|| { echo "::error::windows/CMakeLists.txt is missing /utf-8 — see chinese-pc-compat.md"; exit 1; }
88+
|| { echo "::error::windows/CMakeLists.txt is missing /utf-8"; exit 1; }
8989
9090
- name: Verify ci/cp936_repro.cpp covers every non-ASCII char in windows/
9191
shell: bash
@@ -108,25 +108,25 @@ jobs:
108108
set CL_EXIT=%errorlevel%
109109
type cl.log
110110
if %CL_EXIT% equ 0 (
111-
echo ::error::Expected C4819/C2220 but compile succeeded CP936 simulation is not triggering the bug
111+
echo ::error::Expected C4819/C2220 but compile succeeded, CP936 simulation is not triggering the bug
112112
exit /b 1
113113
)
114114
findstr /c:"C4819" cl.log >nul
115115
if errorlevel 1 (
116-
echo ::error::cl.exe failed but did not emit C4819 test is not reproducing the real bug
116+
echo ::error::cl.exe failed but did not emit C4819, test is not reproducing the real bug
117117
exit /b 1
118118
)
119119
findstr /c:"C2220" cl.log >nul
120120
if errorlevel 1 (
121-
echo ::error::cl.exe failed but did not emit C2220 /WX promotion is not working as expected
121+
echo ::error::cl.exe failed but did not emit C2220, /WX promotion is not working as expected
122122
exit /b 1
123123
)
124124
echo OK: CP936 simulation reproduced C4819/C2220 as expected
125125
exit /b 0
126126
127127
# Note: MSVC refuses `/source-charset:.936` together with `/utf-8`
128128
# (error D8016: options are incompatible). On a real Chinese Windows
129-
# host, CP936 is NOT a flag it's an implicit default from GetACP().
129+
# host, CP936 is NOT a flag; it's an implicit default from GetACP().
130130
# `/utf-8` overrides that implicit default. We prove the fix in two
131131
# independent invocations: the previous step shows CP936 is hostile
132132
# to our bytes; this step shows `/utf-8` makes MSVC read them as UTF-8
@@ -151,7 +151,7 @@ jobs:
151151
fi
152152
echo "Inspecting: $vcxproj"
153153
if ! grep -q '/utf-8' "$vcxproj"; then
154-
echo "::error::/utf-8 missing from $vcxproj CMake did not thread the flag through"
154+
echo "::error::/utf-8 missing from $vcxproj, CMake did not thread the flag through"
155155
echo "--- vcxproj contents ---"
156156
cat "$vcxproj"
157157
exit 1

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.1.4
2+
3+
* Update documentation
4+
* Remove debug logging from image stream pause/resume and video recording completion
5+
16
## 1.1.3
27

38
* Fix Windows build failure (C4819 / C2220) on hosts with a non-UTF-8 system code page (e.g. CP936 on Simplified Chinese Windows) by compiling the plugin with `/utf-8` under MSVC (#2)
@@ -19,7 +24,7 @@
1924
* Request camera access via `org.freedesktop.portal.Camera` D-Bus interface
2025
* Enumerate PipeWire camera nodes via `GstDeviceMonitor`
2126
* Fall back to V4L2 if portal is unavailable or user denies permission
22-
* No new build dependencies uses GIO (D-Bus) and GStreamer APIs already linked
27+
* No new build dependencies: uses GIO (D-Bus) and GStreamer APIs already linked
2328

2429
## 1.0.8
2530

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Add `camera_desktop` alongside `camera` in your `pubspec.yaml`:
3030
```yaml
3131
dependencies:
3232
camera: ^0.11.0
33-
camera_desktop: ^1.1.2
33+
camera_desktop: ^1.1.4
3434
```
3535
3636
That's it. All three desktop platforms are covered, no additional packages needed.

ci/check_unicode_inventory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def main() -> int:
3434
+ list(pathlib.Path("windows").glob("*.h"))
3535
)
3636
if not windows_sources:
37-
print("::error::No windows/*.cpp|*.h files found run from repo root.")
37+
print("::error::No windows/*.cpp|*.h files found, run from repo root.")
3838
return 1
3939

4040
real: set[str] = set()

ci/cp936_repro.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
// U+2264 LESS-THAN OR EQUAL TO ≤
2222
// U+2500 BOX DRAWINGS LIGHT HORIZONTAL ─
2323
//
24-
// No code needed /c (compile only) is sufficient to trigger C4819 on the
24+
// No code needed: /c (compile only) is sufficient to trigger C4819 on the
2525
// comment bytes above.

example/pubspec.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ packages:
6363
path: ".."
6464
relative: true
6565
source: path
66-
version: "1.1.3"
66+
version: "1.1.4"
6767
camera_platform_interface:
6868
dependency: "direct main"
6969
description:
@@ -266,10 +266,10 @@ packages:
266266
dependency: transitive
267267
description:
268268
name: matcher
269-
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
269+
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
270270
url: "https://pub.dev"
271271
source: hosted
272-
version: "0.12.18"
272+
version: "0.12.19"
273273
material_color_utilities:
274274
dependency: transitive
275275
description:
@@ -471,10 +471,10 @@ packages:
471471
dependency: transitive
472472
description:
473473
name: test_api
474-
sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636"
474+
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
475475
url: "https://pub.dev"
476476
source: hosted
477-
version: "0.7.9"
477+
version: "0.7.10"
478478
typed_data:
479479
dependency: transitive
480480
description:

ios/camera_desktop.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'camera_desktop'
3-
s.version = '1.1.2'
3+
s.version = '1.1.4'
44
s.summary = 'Flutter camera plugin (iOS stub).'
55
s.description = <<-DESC
66
Flutter camera plugin for desktop platforms. iOS stub for platform declaration.

lib/src/camera_desktop_plugin.dart

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,8 @@ class CameraDesktopPlugin extends CameraPlatform {
428428
// Native has stopped, safe to release FFI resources.
429429
ffi?.dispose();
430430
},
431-
onPause: () {
432-
debugPrint(
433-
'[camera_desktop] Warning: pausing image stream '
434-
'subscription has no effect, native frames continue flowing.',
435-
);
436-
},
437-
onResume: () {
438-
debugPrint('[camera_desktop] Image stream subscription resumed.');
439-
},
431+
onPause: () {},
432+
onResume: () {},
440433
);
441434

442435
return controller.stream;
@@ -503,25 +496,6 @@ class CameraDesktopPlugin extends CameraPlatform {
503496
'Native stopVideoRecording returned no output path.',
504497
);
505498
}
506-
final width = map['width'] as int?;
507-
final height = map['height'] as int?;
508-
final fps = map['fps'] as int?;
509-
final bitrate = map['bitrate'] as int?;
510-
final container = map['container'] as String?;
511-
final videoCodec = map['videoCodec'] as String?;
512-
final audioCodec = map['audioCodec'] as String?;
513-
if (width != null && height != null && fps != null && bitrate != null) {
514-
debugPrint(
515-
'[camera_desktop] Video recorded: ${width}x$height @ ${fps}fps, '
516-
'bitrate=${bitrate}bps, path=$path',
517-
);
518-
}
519-
if (container != null || videoCodec != null || audioCodec != null) {
520-
debugPrint(
521-
'[camera_desktop] Format: container=$container, '
522-
'video=$videoCodec, audio=$audioCodec',
523-
);
524-
}
525499
return XFile(path);
526500
} on PlatformException catch (e) {
527501
throw CameraException(e.code, e.message);

linux/camera.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ void Camera::TakePicture(FlMethodCall* method_call) {
500500
capture_seq.fetch_add(1, std::memory_order_relaxed));
501501

502502
// C-7: gst_video_convert_sample performs synchronous JPEG encoding which
503-
// can take 30200 ms at 1080p. Offload to a GLib thread-pool task so the
503+
// can take 30-200 ms at 1080p. Offload to a GLib thread-pool task so the
504504
// main/UI thread is never blocked.
505505
//
506506
// Take a GStreamer reference to appsink_ so it stays alive for the duration

linux/pipewire_portal.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void PipeWirePortal::OnPortalResponse(GDBusConnection* connection,
182182
gpointer user_data) {
183183
auto* self = static_cast<PipeWirePortal*>(user_data);
184184

185-
// Unsubscribe immediately one-shot signal.
185+
// Unsubscribe immediately (one-shot signal).
186186
if (self->signal_subscription_id_ > 0) {
187187
g_dbus_connection_signal_unsubscribe(connection,
188188
self->signal_subscription_id_);

0 commit comments

Comments
 (0)