mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 04:09:59 +01:00
BugFix Implementation of Audio in Source
Generalized audio support into Source class, instead of MediaPlayer.
This commit is contained in:
@@ -277,23 +277,12 @@ public:
|
||||
inline std::string videoEffect() { return video_filter_; }
|
||||
inline bool videoEffectAvailable() { return video_filter_available_; }
|
||||
/**
|
||||
* Enables or disables audio
|
||||
* NB: setAudioEnabled reopens the video
|
||||
* audio implementation
|
||||
* */
|
||||
void setAudioEnabled(bool on);
|
||||
void setAudioVolume(int vol = -1);
|
||||
void setAudioVolumeFactor(uint index, float value);
|
||||
typedef enum {
|
||||
VOLUME_ONLY = 0,
|
||||
VOLUME_MULT_1 = 1,
|
||||
VOLUME_MULT_2 = 2,
|
||||
VOLUME_MULT_BOTH = 3
|
||||
} VolumeFactorsMix;
|
||||
void setAudioVolumeMix(VolumeFactorsMix m);
|
||||
inline VolumeFactorsMix audioVolumeMix() const { return audio_volume_mix_; }
|
||||
inline bool audioEnabled() const { return audio_enabled_; }
|
||||
inline int audioVolume() const { return (int) (audio_volume_[0] * 100.f); }
|
||||
inline bool audioAvailable() const { return media_.hasaudio; }
|
||||
void setAudioEnabled(bool on);
|
||||
void setAudioVolume(float v);
|
||||
float audioVolume() const;
|
||||
|
||||
/**
|
||||
* Accept visitors
|
||||
@@ -326,6 +315,7 @@ private:
|
||||
Timeline timeline_;
|
||||
FadingMode fading_mode_;
|
||||
std::future<MediaInfo> discoverer_;
|
||||
bool audio_enabled_;
|
||||
|
||||
// GST & Play status
|
||||
GstClockTime position_;
|
||||
@@ -345,11 +335,6 @@ private:
|
||||
bool video_filter_available_;
|
||||
std::string video_filter_;
|
||||
|
||||
// audio
|
||||
bool audio_enabled_;
|
||||
float audio_volume_[3];
|
||||
VolumeFactorsMix audio_volume_mix_;
|
||||
|
||||
// Play speed
|
||||
gdouble rate_;
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user