Minor code improvements

This commit is contained in:
Bruno
2021-05-17 16:13:21 +02:00
parent c87b1ac363
commit 579f7d5609
4 changed files with 8 additions and 8 deletions

View File

@@ -543,7 +543,7 @@ bool MediaPlayer::isImage() const
return media_.isimage; return media_.isimage;
} }
std::string MediaPlayer::hardwareDecoderName() std::string MediaPlayer::hardwareDecoderName() const
{ {
return hardware_decoder_; return hardware_decoder_;
} }

View File

@@ -188,6 +188,10 @@ public:
* Seek to zero * Seek to zero
* */ * */
void rewind(); void rewind();
/**
* Get position time
* */
GstClockTime position();
/** /**
* go to a valid position in media timeline * go to a valid position in media timeline
* pos in nanoseconds. * pos in nanoseconds.
@@ -210,10 +214,6 @@ public:
void setTimeline(const Timeline &tl); void setTimeline(const Timeline &tl);
float currentTimelineFading(); float currentTimelineFading();
/**
* Get position time
* */
GstClockTime position();
/** /**
* Get framerate of the media * Get framerate of the media
* */ * */
@@ -245,7 +245,7 @@ public:
* Get the name of the hardware decoder used * Get the name of the hardware decoder used
* Empty string if none (i.e. software decoding) * Empty string if none (i.e. software decoding)
* */ * */
std::string hardwareDecoderName(); std::string hardwareDecoderName() const;
/** /**
* Forces open using software decoding * Forces open using software decoding
* (i.e. without hadrware decoding) * (i.e. without hadrware decoding)

View File

@@ -400,7 +400,7 @@ void Mixer::insertSource(Source *s, View::Mode m)
attach(s); attach(s);
// new state in history manager // 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 // if requested to show the source in a given view
// (known to work for View::MIXING et TRANSITION: other views untested) // (known to work for View::MIXING et TRANSITION: other views untested)

View File

@@ -40,7 +40,7 @@ public:
// update session and all views // update session and all views
void update(); 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__));} inline int fps() const { return int(roundf(1000.f/dt__));}
// draw session and current view // draw session and current view