Working but dirty implementation of GUI for Timeline and gaps of

MediaPlayer.
This commit is contained in:
brunoherbelin
2020-08-19 23:15:54 +02:00
parent a4b61927bc
commit 182f204d80
7 changed files with 265 additions and 215 deletions

View File

@@ -746,15 +746,17 @@ void MediaPlayer::update()
execute_loop_command();
}
// manage timeline
// TimeInterval gap;
// if (position_ != GST_CLOCK_TIME_NONE && timeline.gapAt(position_, gap)) {
// seek( (rate_>0.f) ? gap.end : gap.begin);
TimeInterval gap;
if (position_ != GST_CLOCK_TIME_NONE && media_.timeline.gapAt(position_, gap)) {
// // TODO : manage loop when jumping out of timeline
// }
if (gap.is_valid())
seek( (rate_>0.f) ? gap.end : gap.begin);
// TODO : manage loop when jumping out of timeline
}
}
@@ -845,6 +847,17 @@ Timeline MediaPlayer::timeline()
return media_.timeline;
}
void MediaPlayer::setTimeline(Timeline tl)
{
media_.timeline = tl;
}
//void MediaPlayer::toggleGapInTimeline(GstClockTime from, GstClockTime to)
//{
// return media_.timeline.toggleGaps(from, to);
//}
std::string MediaPlayer::codec() const
{
return media_.codec_name;