Difference between revisions of "Video pipeline"

From MythTV Official Wiki
Jump to: navigation, search
m
(Work in progress)
Line 5: Line 5:
 
There are checks in many places to do different things depending on the type.
 
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.  
 
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. TV::PlaybackLoop caters for the possibility of multiple videos playing at the same time. This is support for PIP (Picture in Picture). For each video playing there is a PlayerContext object which in turn contains a pointer to a MythPlayer object. The PlayerContext keeps track of PIP status and the MythPlayer does the actual playing.
 +
 +
To Be continued ...
  
 
== Video Decode ==
 
== Video Decode ==

Revision as of 00:05, 17 June 2017

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. TV::PlaybackLoop caters for the possibility of multiple videos playing at the same time. This is support for PIP (Picture in Picture). For each video playing there is a PlayerContext object which in turn contains a pointer to a MythPlayer object. The PlayerContext keeps track of PIP status and the MythPlayer does the actual playing.

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?