@@ -635,7 +635,7 @@ async fn capture_display_thumbnail(display: &scap_targets::Display) -> Option<St
635635 use scap_direct3d:: { Capturer , Settings } ;
636636 use std:: io:: Cursor ;
637637
638- let item = display. raw_handle ( ) . get_capture_item ( ) . ok ( ) ?;
638+ let item = display. raw_handle ( ) . try_as_capture_item ( ) . ok ( ) ?;
639639
640640 let ( tx, rx) = std:: sync:: mpsc:: channel ( ) ;
641641
@@ -645,7 +645,7 @@ async fn capture_display_thumbnail(display: &scap_targets::Display) -> Option<St
645645 ..Default :: default ( )
646646 } ;
647647
648- let capturer = Capturer :: new (
648+ let mut capturer = Capturer :: new (
649649 item,
650650 settings. clone ( ) ,
651651 move |frame| {
@@ -696,7 +696,7 @@ async fn capture_display_thumbnail(display: &scap_targets::Display) -> Option<St
696696 thumbnail. as_raw ( ) ,
697697 thumbnail. width ( ) ,
698698 thumbnail. height ( ) ,
699- ColorType :: Rgba8 ,
699+ ColorType :: Rgba8 . into ( ) ,
700700 )
701701 . ok ( ) ?;
702702
@@ -719,7 +719,7 @@ async fn capture_window_thumbnail(window: &scap_targets::Window) -> Option<Strin
719719 use scap_direct3d:: { Capturer , Settings } ;
720720 use std:: io:: Cursor ;
721721
722- let item = window. raw_handle ( ) . get_capture_item ( ) . ok ( ) ?;
722+ let item = window. raw_handle ( ) . try_as_capture_item ( ) . ok ( ) ?;
723723
724724 let ( tx, rx) = std:: sync:: mpsc:: channel ( ) ;
725725
@@ -729,7 +729,7 @@ async fn capture_window_thumbnail(window: &scap_targets::Window) -> Option<Strin
729729 ..Default :: default ( )
730730 } ;
731731
732- let capturer = Capturer :: new (
732+ let mut capturer = Capturer :: new (
733733 item,
734734 settings. clone ( ) ,
735735 move |frame| {
@@ -780,7 +780,7 @@ async fn capture_window_thumbnail(window: &scap_targets::Window) -> Option<Strin
780780 thumbnail. as_raw ( ) ,
781781 thumbnail. width ( ) ,
782782 thumbnail. height ( ) ,
783- ColorType :: Rgba8 ,
783+ ColorType :: Rgba8 . into ( ) ,
784784 )
785785 . ok ( ) ?;
786786
0 commit comments