| 72 | } |
| 73 | |
| 74 | PlotModel::Point |
| 75 | BitratePlotModel::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 | |
| 104 | QString |
| 105 | BitratePlotModel::getPointInfo(unsigned streamIndex, unsigned plotIndex, unsigned pointIndex) const |
nothing calls this directly
no test coverage detected