viewer: re-render both video and audio if parameters change
This commit is contained in:
@@ -77,6 +77,26 @@ const RenderMode::Mode &VideoRenderingParams::mode() const
|
||||
return mode_;
|
||||
}
|
||||
|
||||
bool VideoRenderingParams::operator==(const VideoRenderingParams &rhs) const
|
||||
{
|
||||
return width() == rhs.width()
|
||||
&& height() == rhs.height()
|
||||
&& time_base() == rhs.time_base()
|
||||
&& format() == rhs.format()
|
||||
&& mode() == rhs.mode()
|
||||
&& divider() == rhs.divider();
|
||||
}
|
||||
|
||||
bool VideoRenderingParams::operator!=(const VideoRenderingParams &rhs) const
|
||||
{
|
||||
return width() != rhs.width()
|
||||
|| height() != rhs.height()
|
||||
|| time_base() != rhs.time_base()
|
||||
|| format() != rhs.format()
|
||||
|| mode() != rhs.mode()
|
||||
|| divider() != rhs.divider();
|
||||
}
|
||||
|
||||
void VideoRenderingParams::calculate_effective_size()
|
||||
{
|
||||
effective_width_ = width() / divider_;
|
||||
|
||||
@@ -36,6 +36,9 @@ public:
|
||||
const PixelFormat::Format& format() const;
|
||||
const RenderMode::Mode& mode() const;
|
||||
|
||||
bool operator==(const VideoRenderingParams& rhs) const;
|
||||
bool operator!=(const VideoRenderingParams& rhs) const;
|
||||
|
||||
private:
|
||||
void calculate_effective_size();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user