Skip to content

Commit 0a28320

Browse files
feat: add missing 708 stuff
1 parent 1657c5e commit 0a28320

File tree

3 files changed

+126
-98
lines changed

3 files changed

+126
-98
lines changed

lib/models/settings_model.dart

Lines changed: 107 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class SettingsModel {
66
String outputfilename;
77
bool fixptsjumps;
88
bool append;
9+
String service;
910

1011
// output file segmentation
1112
String outInterval;
@@ -127,6 +128,7 @@ class SettingsModel {
127128
this.outputfilename = '',
128129
this.fixptsjumps = false,
129130
this.append = false,
131+
this.service = '',
130132
this.outInterval = '',
131133
this.segmentonkeyonly = false,
132134
this.goptime = false,
@@ -226,6 +228,7 @@ class SettingsModel {
226228
'outputfilename': '-o',
227229
'fixptsjumps': '-fixptsjumps',
228230
'append': '--append',
231+
'service': '--service',
229232
'outInterval': '--outinterval',
230233
'segmentonkeyonly': '--segmentonkeyonly',
231234
'goptime': '--goptime',
@@ -343,108 +346,111 @@ class SettingsModel {
343346
return enabledtextfields;
344347
}
345348

346-
SettingsModel copyWith(
347-
{String? out,
348-
String? inp,
349-
String? outputfilename,
350-
bool? fixptsjumps,
351-
bool? append,
352-
String? outInterval,
353-
bool? segmentonkeyonly,
354-
bool? goptime,
355-
bool? nogoptime,
356-
bool? fixpadding,
357-
bool? freqEs15,
358-
String? stream,
359-
bool? videoedited,
360-
bool? usepicorder,
361-
bool? myth,
362-
bool? nomyth,
363-
bool? wtvconvertfix,
364-
bool? wtvmpeg2,
365-
String? program_number,
366-
bool? autoprogram,
367-
bool? multiprogram,
368-
String? streamtype,
369-
bool? hauppauge,
370-
bool? mp4vidtrack,
371-
bool? noautotimeref,
372-
bool? noscte20,
373-
bool? webvttcss,
374-
bool? analyzevideo,
375-
bool? notimestamp,
376-
bool? nolevdist,
377-
String? minlevdist,
378-
String? maxlevdist,
379-
bool? chapters,
380-
bool? bom,
381-
bool? nobom,
382-
String? encoder,
383-
bool? nofontcolor,
384-
bool? nohtmlescape,
385-
bool? notypesetting,
386-
bool? trim,
387-
String? defaultcolor,
388-
bool? sentencecap,
389-
String? capFile,
390-
bool? kf,
391-
String? profanityFile,
392-
bool? splitbysentence,
393-
bool? datets,
394-
bool? sects,
395-
bool? latrusmap,
396-
bool? xds,
397-
bool? lf,
398-
bool? df,
399-
bool? autodash,
400-
String? xmltv,
401-
String? xmltvliveinterval,
402-
String? xmltvoutputinterval,
403-
bool? xmltvonlycurrent,
404-
bool? sem,
405-
String? dvblang,
406-
String? mkvlang,
407-
String? ocrlang,
408-
String? quant,
409-
String? oem,
410-
bool? bufferinput,
411-
bool? nobufferinput,
412-
String? buffersize,
413-
bool? koc,
414-
bool? dru,
415-
bool? norollup,
416-
String? rollUp,
417-
String? delay,
418-
String? startat,
419-
String? endat,
420-
String? codec,
421-
String? nocodec,
422-
String? startcreditstext,
423-
String? startcreditsnotbefore,
424-
String? startcreditsnotafter,
425-
String? startcreditsforatleast,
426-
String? startcreditsforatmost,
427-
String? endcreditstext,
428-
String? endcreditsforatleast,
429-
String? endcreditsforatmost,
430-
String? tpage,
431-
bool? teletext,
432-
bool? noteletext,
433-
bool? hardsubx,
434-
bool? tickertext,
435-
String? ocrMode,
436-
String? subcolor,
437-
String? minSubDuration,
438-
bool? detectItalics,
439-
String? confThresh,
440-
String? whiteThresh,
441-
bool? splitMode}) {
349+
SettingsModel copyWith({
350+
String? out,
351+
String? inp,
352+
String? outputfilename,
353+
bool? fixptsjumps,
354+
bool? append,
355+
String? service,
356+
String? outInterval,
357+
bool? segmentonkeyonly,
358+
bool? goptime,
359+
bool? nogoptime,
360+
bool? fixpadding,
361+
bool? freqEs15,
362+
String? stream,
363+
bool? videoedited,
364+
bool? usepicorder,
365+
bool? myth,
366+
bool? nomyth,
367+
bool? wtvconvertfix,
368+
bool? wtvmpeg2,
369+
String? program_number,
370+
bool? autoprogram,
371+
bool? multiprogram,
372+
String? streamtype,
373+
bool? hauppauge,
374+
bool? mp4vidtrack,
375+
bool? noautotimeref,
376+
bool? noscte20,
377+
bool? webvttcss,
378+
bool? analyzevideo,
379+
bool? notimestamp,
380+
bool? nolevdist,
381+
String? minlevdist,
382+
String? maxlevdist,
383+
bool? chapters,
384+
bool? bom,
385+
bool? nobom,
386+
String? encoder,
387+
bool? nofontcolor,
388+
bool? nohtmlescape,
389+
bool? notypesetting,
390+
bool? trim,
391+
String? defaultcolor,
392+
bool? sentencecap,
393+
String? capFile,
394+
bool? kf,
395+
String? profanityFile,
396+
bool? splitbysentence,
397+
bool? datets,
398+
bool? sects,
399+
bool? latrusmap,
400+
bool? xds,
401+
bool? lf,
402+
bool? df,
403+
bool? autodash,
404+
String? xmltv,
405+
String? xmltvliveinterval,
406+
String? xmltvoutputinterval,
407+
bool? xmltvonlycurrent,
408+
bool? sem,
409+
String? dvblang,
410+
String? mkvlang,
411+
String? ocrlang,
412+
String? quant,
413+
String? oem,
414+
bool? bufferinput,
415+
bool? nobufferinput,
416+
String? buffersize,
417+
bool? koc,
418+
bool? dru,
419+
bool? norollup,
420+
String? rollUp,
421+
String? delay,
422+
String? startat,
423+
String? endat,
424+
String? codec,
425+
String? nocodec,
426+
String? startcreditstext,
427+
String? startcreditsnotbefore,
428+
String? startcreditsnotafter,
429+
String? startcreditsforatleast,
430+
String? startcreditsforatmost,
431+
String? endcreditstext,
432+
String? endcreditsforatleast,
433+
String? endcreditsforatmost,
434+
String? tpage,
435+
bool? teletext,
436+
bool? noteletext,
437+
bool? hardsubx,
438+
bool? tickertext,
439+
String? ocrMode,
440+
String? subcolor,
441+
String? minSubDuration,
442+
bool? detectItalics,
443+
String? confThresh,
444+
String? whiteThresh,
445+
bool? splitMode,
446+
}) {
442447
return SettingsModel(
443448
out: out ?? this.out,
444449
inp: inp ?? this.inp,
445450
outputfilename: outputfilename ?? this.outputfilename,
446451
fixptsjumps: fixptsjumps ?? this.fixptsjumps,
447452
append: append ?? this.append,
453+
service: service ?? this.service,
448454
outInterval: outInterval ?? this.outInterval,
449455
segmentonkeyonly: segmentonkeyonly ?? this.segmentonkeyonly,
450456
goptime: goptime ?? this.goptime,
@@ -548,6 +554,7 @@ class SettingsModel {
548554
'outputfilename': outputfilename,
549555
'fixptsjumps': fixptsjumps,
550556
'append': append,
557+
'service': service,
551558
'outInterval': outInterval,
552559
'segmentonkeyonly': segmentonkeyonly,
553560
'goptime': goptime,
@@ -648,6 +655,7 @@ class SettingsModel {
648655
outputfilename: map['outputfilename'],
649656
fixptsjumps: map['fixptsjumps'],
650657
append: map['append'],
658+
service: map['service'],
651659
outInterval: map['outInterval'],
652660
segmentonkeyonly: map['segmentonkeyonly'],
653661
goptime: map['goptime'],
@@ -743,7 +751,7 @@ class SettingsModel {
743751

744752
@override
745753
String toString() {
746-
return 'SettingsModel(out: $out, inp: $inp, outputfilename: $outputfilename, fixptsjumps: $fixptsjumps, append: $append, outInterval: $outInterval, segmentonkeyonly: $segmentonkeyonly, goptime: $goptime, nogoptime: $nogoptime, fixpadding: $fixpadding, freqEs15: $freqEs15, stream: $stream, videoedited: $videoedited, usepicorder: $usepicorder, myth: $myth, nomyth: $nomyth, wtvconvertfix: $wtvconvertfix, wtvmpeg2: $wtvmpeg2, program_number: $program_number, autoprogram: $autoprogram, multiprogram: $multiprogram, streamtype: $streamtype, hauppauge: $hauppauge, mp4vidtrack: $mp4vidtrack, noautotimeref: $noautotimeref, noscte20: $noscte20, webvttcss: $webvttcss, analyzevideo: $analyzevideo, notimestamp: $notimestamp, nolevdist: $nolevdist, minlevdist: $minlevdist, maxlevdist: $maxlevdist, chapters: $chapters, bom: $bom, nobom: $nobom, encoder: $encoder, nofontcolor: $nofontcolor, nohtmlescape: $nohtmlescape, notypesetting: $notypesetting, trim: $trim, defaultcolor: $defaultcolor, sentencecap: $sentencecap, capFile: $capFile, kf: $kf, profanityFile: $profanityFile, splitbysentence: $splitbysentence, datets: $datets, sects: $sects, latrusmap: $latrusmap, xds: $xds, lf: $lf, df: $df, autodash: $autodash, xmltv: $xmltv, xmltvliveinterval: $xmltvliveinterval, xmltvoutputinterval: $xmltvoutputinterval, xmltvonlycurrent: $xmltvonlycurrent, sem: $sem, dvblang: $dvblang, mkvlang: $mkvlang, ocrlang: $ocrlang, quant: $quant, oem: $oem, bufferinput: $bufferinput, nobufferinput: $nobufferinput, buffersize: $buffersize, koc: $koc, dru: $dru, norollup: $norollup, rollUp: $rollUp, delay: $delay, startat: $startat, endat: $endat, codec: $codec, nocodec: $nocodec, startcreditstext: $startcreditstext, startcreditsnotbefore: $startcreditsnotbefore, startcreditsnotafter: $startcreditsnotafter, startcreditsforatleast: $startcreditsforatleast, startcreditsforatmost: $startcreditsforatmost, endcreditstext: $endcreditstext, endcreditsforatleast: $endcreditsforatleast, endcreditsforatmost: $endcreditsforatmost, tpage: $tpage, teletext: $teletext, noteletext: $noteletext, hardsubx: $hardsubx, tickertext: $tickertext, ocrMode: $ocrMode, subcolor: $subcolor, minSubDuration: $minSubDuration, detectItalics: $detectItalics, confThresh: $confThresh, whiteThresh: $whiteThresh, splitMode: $splitMode,)';
754+
return 'SettingsModel(out: $out, inp: $inp, outputfilename: $outputfilename, fixptsjumps: $fixptsjumps, append: $append, service: $service, outInterval: $outInterval, segmentonkeyonly: $segmentonkeyonly, goptime: $goptime, nogoptime: $nogoptime, fixpadding: $fixpadding, freqEs15: $freqEs15, stream: $stream, videoedited: $videoedited, usepicorder: $usepicorder, myth: $myth, nomyth: $nomyth, wtvconvertfix: $wtvconvertfix, wtvmpeg2: $wtvmpeg2, program_number: $program_number, autoprogram: $autoprogram, multiprogram: $multiprogram, streamtype: $streamtype, hauppauge: $hauppauge, mp4vidtrack: $mp4vidtrack, noautotimeref: $noautotimeref, noscte20: $noscte20, webvttcss: $webvttcss, analyzevideo: $analyzevideo, notimestamp: $notimestamp, nolevdist: $nolevdist, minlevdist: $minlevdist, maxlevdist: $maxlevdist, chapters: $chapters, bom: $bom, nobom: $nobom, encoder: $encoder, nofontcolor: $nofontcolor, nohtmlescape: $nohtmlescape, notypesetting: $notypesetting, trim: $trim, defaultcolor: $defaultcolor, sentencecap: $sentencecap, capFile: $capFile, kf: $kf, profanityFile: $profanityFile, splitbysentence: $splitbysentence, datets: $datets, sects: $sects, latrusmap: $latrusmap, xds: $xds, lf: $lf, df: $df, autodash: $autodash, xmltv: $xmltv, xmltvliveinterval: $xmltvliveinterval, xmltvoutputinterval: $xmltvoutputinterval, xmltvonlycurrent: $xmltvonlycurrent, sem: $sem, dvblang: $dvblang, mkvlang: $mkvlang, ocrlang: $ocrlang, quant: $quant, oem: $oem, bufferinput: $bufferinput, nobufferinput: $nobufferinput, buffersize: $buffersize, koc: $koc, dru: $dru, norollup: $norollup, rollUp: $rollUp, delay: $delay, startat: $startat, endat: $endat, codec: $codec, nocodec: $nocodec, startcreditstext: $startcreditstext, startcreditsnotbefore: $startcreditsnotbefore, startcreditsnotafter: $startcreditsnotafter, startcreditsforatleast: $startcreditsforatleast, startcreditsforatmost: $startcreditsforatmost, endcreditstext: $endcreditstext, endcreditsforatleast: $endcreditsforatleast, endcreditsforatmost: $endcreditsforatmost, tpage: $tpage, teletext: $teletext, noteletext: $noteletext, hardsubx: $hardsubx, tickertext: $tickertext, ocrMode: $ocrMode, subcolor: $subcolor, minSubDuration: $minSubDuration, detectItalics: $detectItalics, confThresh: $confThresh, whiteThresh: $whiteThresh, splitMode: $splitMode)';
747755
}
748756

749757
@override
@@ -756,6 +764,7 @@ class SettingsModel {
756764
other.outputfilename == outputfilename &&
757765
other.fixptsjumps == fixptsjumps &&
758766
other.append == append &&
767+
other.service == service &&
759768
other.outInterval == outInterval &&
760769
other.segmentonkeyonly == segmentonkeyonly &&
761770
other.goptime == goptime &&
@@ -855,6 +864,7 @@ class SettingsModel {
855864
outputfilename.hashCode ^
856865
fixptsjumps.hashCode ^
857866
append.hashCode ^
867+
service.hashCode ^
858868
outInterval.hashCode ^
859869
segmentonkeyonly.hashCode ^
860870
goptime.hashCode ^

lib/screens/settings/output_settings.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class OutputSettingsScreen extends StatelessWidget {
5757
text: state.settingsModel.endcreditsforatleast);
5858
TextEditingController endcreditsforatmost = TextEditingController(
5959
text: state.settingsModel.endcreditsforatmost);
60+
TextEditingController service =
61+
TextEditingController(text: state.settingsModel.service);
6062
return Scaffold(
6163
appBar: AppBar(
6264
flexibleSpace: FlexibleSpaceBar(
@@ -619,6 +621,22 @@ class OutputSettingsScreen extends StatelessWidget {
619621
),
620622
),
621623
),
624+
CustomDivider(
625+
title: '708 closed caption decoder',
626+
),
627+
CustomTextField(
628+
title: '708 service numbers',
629+
subtitle:
630+
'Enable CEA-708 (DTVCC) captions processing for the listed services. The parameter is a comma delimited list of services numbers, such as "1,2" to process the primary and secondary language services. Pass "all" to process all services found.',
631+
onEditingComplete: () => context.read<SettingsBloc>().add(
632+
SaveSettingsEvent(
633+
state.settingsModel.copyWith(
634+
service: service.text,
635+
),
636+
),
637+
),
638+
controller: service,
639+
),
622640
CustomDivider(
623641
title: 'Live typo correction',
624642
description:

pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ packages:
2828
name: async
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "2.8.2"
31+
version: "2.8.1"
3232
bloc:
3333
dependency: "direct main"
3434
description:

0 commit comments

Comments
 (0)