MCPcopy Create free account
hub / github.com/IENT/YUView / getPlotPoint

Method getPlotPoint

YUViewLib/src/parser/common/BitratePlotModel.cpp:74–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74PlotModel::Point
75BitratePlotModel::getPlotPoint(unsigned streamIndex, unsigned plotIndex, unsigned pointIndex) const
76{
77 QMutexLocker locker(&this->dataMutex);
78
79 if (!this->dataPerStream.contains(streamIndex))
80 return {};
81
82 if (pointIndex < unsigned(this->dataPerStream[streamIndex].size()))
83 {
84 PlotModel::Point point;
85 if (this->sortMode == SortMode::DECODE_ORDER)
86 point.x = this->dataPerStream[streamIndex][pointIndex].dts;
87 else
88 point.x = this->dataPerStream[streamIndex][pointIndex].pts;
89 point.intra = this->dataPerStream[streamIndex][pointIndex].keyframe;
90
91 const auto isAveragePlot = (plotIndex == 1);
92 if (isAveragePlot)
93 point.y = this->calculateAverageValue(streamIndex, pointIndex);
94 else
95 point.y = this->dataPerStream[streamIndex][pointIndex].bitrate;
96 point.width = this->dataPerStream[streamIndex][pointIndex].duration;
97
98 return point;
99 }
100
101 return {};
102}
103
104QString
105BitratePlotModel::getPointInfo(unsigned streamIndex, unsigned plotIndex, unsigned pointIndex) const

Callers

nothing calls this directly

Calls 3

calculateAverageValueMethod · 0.95
containsMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected