Skip to content

Commit

Permalink
added raw video stream
Browse files Browse the repository at this point in the history
  • Loading branch information
krjw-eyev committed May 23, 2024
1 parent 0c80a9f commit cfe1aa5
Show file tree
Hide file tree
Showing 8 changed files with 1,006 additions and 807 deletions.
1 change: 1 addition & 0 deletions lib/src/data/repositories/positioning_repository_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class PositioningRepositoryImpl extends PositioningRepository {
var previousPositioningMessage = const PositioningMessage();
await for (final grpc.PositioningMessage event in _stream!) {
final grpc.PositioningMessage positioningMessage = grpc.PositioningMessage()..mergeFromJson(event.writeToJson());
// final grpc.PositioningMessage positioningMessage = grpc.PositioningMessage()..mergeFromProto3Json(event.writeToJson());
if (positioningMessage.hasLeftEye() || positioningMessage.hasRightEye()) {
var message = PositioningMessage.fromPositioningMessage(positioningMessage);
if (message.eyes.left.isZero() && !previousPositioningMessage.eyes.left.isZero()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:grpc/grpc_or_grpcweb.dart';
import '../../core/data_state.dart';
import '../../core/exceptions.dart';
import '../../domain/repositories/raw_video_stream_repository.dart';

import '../../generated/Skyle.pbgrpc.dart' as grpc;
import '../../generated/google/protobuf/empty.pb.dart';
import '../models/raw_image.dart';
Expand Down
12 changes: 12 additions & 0 deletions lib/src/et.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import 'package:logger/logger.dart';
import 'connectivity/connectivityprovider.dart';
import 'core/data_state.dart';
import 'core/exceptions.dart';
import 'data/models/size.dart';
import 'data/repositories/calibration_repository_impl.dart';
import 'data/repositories/gaze_repository_impl.dart';
import 'data/repositories/positioning_repository_impl.dart';
import 'data/repositories/profiles_repository_imp.dart';
import 'data/repositories/raw_video_stream_repository_impl.dart';
import 'data/repositories/reset_repository_impl.dart';
import 'data/repositories/settings_repository_impl.dart';
import 'data/repositories/switch_repository_impl.dart';
Expand All @@ -26,6 +28,7 @@ import 'domain/repositories/calibration_repository.dart';
import 'domain/repositories/gaze_repository.dart';
import 'domain/repositories/positioning_repository.dart';
import 'domain/repositories/profiles_repository.dart';
import 'domain/repositories/raw_video_stream_repository.dart';
import 'domain/repositories/reset_repository.dart';
import 'domain/repositories/settings_repository.dart';
import 'domain/repositories/switch_repository.dart';
Expand Down Expand Up @@ -60,6 +63,14 @@ class ET {
final VideoStreamRepository stream = VideoStreamRepositoryImpl();
ProfilesRepository profiles = ProfilesRepositoryImpl();
TriggerRepository trigger = TriggerRepositoryImpl();
RawVideoStreamRepository video = RawVideoStreamRepositoryImpl();

Size resolution(int generation) {
if (generation == 2) {
return const Size(width: 1280, height: 800);
}
return const Size(width: 2472, height: 2048);
}

Connection _connection = Connection.disconnected;
Connection get connection => _connection;
Expand Down Expand Up @@ -200,6 +211,7 @@ class ET {
switchSettings = SwitchRepositoryImpl(client: client);
profiles = ProfilesRepositoryImpl(client: client);
trigger = TriggerRepositoryImpl(client: client);
video = RawVideoStreamRepositoryImpl(client: client);
}

/// Disposes the instance of [ET] completely.
Expand Down
900 changes: 513 additions & 387 deletions lib/src/generated/Skyle.pb.dart

Large diffs are not rendered by default.

52 changes: 29 additions & 23 deletions lib/src/generated/Skyle.pbenum.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
///
//
// Generated code. Do not modify.
// source: Skyle.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name

// ignore_for_file: UNDEFINED_SHOWN_NAME
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

import 'dart:core' as $core;

import 'package:protobuf/protobuf.dart' as $pb;

class Profile_Skill extends $pb.ProtobufEnum {
static const Profile_Skill Low = Profile_Skill._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Low');
static const Profile_Skill Medium = Profile_Skill._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Medium');
static const Profile_Skill High = Profile_Skill._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'High');
static const Profile_Skill Low = Profile_Skill._(0, _omitEnumNames ? '' : 'Low');
static const Profile_Skill Medium = Profile_Skill._(1, _omitEnumNames ? '' : 'Medium');
static const Profile_Skill High = Profile_Skill._(2, _omitEnumNames ? '' : 'High');

static const $core.List<Profile_Skill> values = <Profile_Skill> [
Low,
Expand All @@ -27,9 +31,9 @@ class Profile_Skill extends $pb.ProtobufEnum {
}

class Options_eyeUse extends $pb.ProtobufEnum {
static const Options_eyeUse Both = Options_eyeUse._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Both');
static const Options_eyeUse Left = Options_eyeUse._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Left');
static const Options_eyeUse Right = Options_eyeUse._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Right');
static const Options_eyeUse Both = Options_eyeUse._(0, _omitEnumNames ? '' : 'Both');
static const Options_eyeUse Left = Options_eyeUse._(1, _omitEnumNames ? '' : 'Left');
static const Options_eyeUse Right = Options_eyeUse._(2, _omitEnumNames ? '' : 'Right');

static const $core.List<Options_eyeUse> values = <Options_eyeUse> [
Both,
Expand All @@ -44,20 +48,20 @@ class Options_eyeUse extends $pb.ProtobufEnum {
}

class IPadOptions_iPadModel extends $pb.ProtobufEnum {
static const IPadOptions_iPadModel IPad8_5 = IPadOptions_iPadModel._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad8_5');
static const IPadOptions_iPadModel IPad8_6 = IPadOptions_iPadModel._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad8_6');
static const IPadOptions_iPadModel IPad8_7 = IPadOptions_iPadModel._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad8_7');
static const IPadOptions_iPadModel IPad8_8 = IPadOptions_iPadModel._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad8_8');
static const IPadOptions_iPadModel IPad8_11 = IPadOptions_iPadModel._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad8_11');
static const IPadOptions_iPadModel IPad8_12 = IPadOptions_iPadModel._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad8_12');
static const IPadOptions_iPadModel IPad13_1 = IPadOptions_iPadModel._(6, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad13_1');
static const IPadOptions_iPadModel IPad13_2 = IPadOptions_iPadModel._(7, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad13_2');
static const IPadOptions_iPadModel IPad13_8 = IPadOptions_iPadModel._(8, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad13_8');
static const IPadOptions_iPadModel IPad13_9 = IPadOptions_iPadModel._(9, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad13_9');
static const IPadOptions_iPadModel IPad13_10 = IPadOptions_iPadModel._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad13_10');
static const IPadOptions_iPadModel IPad13_11 = IPadOptions_iPadModel._(11, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad13_11');
static const IPadOptions_iPadModel IPad13_16 = IPadOptions_iPadModel._(12, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad13_16');
static const IPadOptions_iPadModel IPad13_17 = IPadOptions_iPadModel._(13, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'IPad13_17');
static const IPadOptions_iPadModel IPad8_5 = IPadOptions_iPadModel._(0, _omitEnumNames ? '' : 'IPad8_5');
static const IPadOptions_iPadModel IPad8_6 = IPadOptions_iPadModel._(1, _omitEnumNames ? '' : 'IPad8_6');
static const IPadOptions_iPadModel IPad8_7 = IPadOptions_iPadModel._(2, _omitEnumNames ? '' : 'IPad8_7');
static const IPadOptions_iPadModel IPad8_8 = IPadOptions_iPadModel._(3, _omitEnumNames ? '' : 'IPad8_8');
static const IPadOptions_iPadModel IPad8_11 = IPadOptions_iPadModel._(4, _omitEnumNames ? '' : 'IPad8_11');
static const IPadOptions_iPadModel IPad8_12 = IPadOptions_iPadModel._(5, _omitEnumNames ? '' : 'IPad8_12');
static const IPadOptions_iPadModel IPad13_1 = IPadOptions_iPadModel._(6, _omitEnumNames ? '' : 'IPad13_1');
static const IPadOptions_iPadModel IPad13_2 = IPadOptions_iPadModel._(7, _omitEnumNames ? '' : 'IPad13_2');
static const IPadOptions_iPadModel IPad13_8 = IPadOptions_iPadModel._(8, _omitEnumNames ? '' : 'IPad13_8');
static const IPadOptions_iPadModel IPad13_9 = IPadOptions_iPadModel._(9, _omitEnumNames ? '' : 'IPad13_9');
static const IPadOptions_iPadModel IPad13_10 = IPadOptions_iPadModel._(10, _omitEnumNames ? '' : 'IPad13_10');
static const IPadOptions_iPadModel IPad13_11 = IPadOptions_iPadModel._(11, _omitEnumNames ? '' : 'IPad13_11');
static const IPadOptions_iPadModel IPad13_16 = IPadOptions_iPadModel._(12, _omitEnumNames ? '' : 'IPad13_16');
static const IPadOptions_iPadModel IPad13_17 = IPadOptions_iPadModel._(13, _omitEnumNames ? '' : 'IPad13_17');

static const $core.List<IPadOptions_iPadModel> values = <IPadOptions_iPadModel> [
IPad8_5,
Expand All @@ -82,3 +86,5 @@ class IPadOptions_iPadModel extends $pb.ProtobufEnum {
const IPadOptions_iPadModel._($core.int v, $core.String n) : super(v, n);
}


const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
Loading

0 comments on commit cfe1aa5

Please sign in to comment.