From ba0e25a272ab0da1a5ff3d00d148360fcf70b3f1 Mon Sep 17 00:00:00 2001 From: Bruno Date: Mon, 17 May 2021 16:13:21 +0200 Subject: [PATCH] Minor code improvements --- MediaPlayer.cpp | 2 +- MediaPlayer.h | 10 +++++----- Mixer.cpp | 2 +- Mixer.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MediaPlayer.cpp b/MediaPlayer.cpp index c82ea38..46a2653 100644 --- a/MediaPlayer.cpp +++ b/MediaPlayer.cpp @@ -543,7 +543,7 @@ bool MediaPlayer::isImage() const return media_.isimage; } -std::string MediaPlayer::hardwareDecoderName() +std::string MediaPlayer::hardwareDecoderName() const { return hardware_decoder_; } diff --git a/MediaPlayer.h b/MediaPlayer.h index f20c81e..0e4a742 100644 --- a/MediaPlayer.h +++ b/MediaPlayer.h @@ -188,6 +188,10 @@ public: * Seek to zero * */ void rewind(); + /** + * Get position time + * */ + GstClockTime position(); /** * go to a valid position in media timeline * pos in nanoseconds. @@ -210,10 +214,6 @@ public: void setTimeline(const Timeline &tl); float currentTimelineFading(); - /** - * Get position time - * */ - GstClockTime position(); /** * Get framerate of the media * */ @@ -245,7 +245,7 @@ public: * Get the name of the hardware decoder used * Empty string if none (i.e. software decoding) * */ - std::string hardwareDecoderName(); + std::string hardwareDecoderName() const; /** * Forces open using software decoding * (i.e. without hadrware decoding) diff --git a/Mixer.cpp b/Mixer.cpp index d01b99d..80000fc 100644 --- a/Mixer.cpp +++ b/Mixer.cpp @@ -400,7 +400,7 @@ void Mixer::insertSource(Source *s, View::Mode m) attach(s); // new state in history manager - Action::manager().store(s->name() + std::string(" source inserted")); + Action::manager().store(s->name() + std::string(": source inserted")); // if requested to show the source in a given view // (known to work for View::MIXING et TRANSITION: other views untested) diff --git a/Mixer.h b/Mixer.h index 302207f..6fd3074 100644 --- a/Mixer.h +++ b/Mixer.h @@ -40,7 +40,7 @@ public: // update session and all views void update(); - inline float dt() const { return dt_;} + inline float dt() const { return dt_;} // in miliseconds inline int fps() const { return int(roundf(1000.f/dt__));} // draw session and current view