@@ -70,8 +70,8 @@ public struct GrpcSettings
7070 public bool useUniquePort ;
7171 [ Tooltip ( "Delay in ms before sending each frame" ) ]
7272 public int delayBetweenFramesInMs ;
73- [ Tooltip ( "Enable compression of frame image buffer in PNG to save bandwidth" ) ]
74- public bool compressionEnabled ;
73+ [ Tooltip ( "Select compression method of frame image buffer to save bandwidth" ) ]
74+ public SolARRpc . ImageCompression imageCompression ;
7575 }
7676
7777 [ SerializeField ]
@@ -80,7 +80,7 @@ public struct GrpcSettings
8080 channelPoolSize = 6 ,
8181 useUniquePort = false ,
8282 delayBetweenFramesInMs = 20 ,
83- compressionEnabled = true
83+ imageCompression = SolARRpc . ImageCompression . None
8484 } ;
8585
8686
@@ -744,7 +744,7 @@ private void handleDepth(
744744 if ( rpcAvailable )
745745 {
746746 relocAndMappingFrameSender . SetFrame ( 0 , ts , SolARRpc . ImageLayout . Grey16 ,
747- _width , _height , depthData , cam2WorldTransform , /* compression = */ false ) ;
747+ _width , _height , depthData , cam2WorldTransform , SolARRpc . ImageCompression . None ) ;
748748 }
749749 NotifyOnDepthFrame ( depthData , depthABData , ts , cam2WorldTransform , _width ,
750750 _height , _fx , _fy , _pixelBufferSize ) ;
@@ -808,7 +808,7 @@ SolARRpc.SolARMappingAndRelocalizationGrpcProxyManager.FrameSender relocAndMappi
808808
809809 byte [ ] vclBufferData = null ;
810810#if ENABLE_WINMD_SUPPORT
811- vclBufferData = researchMode . GetVlcData ( sensorType , out ts , out cam2WorldTransform , out _fx , out _fy , out _pixelBufferSize , out _width , out _height , /* flip = */ advancedGrpcSettings . compressionEnabled ) ;
811+ vclBufferData = researchMode . GetVlcData ( sensorType , out ts , out cam2WorldTransform , out _fx , out _fy , out _pixelBufferSize , out _width , out _height , /* flip = */ advancedGrpcSettings . imageCompression != SolARRpc . ImageCompression . None ) ;
812812#endif
813813 if ( vclBufferData != null )
814814 {
@@ -827,7 +827,7 @@ SolARRpc.SolARMappingAndRelocalizationGrpcProxyManager.FrameSender relocAndMappi
827827 _height ,
828828 vclBufferData ,
829829 cam2WorldTransform ,
830- advancedGrpcSettings . compressionEnabled ) ;
830+ advancedGrpcSettings . imageCompression ) ;
831831 }
832832 }
833833 else
@@ -878,7 +878,7 @@ private void handlePv(
878878 double [ ] _PVtoWorldtransform = null ;
879879 byte [ ] frameTexture = null ;
880880#if ENABLE_WINMD_SUPPORT
881- frameTexture = researchMode . GetPvData ( out _timestamp , out _PVtoWorldtransform , out _fx , out _fy , out _pixelBufferSize , out _width , out _height , /* flip = */ advancedGrpcSettings . compressionEnabled ) ;
881+ frameTexture = researchMode . GetPvData ( out _timestamp , out _PVtoWorldtransform , out _fx , out _fy , out _pixelBufferSize , out _width , out _height , /* flip = */ advancedGrpcSettings . imageCompression != SolARRpc . ImageCompression . None ) ;
882882#endif
883883 if ( frameTexture != null )
884884 {
@@ -890,7 +890,7 @@ private void handlePv(
890890 {
891891 relocAndMappingFrameSender . SetFrame ( /* sensor id PV */ 0 , _timestamp ,
892892 SolARRpc . ImageLayout . Rgb24 , _width , _height , frameTexture ,
893- _PVtoWorldtransform , advancedGrpcSettings . compressionEnabled ) ;
893+ _PVtoWorldtransform , advancedGrpcSettings . imageCompression ) ;
894894 }
895895 }
896896 }
0 commit comments