@@ -91,7 +91,7 @@ void VideoSession::set(const VideoSourceOption& option){
9191
9292void VideoSession::reset (){
9393 m_logger.log (" Resetting the video..." , COLOR_GREEN);
94- dispatch_to_main_thread ([this ]{
94+ queue_on_main_thread ([this ]{
9595 std::lock_guard<std::mutex> lg0 (m_reset_lock);
9696
9797 m_state_listeners.run_method_unique (&StateListener::pre_shutdown);
@@ -124,7 +124,7 @@ void VideoSession::set_source(
124124 Resolution resolution
125125){
126126 m_logger.log (" Changing video..." , COLOR_GREEN);
127- dispatch_to_main_thread ([this , device, resolution]{
127+ queue_on_main_thread ([this , device, resolution]{
128128 std::lock_guard<std::mutex> lg0 (m_reset_lock);
129129 if (*m_descriptor == *device && !m_descriptor->should_reload ()){
130130 return ;
@@ -163,7 +163,7 @@ void VideoSession::set_source(
163163}
164164void VideoSession::set_resolution (Resolution resolution){
165165 m_logger.log (" Changing resolution..." , COLOR_GREEN);
166- dispatch_to_main_thread ([this , resolution]{
166+ queue_on_main_thread ([this , resolution]{
167167 std::lock_guard<std::mutex> lg0 (m_reset_lock);
168168 if (m_option.m_resolution == resolution){
169169 return ;
0 commit comments