add option to record to PNGs (inc background threadpool for encoding)
This commit is contained in:
@@ -492,4 +492,10 @@ abstract class FilamentController {
|
||||
///
|
||||
Future<FilamentEntity> getChildEntity(
|
||||
FilamentEntity parent, String childName);
|
||||
|
||||
///
|
||||
/// If [recording] is set to true, each frame the framebuffer/texture will be written to /tmp/output_*.png.
|
||||
/// This will impact performance; handle with care.
|
||||
///
|
||||
Future setRecording(bool recording);
|
||||
}
|
||||
|
||||
@@ -1207,4 +1207,9 @@ class FilamentControllerFFI extends FilamentController {
|
||||
calloc.free(childNamePtr);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future setRecording(bool recording) async {
|
||||
set_recording(_viewer!, recording);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -746,6 +746,13 @@ external int find_child_entity_by_name(
|
||||
ffi.Pointer<ffi.Char> name,
|
||||
);
|
||||
|
||||
@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>(
|
||||
symbol: 'set_recording', assetId: 'flutter_filament_plugin')
|
||||
external void set_recording(
|
||||
ffi.Pointer<ffi.Void> viewer,
|
||||
bool recording,
|
||||
);
|
||||
|
||||
@ffi.Native<ffi.Void Function()>(
|
||||
symbol: 'ios_dummy', assetId: 'flutter_filament_plugin')
|
||||
external void ios_dummy();
|
||||
|
||||
Reference in New Issue
Block a user