mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 12:20:01 +01:00
New support for AUDIO
Allows looking for audio streams in media files (settings) and enabling / disabling audio for each MediaPlayer individually. Control of volume per media, saving in session file.
This commit is contained in:
@@ -37,6 +37,7 @@ struct MediaInfo {
|
||||
GstClockTime dt;
|
||||
GstClockTime end;
|
||||
std::string log;
|
||||
bool hasaudio;
|
||||
|
||||
MediaInfo() {
|
||||
width = par_width = 1;
|
||||
@@ -49,6 +50,7 @@ struct MediaInfo {
|
||||
interlaced = false;
|
||||
seekable = false;
|
||||
valid = false;
|
||||
hasaudio = false;
|
||||
dt = GST_CLOCK_TIME_NONE;
|
||||
end = GST_CLOCK_TIME_NONE;
|
||||
log = "";
|
||||
@@ -264,6 +266,15 @@ public:
|
||||
void setVideoEffect(const std::string &pipeline_element);
|
||||
inline std::string videoEffect() { return video_filter_; }
|
||||
inline bool videoEffectAvailable() { return video_filter_available_; }
|
||||
/**
|
||||
* Enables or disables audio
|
||||
* NB: setAudioEnabled reopens the video
|
||||
* */
|
||||
void setAudioEnabled(bool on);
|
||||
void setAudioVolume(int vol);
|
||||
inline bool audioEnabled() const { return audio_enabled_; }
|
||||
inline int audioVolume() const { return audio_volume_; }
|
||||
inline bool audioAvailable() const { return media_.hasaudio; }
|
||||
/**
|
||||
* Accept visitors
|
||||
* */
|
||||
@@ -309,6 +320,8 @@ private:
|
||||
bool enabled_;
|
||||
bool rewind_on_disable_;
|
||||
bool force_software_decoding_;
|
||||
bool audio_enabled_;
|
||||
int audio_volume_;
|
||||
std::string decoder_name_;
|
||||
bool video_filter_available_;
|
||||
std::string video_filter_;
|
||||
|
||||
Reference in New Issue
Block a user