Stretch video

Issue #179 new
Ravil Sungatulin created an issue

Hi.

Current realisation of TLinuxMedia don't allow to stretch video on parent size. I belive the stretching is most wanted behaviour of video playback.

Personally for me the following changes is fine:

procedure TLinuxMedia.UpdateMediaFromControl;
var
   Ratio:single;
...

        P := GetVideoSize;
        Ratio:=P.x / P.Y; //new line
        P.X:=Control.AbsoluteWidth; //new line
        P.Y:=P.X / Ratio; //new line
        Bounds := TRectF.Create(0, 0, P.X, P.Y);
...

Comments (4)

  1. Eugene Kryukov repo owner

    Why Linux version should work different ? On all other platform MediaPlayer doesn't use stretch.

  2. Ravil Sungatulin reporter

    Yes, you are right. But some people want to stretch video and don't now how to do it. The universal solution is not exists. Developers do it custom for each (most Windows) platform: https://stackoverflow.com/questions/12738567/tmediaplayercontrol-video-size http://fire-monkey.ru/topic/191-существует-ли-способ-растягивания-видео-до-нужных-размеров-под-windows/

    I do it for Windows, Mac and Linux.

    Embarcadero still not allow stretch video but you would add property like "Stretch" to control it. It's just suggestion.

    Regards, Ravil.

  3. Log in to comment