|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
#include "ServiceBroker.h"#include "cores/DataCacheCore.h"#include "cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h"#include "cores/VideoPlayer/DVDMessage.h"#include "cores/VideoPlayer/DVDMessageQueue.h"#include "cores/VideoPlayer/DVDStreamInfo.h"#include "cores/VideoPlayer/Interface/TimingConstants.h"#include "cores/VideoPlayer/LiveGeometryMonitor.h"#include "cores/VideoPlayer/Process/ProcessInfo.h"#include "cores/VideoSettings.h"#include "settings/Settings.h"#include "settings/SettingsComponent.h"#include "test/TestUtils.h"#include <algorithm>#include <ctime>#include <memory>#include <optional>#include <string>#include <vector>#include <gtest/gtest.h>Functions | |
| TEST_F (TestLiveGeometryMonitor, ALetterboxedFrameIsServedAsItsRatio) | |
| TEST_F (TestLiveGeometryMonitor, AHalfSideBySideViewIsReadAtItsOwnPixelAspect) | |
| TEST_F (TestLiveGeometryMonitor, NothingIsReadDuringTrickPlay) | |
| Trick play scrubs across the timeline, and the shape must not chase it. | |
| TEST_F (TestLiveGeometryMonitor, NothingIsReadWhileTheViewerHasLiveDetectionOff) | |
| TEST_F (TestLiveGeometryMonitor, NothingIsReadWhileADeclaredRatioPinsTheShape) | |
| TEST_F (TestLiveGeometryMonitor, TheShapeInForceIsStampedOnEveryPicture) | |
| TEST_F (TestLiveGeometryMonitor, AResolutionChangeWithdrawsWhatTheOldStreamServed) | |
| TEST_F (TestLiveGeometryMonitor, ADisplayAspectChangeAtTheSameSizeReadsTheNewPixelAspect) | |
| TEST_F | ( | TestLiveGeometryMonitor | , |
| ADisplayAspectChangeAtTheSameSizeReadsTheNewPixelAspect | ) |
An SD broadcast switches between 16:9 and 4:3 at the same 720x576 coded size, so only the display aspect says the pixels changed shape. A 2.40 picture in the 4:3 frame is 720x320; read at the 16:9 frame's pixel aspect it would be 3.20, which no real ratio is.
| TEST_F | ( | TestLiveGeometryMonitor | , |
| AHalfSideBySideViewIsReadAtItsOwnPixelAspect | ) |
On a half side-by-side frame the region measured is one 960-wide view, displayed at the whole frame's 16:9, so its pixels are twice as wide and a 960x816 picture in it is 2.35, not 1.18.
| TEST_F | ( | TestLiveGeometryMonitor | , |
| ALetterboxedFrameIsServedAsItsRatio | ) |
The baseline, and the proof that the harness reads a frame at all: a plainly letterboxed 16:9 frame with square pixels is served as the scope shape it is.
| TEST_F | ( | TestLiveGeometryMonitor | , |
| AResolutionChangeWithdrawsWhatTheOldStreamServed | ) |
A shape is measured against the frame it was found in, so when the frame changes underneath it - a resolution switch, or a stereoscopic stream changing packing - what was served stops describing anything. It has to be withdrawn rather than left standing until a new reading happens to replace it, because in between it is driving the room to the old stream's shape.
| TEST_F | ( | TestLiveGeometryMonitor | , |
| NothingIsReadDuringTrickPlay | ) |
Trick play scrubs across the timeline, and the shape must not chase it.
| TEST_F | ( | TestLiveGeometryMonitor | , |
| NothingIsReadWhileADeclaredRatioPinsTheShape | ) |
A ratio declared by hand outranks every measurement, so a reading could not change what is served - and taking one anyway spends a frame access on a value nothing will look at.
| TEST_F | ( | TestLiveGeometryMonitor | , |
| NothingIsReadWhileTheViewerHasLiveDetectionOff | ) |
The stream permits reading and the viewer has said not to. Distinct from the hint above: that one is a property of the item, this one is the setting behind the whole feature, and it is read on a cadence rather than at the call - so what is being pinned is that opening a stream forces the read rather than inheriting whatever the last title left behind.
| TEST_F | ( | TestLiveGeometryMonitor | , |
| TheShapeInForceIsStampedOnEveryPicture | ) |
A shape once served is stamped onto every picture that follows it, including the ones no reading was taken from - that is what carries it to the renderer.