mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-18 05:39:59 +01:00
Add Alpha fading mode to media player timeline
Fading color (to black) is not useful for media with transparency; there fading of alpha is necessary; the fading mode allows to select fade color or fade alpha. Also the source control window had to be adapted, with a checkerboard to show the alpha effect. The cropping of the image in control window was also fixed.
This commit is contained in:
@@ -206,8 +206,19 @@ public:
|
||||
*/
|
||||
Timeline *timeline();
|
||||
void setTimeline(const Timeline &tl);
|
||||
|
||||
/**
|
||||
* Get fading value at current time
|
||||
* */
|
||||
float currentTimelineFading();
|
||||
/**
|
||||
* Get fading mode
|
||||
* */
|
||||
typedef enum { FADING_COLOR = 0, FADING_ALPHA = 1 } FadingMode;
|
||||
FadingMode timelineFadingMode() { return fading_mode_; }
|
||||
/**
|
||||
* Set fading mode
|
||||
* */
|
||||
void setTimelineFadingMode(FadingMode m) { fading_mode_ = m; }
|
||||
/**
|
||||
* Get framerate of the media
|
||||
* */
|
||||
@@ -314,6 +325,7 @@ private:
|
||||
// general properties of media
|
||||
MediaInfo media_;
|
||||
Timeline timeline_;
|
||||
FadingMode fading_mode_;
|
||||
std::future<MediaInfo> discoverer_;
|
||||
|
||||
// GST & Play status
|
||||
|
||||
Reference in New Issue
Block a user