I'm using the below code to create a video stream. However, the video is not getting streamed at the Kinesis console
class CameraPage extends StatefulWidget {
@override
_CameraPageState createState() => _CameraPageState();
}
class _CameraPageState extends State<CameraPage> {
CameraController controller;
var index=0;
final service = KinesisVideo(region: 'ap-south-1',credentials: AwsClientCredentials
(accessKey: "XXXXXXXXXXXXXXXXXX",
secretKey: "XXXXXXXXXXXXXXXX",),);
@override
void initState() {
controller = CameraController(cameras[index], ResolutionPreset.medium);
controller.initialize().then((_) {
if (!mounted) {
return;
}
setState(() {});
});
super.initState();
}
@override
Widget build(BuildContext context) {
final mediaQuery=MediaQuery.of(context).size;
if (!controller.value.isInitialized) {
return Container();
}
return Scaffold(
body: Container(
width: mediaQuery.width,
height: mediaQuery.height*0.9,
child: Stack(
children: [
CameraPreview(controller),
Positioned(bottom: 20,
child: Container(
width: mediaQuery.width,
child: Row(
children: [
Spacer(),
Container(width: 40.0,),
Spacer(),
InkWell(
onTap: (){
service.createStream(streamName: "demo7_stream",dataRetentionInHours: 24,
mediaType: "video/h264",kmsKeyId: "b2e58180-ed42-471a-a1e3-02a4527c5919",
deviceName: "Redmi"
);
},
child: Container(
width: 100.0,
height: 100.0,
decoration: BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
child: Center(
child: Text('Emergency',style: TextStyle(color: Colors.white),),
),
),
),
Spacer(),
IconButton(icon: Icon(Icons.switch_camera,size: 40.0,color: Colors.white,),onPressed: (){
setState(() {
if(index==0){
index=1;
}else{
index=0;
}
controller = CameraController(cameras[index], ResolutionPreset.high);
controller.initialize().then((_) {
if (!mounted) {
return;
}
setState(() {});
});
});
},),
Spacer(),
],
),
),),
],
),
),
);
}
}
2020-09-14 23:29:44.512 19450-19450/com.bjofficial.testing_kinesis W/testing_kinesis: type=1400 audit(0.0:529442): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-09-14 23:29:44.527 19450-19450/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-09-14 23:29:52.292 19450-19450/com.bjofficial.testing_kinesis W/Binder:19450_5: type=1400 audit(0.0:529446): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-09-14 23:29:52.310 19450-19903/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-09-14 23:29:52.391 19450-19903/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-09-14 23:29:52.372 19450-19450/com.bjofficial.testing_kinesis W/Binder:19450_5: type=1400 audit(0.0:529448): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-09-14 23:29:52.422 19450-19482/com.bjofficial.testing_kinesis W/testing_kinesi: Long monitor contention with owner main (19450) at void android.hardware.camera2.impl.CameraDeviceImpl.close()(CameraDeviceImpl.java:1174) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onResultReceived(android.hardware.camera2.impl.CameraMetadataNative, android.hardware.camera2.impl.CaptureResultExtras, android.hardware.camera2.impl.PhysicalCaptureResultInfo[]) for 569ms
2020-09-14 23:29:52.472 19450-19450/com.bjofficial.testing_kinesis W/testing_kinesis: type=1400 audit(0.0:529449): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-09-14 23:29:52.489 19450-19450/com.bjofficial.testing_kinesis E/libc: Access denied finding property "persist.vendor.camera.privapp.list"
2020-09-14 23:29:52.552 19450-19450/com.bjofficial.testing_kinesis W/Binder:19450_5: type=1400 audit(0.0:529451): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-09-14 23:29:52.570 19450-19903/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-09-14 23:29:52.592 19450-19903/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-09-14 23:30:52.839 19450-19450/com.bjofficial.testing_kinesis W/Looper: Slow Looper main: doFrame is 336ms late because of 2 msg, msg 1 took 217ms (h=android.app.ActivityThread$H w=159), msg 2 took 108ms (late=230ms h=android.app.ActivityThread$H w=137)
2020-09-14 23:30:53.755 19450-19450/com.bjofficial.testing_kinesis W/Looper: Slow Looper main: Activity com.bjofficial.testing_kinesis/.MainActivity is 388ms late (wall=50ms running=0ms ClientTransaction{ lifecycleRequest=android.app.servertransaction.PauseActivityItem }) because of 7 msg, msg 1 took 110ms (late=55ms h=android.app.ActivityThread$H w=159), msg 2 took 275ms (late=42ms h=android.view.Choreographer$FrameHandler w=0)
2020-09-14 23:30:54.166 19450-19450/com.bjofficial.testing_kinesis W/Looper: Slow Looper main: Activity com.bjofficial.testing_kinesis/.MainActivity is 381ms late (wall=9ms running=0ms ClientTransaction{ lifecycleRequest=android.app.servertransaction.StopActivityItem }) because of 23 msg, msg 20 took 269ms (late=127ms h=android.view.Choreographer$FrameHandler c=android.view.Choreographer$FrameDisplayEventReceiver)
2020-09-14 23:30:58.938 19450-19700/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-09-14 23:30:58.922 19450-19450/com.bjofficial.testing_kinesis W/Binder:19450_4: type=1400 audit(0.0:529520): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-09-14 23:30:58.988 19450-19700/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-09-14 23:30:58.999 19450-19506/com.bjofficial.testing_kinesis W/testing_kinesi: Long monitor contention with owner main (19450) at boolean android.os.BinderProxy.transactNative(int, android.os.Parcel, android.os.Parcel, int)(Binder.java:-2) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onCaptureStarted(android.hardware.camera2.impl.CaptureResultExtras, long) for 523ms
2020-09-14 23:30:59.113 19450-19506/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-09-14 23:31:05.375 19450-19506/com.bjofficial.testing_kinesis E/libc: Access denied finding property "vendor.camera.aux.packagelist"
Performing hot restart...
Syncing files to device Redmi Note 7S...
Restarted application in 21,878ms.
W/testing_kinesis(19450): type=1400 audit(0.0:529442): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"
W/Binder:19450_5(19450): type=1400 audit(0.0:529446): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"
W/Binder:19450_5(19450): type=1400 audit(0.0:529448): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
W/testing_kinesi(19450): Long monitor contention with owner main (19450) at void android.hardware.camera2.impl.CameraDeviceImpl.close()(CameraDeviceImpl.java:1174) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onResultReceived(android.hardware.camera2.impl.CameraMetadataNative, android.hardware.camera2.impl.CaptureResultExtras, android.hardware.camera2.impl.PhysicalCaptureResultInfo[]) for 569ms
W/testing_kinesis(19450): type=1400 audit(0.0:529449): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/libc (19450): Access denied finding property "persist.vendor.camera.privapp.list"
W/Binder:19450_5(19450): type=1400 audit(0.0:529451): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"
W/Looper (19450): Slow Looper main: doFrame is 336ms late because of 2 msg, msg 1 took 217ms (h=android.app.ActivityThread$H w=159), msg 2 took 108ms (late=230ms h=android.app.ActivityThread$H w=137)
W/Looper (19450): Slow Looper main: Activity com.bjofficial.testing_kinesis/.MainActivity is 388ms late (wall=50ms running=0ms ClientTransaction{ lifecycleRequest=android.app.servertransaction.PauseActivityItem }) because of 7 msg, msg 1 took 110ms (late=55ms h=android.app.ActivityThread$H w=159), msg 2 took 275ms (late=42ms h=android.view.Choreographer$FrameHandler w=0)
W/Looper (19450): Slow Looper main: Activity com.bjofficial.testing_kinesis/.MainActivity is 381ms late (wall=9ms running=0ms ClientTransaction{ lifecycleRequest=android.app.servertransaction.StopActivityItem }) because of 23 msg, msg 20 took 269ms (late=127ms h=android.view.Choreographer$FrameHandler c=android.view.Choreographer$FrameDisplayEventReceiver)
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"
W/Binder:19450_4(19450): type=1400 audit(0.0:529520): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=12941 scontext=u:r:untrusted_app:s0:c60,c259,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"
W/testing_kinesi(19450): Long monitor contention with owner main (19450) at boolean android.os.BinderProxy.transactNative(int, android.os.Parcel, android.os.Parcel, int)(Binder.java:-2) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onCaptureStarted(android.hardware.camera2.impl.CaptureResultExtras, long) for 523ms
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"
E/libc (19450): Access denied finding property "vendor.camera.aux.packagelist"