@@ -50,12 +50,12 @@ public AppViewModel()
5050 private LearningModelDeviceKind m_inferenceDeviceSelected = LearningModelDeviceKind . Default ;
5151 private LearningModelSession m_session ;
5252 private LearningModelBinding m_binding ;
53- string m_inputImageDescription ;
54- string m_outputImageDescription ;
55- IMediaExtension videoEffect ;
53+ private string m_inputImageDescription ;
54+ private string m_outputImageDescription ;
55+ private IMediaExtension videoEffect ;
5656
5757 // Image style transfer properties
58- uint m_inWidth , m_inHeight , m_outWidth , m_outHeight ;
58+ private uint m_inWidth , m_inHeight , m_outWidth , m_outHeight ;
5959 private string _DefaultImageFileName = "Input.jpg" ;
6060
6161 // User notifiaction properties
@@ -104,15 +104,16 @@ public string StatusMessage
104104 public async void SaveOutput ( )
105105 {
106106 Debug . WriteLine ( "UIButtonSaveImage_Click" ) ;
107- await ImageHelper . SaveVideoFrameToFilePickedAsync ( _appModel . OutputFrame ) ;
107+ // Can't save from live stream, bail if somehow triggered in live stream
108+ if ( _appModel . InputMedia != "LiveStream" ) await ImageHelper . SaveVideoFrameToFilePickedAsync ( _appModel . OutputFrame ) ;
108109 return ;
109110 }
110111
111112 public async Task SetMediaSource ( string obj )
112113 {
113114 _appModel . InputMedia = obj ;
114115
115- // TODO: Reset media source stuff: set Camera input controls visibility to 0, etc.
116+ // Reset media source, cameras, notification bar
116117 CleanupCameraAsync ( ) ;
117118 CleanupInputImage ( ) ;
118119 NotifyUser ( true ) ;
@@ -126,11 +127,9 @@ public async Task SetMediaSource(string obj)
126127 // TODO: Also spin up a Capture for preview on left side
127128 break ;
128129 case "AcquireImage" :
129-
130130 await StartAcquireImage ( ) ;
131131 break ;
132132 case "FilePick" :
133-
134133 await StartFilePick ( ) ;
135134 break ;
136135 case "Inking" :
@@ -142,7 +141,6 @@ public async Task SetMediaSource(string obj)
142141
143142 public async Task SetModelSource ( )
144143 {
145- // Clean up model, etc. by setting to null?
146144 await LoadModelAsync ( ) ;
147145
148146 switch ( _appModel . InputMedia )
0 commit comments