Results 1 to 7 of 7

Thread: How to play video , by rotating at 90 degree?

  1. #1
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default How to play video , by rotating at 90 degree?

    hi,

    I have an 800*480 size Capacitve TFT connected with the ARM Board. The LCD is in Landscape mode, but i want it to be in Portrait Mode. So i am rotating each parent widget , i shows.


    But, issue come with the Video File. I dont know about Rotating by hardware support. What should i do if i want to play a video file rotated at 90 degree.

    I am fine with the .gif file, by rotating the parent . But video is not working. What should i do?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to play video , by rotating at 90 degree?

    It depends how the video is being rendered.
    If your application is the one rendering the video, then you can do the rotation in code (exactly how depends on how you are rending, with openGL or with QPainter etc).
    If you don't have direct access to the video frame data, then its probably done by the hardware and you have no control over the frame in your code.
    In such case the solution also is not in your code, but in hardware / system configuration.
    But you supplied to little information to help you any further.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to play video , by rotating at 90 degree?

    No, My application doesnt have a control over Video Rendering.

    I am just using video file and my application needs to play the video file specified by its path. If i am having a resource file , say myvideo.mp4, What should i do if taking a control of the frame data is possible.

    If you have Any trick , let me know. As i have very little knowledge on video.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to play video , by rotating at 90 degree?

    am just using video file and my application needs to play the video file specified by its path.
    Please post the code for that, it will be quicker to understand what you are doing this way.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to play video , by rotating at 90 degree?

    If i am able to rotate .gif file and run with the QMovie. Why cant i rotate and play video file?

    What is the difference between them?

  6. #6
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to play video , by rotating at 90 degree?

    Probably for a QMovie, Qt does the painting and so it is controllable.
    For video, Qt uses plugins available on the system. So you dont have control over them.

    A trick would have been to use Video widget inside graphics scene and rotate it.

  7. #7
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to play video , by rotating at 90 degree?

    Thanks for ur reply.

    But, No its not working. I have tried. It only rotates the VideoWidget, video display is not rotated.

Similar Threads

  1. Replies: 19
    Last Post: 13th May 2013, 12:17
  2. play a video from youtube
    By graciano in forum Qt Programming
    Replies: 2
    Last Post: 13th July 2011, 08:17
  3. Video play issue
    By baluk in forum Newbie
    Replies: 3
    Last Post: 4th December 2010, 14:43
  4. How to reverse play a video with phonon
    By Markus in forum Qt Programming
    Replies: 1
    Last Post: 19th July 2010, 07:48
  5. Play video in QT4 application
    By carlosmele in forum Qt Programming
    Replies: 3
    Last Post: 14th April 2009, 23:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.