movieplayer.cpp: A new member function setPlaybackPtr(cPlayback *ptr) is implemented within the cVideo class to set the playback callback pointer.

This prevents showing pictures with the videoDecoder while movieplayer is paused


Origin commit data
------------------
Branch: ni/coolstream
Commit: d2ad17d01f
Author: GetAway <get-away@t-online.de>
Date: 2023-08-16 (Wed, 16 Aug 2023)



------------------
This commit was generated by Migit
This commit is contained in:
GetAway
2023-08-16 21:03:37 +02:00
committed by vanhofen
parent 6a0a8c1385
commit cb44c90036
3 changed files with 15 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
#include <dmx_cs.h> #include <dmx_cs.h>
#include <linux/fb.h> #include <linux/fb.h>
#include "playback_cs.h"
#include "cs_types.h" #include "cs_types.h"
#ifndef CS_VIDEO_PDATA #ifndef CS_VIDEO_PDATA
@@ -173,7 +174,8 @@ private:
bool isReadScreeninfo; bool isReadScreeninfo;
fb_var_screeninfo varScreeninfo; fb_var_screeninfo varScreeninfo;
fb_fix_screeninfo fixScreeninfo; fb_fix_screeninfo fixScreeninfo;
//
cPlayback *playback_ptr;
// //
int SelectAutoFormat(); int SelectAutoFormat();
void ScalePic(); 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 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); int fbFill(int sx, int sy, int width, int height, fb_pixel_t col, int mode=0);
void SetDemux(cDemux *Demux); void SetDemux(cDemux *Demux);
// set instance of cPlayback as callback
void setPlaybackPtr(cPlayback *ptr);
}; };
#endif // __VIDEO_CS_H_ #endif // __VIDEO_CS_H_

View File

@@ -13,6 +13,7 @@
#include <cs_frontpanel.h> #include <cs_frontpanel.h>
#include <control.h> #include <control.h>
#include "playback_cs.h"
#include "cs_types.h" #include "cs_types.h"
#define CS_MAX_VIDEO_DECODERS 16 #define CS_MAX_VIDEO_DECODERS 16
@@ -206,6 +207,8 @@ private:
cDemux *demux; cDemux *demux;
int current_video_system; int current_video_system;
// //
cPlayback *playback_ptr;
//
int SelectAutoFormat(); int SelectAutoFormat();
void ScalePic(); void ScalePic();
cVideo(unsigned int Unit); cVideo(unsigned int Unit);
@@ -299,6 +302,9 @@ public:
void SetDemux(cDemux *Demux); void SetDemux(cDemux *Demux);
static cVideo *GetDecoder(unsigned int Unit); static cVideo *GetDecoder(unsigned int Unit);
bool SyncSTC(void); bool SyncSTC(void);
// set instance of cPlayback as callback
void setPlaybackPtr(cPlayback *ptr);
}; };
#endif // __VIDEO_CS_H_ #endif // __VIDEO_CS_H_

View File

@@ -171,6 +171,9 @@ void CMoviePlayerGui::Init(void)
if (playback == NULL) if (playback == NULL)
playback = new cPlayback(0); playback = new cPlayback(0);
#if HAVE_CST_HARDWARE
videoDecoder->setPlaybackPtr(playback);
#endif
if (moviebrowser == NULL) if (moviebrowser == NULL)
moviebrowser = new CMovieBrowser(); moviebrowser = new CMovieBrowser();
if (bookmarkmanager == NULL) if (bookmarkmanager == NULL)