preview test for SC2

  Flutter App

RICOH THETA SC2 Live Preview Tester

For V/Z1, see my other project using dio as the HTTP library.

Save Frames to Disk for Inspection

frame test

Use Within Flutter

flutter test

Usage

  1. create a stream (for Flutter, it is easier to use StreamController
  2. pass stream to library
  3. specify number of frames to capture
  4. listen to stream and either write frames to disk or display to screen

Example

Code example with Flutter

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    StreamController controller = StreamController();
    sc2GetLivePreview(controller, frames: 300);
    return Scaffold(
// your ui
//
Expanded(
    flex: 8,
    child: StreamBuilder(
        stream: controller.stream,
        builder: (BuildContext context, AsyncSnapshot snapshot) {
        if (snapshot.hasData) {
            var imageData = Uint8List.fromList(snapshot.data);
            return Image.memory(
            imageData,
            gaplessPlayback: true,
            );
        } else {
            return Container();
        }
        }),
),

Source code on GitHub

preview test for SC2
https://github.com/codetricity/sc2_preview
0 forks.
0 stars.
0 open issues.

Recent commits: