diff --git a/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h b/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h index def268ab7..db721e6be 100644 --- a/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h +++ b/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h @@ -15,6 +15,7 @@ #include #include +#include "playback_cs.h" #include "cs_types.h" #ifndef CS_VIDEO_PDATA @@ -173,7 +174,8 @@ private: bool isReadScreeninfo; fb_var_screeninfo varScreeninfo; fb_fix_screeninfo fixScreeninfo; - + // + cPlayback *playback_ptr; // int SelectAutoFormat(); void ScalePic(); @@ -264,6 +266,9 @@ public: int fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode); int fbFill(int sx, int sy, int width, int height, fb_pixel_t col, int mode=0); void SetDemux(cDemux *Demux); + + // set instance of cPlayback as callback + void setPlaybackPtr(cPlayback *ptr); }; #endif // __VIDEO_CS_H_ diff --git a/lib/hardware/coolstream/hd2/libcoolstream/video_cs.h b/lib/hardware/coolstream/hd2/libcoolstream/video_cs.h index bb8372c4b..a87da052d 100644 --- a/lib/hardware/coolstream/hd2/libcoolstream/video_cs.h +++ b/lib/hardware/coolstream/hd2/libcoolstream/video_cs.h @@ -13,6 +13,7 @@ #include #include +#include "playback_cs.h" #include "cs_types.h" #define CS_MAX_VIDEO_DECODERS 16 @@ -206,6 +207,8 @@ private: cDemux *demux; int current_video_system; // + cPlayback *playback_ptr; + // int SelectAutoFormat(); void ScalePic(); cVideo(unsigned int Unit); @@ -299,6 +302,9 @@ public: void SetDemux(cDemux *Demux); static cVideo *GetDecoder(unsigned int Unit); bool SyncSTC(void); + + // set instance of cPlayback as callback + void setPlaybackPtr(cPlayback *ptr); }; #endif // __VIDEO_CS_H_ diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index e80ad62a1..9024d9457 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -171,6 +171,9 @@ void CMoviePlayerGui::Init(void) if (playback == NULL) playback = new cPlayback(0); +#if HAVE_CST_HARDWARE + videoDecoder->setPlaybackPtr(playback); +#endif if (moviebrowser == NULL) moviebrowser = new CMovieBrowser(); if (bookmarkmanager == NULL)