Commit 68eb2c0f authored by luyikei's avatar luyikei

IInput: Add aspectRatio()

parent 325b8050
......@@ -88,6 +88,7 @@ namespace Backend
virtual uint8_t* image( uint32_t width, uint32_t height ) const = 0;
virtual double fps() const = 0;
virtual double aspectRatio() const = 0;
virtual int width() const = 0;
virtual int height() const = 0;
virtual bool hasVideo() const = 0;
......
......@@ -272,6 +272,12 @@ MLTInput::fps() const
return producer()->get_fps();
}
double
MLTInput::aspectRatio() const
{
return producer()->get_double( "aspect_ratio" );
}
int
MLTInput::width() const
{
......
......@@ -90,6 +90,7 @@ class MLTInput : virtual public IInput, public MLTService
virtual uint8_t* image( uint32_t width, uint32_t height ) const override;
virtual double fps() const override;
virtual double aspectRatio() const override;
virtual int width() const override;
virtual int height() const override;
virtual bool hasVideo() const override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment