Video pipeline

From MythTV Official Wiki
Revision as of 02:37, 17 June 2017 by Pgbennett (talk | contribs)

Jump to: navigation, search

The video playback mechanism in MythTV uses a common path for all of the types:

  • Recording playback.
  • Live TV.
  • Video playback.

There are checks in many places to do different things depending on the type. Live TV is just a recording and simultaneous playback, but does have many nuances for features such as channel changing and moving from one program to the next.

Logic Flow

Recording playback is invoked from the recording list window, which is themed at recordings-ui.xml. The window name is watchrecordings and it is implemented in class PlaybackBox in file programs/mythfrontend/playbackbox.cpp. The PlaybackBox::Play method calls the TV class to perform the playback.

In the case of watching videos playback is initiated from the Video list window, which is themed at video-ui.xml. The class name is VideoDialog and is implemented in mythfrontend/videodlg.cpp. The window name varies depending on which view is being used. The logic ultimately lands up in the TV class as well.

Playback is controlled by the TV class, which is implemented in libmythtv/tv_play.cpp. Do not be confused by the class name. Although the class is called TV it is used in Videos, Recordings and Live TV playback.

Each time a new playback is started, there is a new TV object created for it. A static method TV::StartTV calls static method TV::GetTV which creates the object. The TV::StartTV method is invoked when you start to play a video or recording and control remains in that method until the playback is done. Although it is called StartTV it handles Starting, playing and ending of the playback.

The TV::StartTV method calls TV::PlaybackLoop on the newly created TV object.

To Be continued ...

Video Decode

- Describe how we decode a frame

Video Deinterlace

- How do we deinterlace frame(s)

Video Ouput

- How those frames then get to the display

Video Painters

- What does the video painter do?

Video Renderers

- What does the video renderer do?