@@ -6,9 +6,9 @@ namespace rsx
66{
77 namespace overlays
88 {
9- video_view::video_view (const std::string& video_path, const std::string& thumbnail_path)
9+ video_view::video_view (const std::string& video_path, const std::string& audio_path, const std::string& thumbnail_path)
1010 {
11- init_video (video_path);
11+ init_video (video_path, audio_path );
1212
1313 if (!thumbnail_path.empty ())
1414 {
@@ -17,9 +17,9 @@ namespace rsx
1717 }
1818 }
1919
20- video_view::video_view (const std::string& video_path, const std::vector<u8 >& thumbnail_buf)
20+ video_view::video_view (const std::string& video_path, const std::string& audio_path, const std:: vector<u8 >& thumbnail_buf)
2121 {
22- init_video (video_path);
22+ init_video (video_path, audio_path );
2323
2424 if (!thumbnail_buf.empty ())
2525 {
@@ -28,24 +28,22 @@ namespace rsx
2828 }
2929 }
3030
31- video_view::video_view (const std::string& video_path, u8 thumbnail_id)
31+ video_view::video_view (const std::string& video_path, const std::string& audio_path, u8 thumbnail_id)
3232 : m_thumbnail_id(thumbnail_id)
3333 {
34- init_video (video_path);
34+ init_video (video_path, audio_path );
3535 set_image_resource (thumbnail_id);
3636 }
3737
3838 video_view::~video_view ()
3939 {
4040 }
4141
42- void video_view::init_video (const std::string& video_path)
42+ void video_view::init_video (const std::string& video_path, const std::string& audio_path )
4343 {
4444 if (video_path.empty ()) return ;
4545
46- m_video_source = Emu.GetCallbacks ().make_video_source ();
47- ensure (!!m_video_source);
48-
46+ m_video_source = ensure (Emu.GetCallbacks ().make_video_source ());
4947 m_video_source->set_update_callback ([this ]()
5048 {
5149 if (m_video_active)
@@ -54,6 +52,7 @@ namespace rsx
5452 }
5553 });
5654 m_video_source->set_video_path (video_path);
55+ m_video_source->set_audio_path (audio_path);
5756 }
5857
5958 void video_view::set_active (bool active)
0 commit comments