@@ -348,9 +348,8 @@ fun App()
348
348
val audio_in_sources by remember { mutableStateOf(ArrayList <String >()) }
349
349
var video_in_devices by remember { mutableStateOf(ArrayList <String >()) }
350
350
val video_in_sources by remember { mutableStateOf(ArrayList <String >()) }
351
- avstatestore.state.audio_in_device
352
351
Column {
353
- Text (text = " audio in: " + avstatestore.state.audio_in_device + " " + avstatestore.state.audio_in_source
352
+ Text (text = " audio in: " + avstatestore.state.audio_in_device_get() + " " + avstatestore.state.audio_in_source_get()
354
353
, fontSize = 13 .sp, modifier = Modifier .fillMaxWidth(),
355
354
maxLines = 1 )
356
355
Box {
@@ -379,17 +378,17 @@ fun App()
379
378
audio_in_devices.forEach() {
380
379
if (it != null )
381
380
{
382
- DropdownMenuItem (onClick = { avstatestore.state.audio_in_source = " " ;audio_in_sources.clear(); avstatestore.state.audio_in_device = it ;expanded_a = false }) {
381
+ DropdownMenuItem (onClick = { avstatestore.state.audio_in_source_set( " " ) ;audio_in_sources.clear(); avstatestore.state.audio_in_device_set(it) ;expanded_a = false }) {
383
382
Text (" " + it)
384
383
}
385
384
}
386
385
}
387
386
}
388
387
DropdownMenuItem (
389
388
onClick = {
390
- avstatestore.state.audio_in_source = " "
389
+ avstatestore.state.audio_in_source_set( " " )
391
390
audio_in_sources.clear()
392
- avstatestore.state.audio_in_device = " "
391
+ avstatestore.state.audio_in_device_set( " " )
393
392
expanded_a = false
394
393
})
395
394
{
@@ -399,7 +398,7 @@ fun App()
399
398
}
400
399
Box {
401
400
IconButton (onClick = {
402
- if ((avstatestore.state.audio_in_device != null ) && (avstatestore.state.audio_in_device != " " ))
401
+ if ((avstatestore.state.audio_in_device_get() != null ) && (avstatestore.state.audio_in_device_get() != " " ))
403
402
{
404
403
if (! avstatestore.state.ffmpeg_init_done)
405
404
{
@@ -408,7 +407,7 @@ fun App()
408
407
avstatestore.state.ffmpeg_init_done = true
409
408
}
410
409
var audio_in_sources_get: Array <String > = emptyArray()
411
- val tmp = AVActivity .ffmpegav_get_in_sources(avstatestore.state.audio_in_device , 0 )
410
+ val tmp = AVActivity .ffmpegav_get_in_sources(avstatestore.state.audio_in_device_get() , 0 )
412
411
if (tmp == null )
413
412
{
414
413
audio_in_sources_get = emptyArray()
@@ -438,15 +437,15 @@ fun App()
438
437
audio_in_sources.forEach() {
439
438
if (it != null )
440
439
{
441
- DropdownMenuItem (onClick = { avstatestore.state.audio_in_source = it ;expanded_as = false }) {
440
+ DropdownMenuItem (onClick = { avstatestore.state.audio_in_source_set(it) ;expanded_as = false }) {
442
441
Text (" " + it)
443
442
}
444
443
}
445
444
}
446
445
}
447
446
DropdownMenuItem (
448
447
onClick = {
449
- avstatestore.state.audio_in_source = " "
448
+ avstatestore.state.audio_in_source_set( " " )
450
449
expanded_as = false
451
450
})
452
451
{
@@ -456,7 +455,7 @@ fun App()
456
455
}
457
456
458
457
459
- Text (" video in: " + avstatestore.state.video_in_device + " " + avstatestore.state.video_in_source
458
+ Text (" video in: " + avstatestore.state.video_in_device_get() + " " + avstatestore.state.video_in_source_get()
460
459
, fontSize = 13 .sp, modifier = Modifier .fillMaxWidth(),
461
460
maxLines = 1 )
462
461
Box {
@@ -485,17 +484,17 @@ fun App()
485
484
video_in_devices.forEach() {
486
485
if (it != null )
487
486
{
488
- DropdownMenuItem (onClick = { avstatestore.state.video_in_source = " " ;video_in_sources.clear(); avstatestore.state.video_in_device = it ;expanded_v = false }) {
487
+ DropdownMenuItem (onClick = { avstatestore.state.video_in_source_set( " " ) ;video_in_sources.clear(); avstatestore.state.video_in_device_set(it) ;expanded_v = false }) {
489
488
Text (" " + it)
490
489
}
491
490
}
492
491
}
493
492
}
494
493
DropdownMenuItem (
495
494
onClick = {
496
- avstatestore.state.video_in_source = " "
495
+ avstatestore.state.video_in_source_set( " " )
497
496
video_in_sources.clear()
498
- avstatestore.state.video_in_device = " "
497
+ avstatestore.state.video_in_device_set( " " )
499
498
expanded_v = false
500
499
})
501
500
{
@@ -505,7 +504,7 @@ fun App()
505
504
}
506
505
Box {
507
506
IconButton (onClick = {
508
- if ((avstatestore.state.video_in_device != null ) && (avstatestore.state.video_in_device != " " ))
507
+ if ((avstatestore.state.video_in_device_get() != null ) && (avstatestore.state.video_in_device_get() != " " ))
509
508
{
510
509
if (! avstatestore.state.ffmpeg_init_done)
511
510
{
@@ -514,7 +513,7 @@ fun App()
514
513
avstatestore.state.ffmpeg_init_done = true
515
514
}
516
515
var video_in_sources_get: Array <String > = emptyArray()
517
- if (avstatestore.state.video_in_device == " video4linux2,v4l2" )
516
+ if (avstatestore.state.video_in_device_get() == " video4linux2,v4l2" )
518
517
{
519
518
val tmp = AVActivity .ffmpegav_get_in_sources(" v4l2" , 1 )
520
519
if (tmp == null )
@@ -528,7 +527,7 @@ fun App()
528
527
}
529
528
else
530
529
{
531
- val tmp = AVActivity .ffmpegav_get_in_sources(avstatestore.state.video_in_device , 1 )
530
+ val tmp = AVActivity .ffmpegav_get_in_sources(avstatestore.state.video_in_device_get() , 1 )
532
531
if (tmp == null )
533
532
{
534
533
video_in_sources_get = emptyArray()
@@ -538,8 +537,8 @@ fun App()
538
537
video_in_sources_get = tmp
539
538
}
540
539
}
541
- Log .i(TAG , " video_in_device=" + avstatestore.state.video_in_device )
542
- if (avstatestore.state.video_in_device == " x11grab" )
540
+ Log .i(TAG , " video_in_device=" + avstatestore.state.video_in_device_get() )
541
+ if (avstatestore.state.video_in_device_get() == " x11grab" )
543
542
{
544
543
video_in_sources_get + = listOf (" :0.0" , " :1.0" , " :2.0" , " :3.0" , " :4.0" , " :5.0" )
545
544
}
@@ -564,15 +563,15 @@ fun App()
564
563
video_in_sources.forEach() {
565
564
if (it != null )
566
565
{
567
- DropdownMenuItem (onClick = { avstatestore.state.video_in_source = it ;expanded_vs = false }) {
566
+ DropdownMenuItem (onClick = { avstatestore.state.video_in_source_set(it) ;expanded_vs = false }) {
568
567
Text (" " + it)
569
568
}
570
569
}
571
570
}
572
571
}
573
572
DropdownMenuItem (
574
573
onClick = {
575
- avstatestore.state.video_in_source = " "
574
+ avstatestore.state.video_in_source_set( " " )
576
575
expanded_vs = false
577
576
})
578
577
{
0 commit comments