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

Method getStreamParameter

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

Source from the content-addressed store, hash-verified

49}
50
51PlotModel::StreamParameter BitratePlotModel::getStreamParameter(unsigned streamIndex) const
52{
53 QMutexLocker locker(&this->dataMutex);
54
55 if (this->dataPerStream.contains(streamIndex))
56 {
57 PlotModel::StreamParameter streamParameter;
58 streamParameter.xRange.min = (sortMode == SortMode::DECODE_ORDER) ? double(this->rangeDts.min)
59 : double(this->rangePts.min);
60 streamParameter.xRange.max = (sortMode == SortMode::DECODE_ORDER) ? double(this->rangeDts.max)
61 : double(this->rangePts.max);
62 streamParameter.yRange.min = double(this->rangeBitratePerStream[streamIndex].min);
63 streamParameter.yRange.max = double(this->rangeBitratePerStream[streamIndex].max);
64
65 const auto nrPoints = unsigned(this->dataPerStream[streamIndex].size());
66 streamParameter.plotParameters.append({PlotType::Bar, nrPoints});
67 streamParameter.plotParameters.append({PlotType::Line, nrPoints});
68
69 return streamParameter;
70 }
71 return {};
72}
73
74PlotModel::Point
75BitratePlotModel::getPlotPoint(unsigned streamIndex, unsigned plotIndex, unsigned pointIndex) const

Callers

nothing calls this directly

Calls 3

containsMethod · 0.80
appendMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected