File tree Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ use crate::mitm::sensor_source_service::Sensor;
23
23
use crate :: mitm:: AudioStreamType :: * ;
24
24
use crate :: mitm:: SensorMessageId :: * ;
25
25
use crate :: mitm:: SensorType :: * ;
26
+ use crate :: mitm:: VideoCodecResolutionType :: VIDEO_1920x1080 ;
26
27
use protobuf:: text_format:: print_to_string_pretty;
28
+ use protobuf:: EnumOrUnknown ;
27
29
use protobuf:: { Enum , Message , MessageDyn } ;
28
30
use protos:: ControlMessageType :: { self , * } ;
29
31
@@ -359,27 +361,8 @@ pub async fn pkt_modify_hook(
359
361
. iter_mut ( )
360
362
. find ( |svc| !svc. media_sink_service . video_configs . is_empty ( ) )
361
363
{
362
- msg. services
363
- . retain ( |svc| svc. media_sink_service . codec_resolution ( ) == VIDEO_1920x1080 ) ;
364
- info ! (
365
- "{} <yellow>{:?}</>: best codec retained" ,
366
- get_name( proxy_type) ,
367
- control. unwrap( ) ,
368
- ) ;
369
- /*
370
- // get previous/original value
371
- let prev_val = svc.media_sink_service.video_configs[0].density();
372
- // set new value
373
- svc.media_sink_service.as_mut().unwrap().video_configs[0]
374
- .set_density(dpi.into());
375
- info!(
376
- "{} <yellow>{:?}</>: replacing DPI[0] value: from <b>{}</> to <b>{}</>",
377
- get_name(proxy_type),
378
- control.unwrap(),
379
- prev_val,
380
- dpi
381
- );
382
- */
364
+ svc. media_sink_service . as_mut ( ) . unwrap ( ) . video_configs . remove ( 2 ) ;
365
+ svc. media_sink_service . as_mut ( ) . unwrap ( ) . video_configs . remove ( 1 ) ;
383
366
}
384
367
}
385
368
You can’t perform that action at this time.
0 commit comments