use of com.att.aro.core.videoanalysis.XYPair in project VideoOptimzer by attdevsupport.
the class PlayTimeData method logPoint.
/**
* Outputs playTime chart points and playTimeToolTipPoints into videoStream
*
* @param event
* @param timestamp
* @param bufferVal
* @param status
*/
private void logPoint(VideoEvent event, double timestamp, Double bufferVal, StreamStatus status) {
cntr++;
LOG.debug(String.format("%s\t%d\t%.0f\t%.3f\t%.5f", status.toString(), cntr, event.getSegmentID(), timestamp, bufferVal));
playTimeList.add(new XYPair(timestamp, bufferVal));
videoStream.addPlayTimeToolTipPoint(event, bufferVal, status);
}
use of com.att.aro.core.videoanalysis.XYPair in project VideoOptimzer by attdevsupport.
the class VideoSegmentAnalyzer method addByteBufferPoints.
private Double addByteBufferPoints(Double buffer, VideoEvent event, double startTS, double delta) {
double buffer2 = buffer + delta;
byteBufferList.add(new XYPair(startTS, buffer));
byteBufferList.add(new XYPair(startTS, buffer2));
this.videoStream.addByteToolTipPoint(event, buffer);
this.videoStream.addByteToolTipPoint(event, buffer2);
return buffer2;
}
use of com.att.aro.core.videoanalysis.XYPair in project VideoOptimzer by attdevsupport.
the class VideoBufferPlot method calculateBufferProgress.
/*
* called by:
* -> VideoBufferPlot.VideoBufferPlot(AROTraceData, VideoStream)
* -> SegmentBufferGraphPanel.refresh(AROTraceData, VideoStream, JCheckBox, JCheckBox)
*/
public void calculateBufferProgress(AROTraceData aroTraceData) {
bufferProgressSeries.clear();
if (aroTraceData != null && aroTraceData.getAnalyzerResult().getStreamingVideoData() != null) {
for (VideoStream videoStream : aroTraceData.getAnalyzerResult().getStreamingVideoData().getVideoStreams()) {
if (videoStream.isSelected()) {
LOGGER.debug("VideoStream :" + videoStream.getManifest().getVideoName());
for (XYPair xy : videoStream.getPlayTimeList()) {
bufferProgressSeries.add(xy.getXVal(), xy.getYVal());
}
}
}
}
minYValue = bufferProgressSeries.getMinY();
maxYValue = bufferProgressSeries.getMaxY();
minXValue = bufferProgressSeries.getMinX();
maxXValue = bufferProgressSeries.getMaxX();
}
use of com.att.aro.core.videoanalysis.XYPair in project VideoOptimzer by attdevsupport.
the class BufferInSecondsPlot method populate.
@Override
public void populate(XYPlot plot, AROTraceData aroTraceData) {
seriesPlayTimeBufferCollection.removeAllSeries();
if (aroTraceData != null && aroTraceData.getAnalyzerResult().getStreamingVideoData() != null) {
bufferInSecondsCalculatorImpl.setStreamingVideoData(aroTraceData.getAnalyzerResult().getStreamingVideoData());
for (VideoStream videoStream : aroTraceData.getAnalyzerResult().getStreamingVideoData().getVideoStreams()) {
if (videoStream.isSelected()) {
this.videoStream = videoStream;
LOG.debug("VideoStream :" + videoStream.getManifest().getVideoName());
seriesPlayTimeBuffer = new XYSeries("Play Time Buffer");
double yPlotValue = 0.00;
for (XYPair xy : videoStream.getPlayTimeList()) {
yPlotValue = xy.getYVal();
bufferTimeList.add(yPlotValue);
seriesPlayTimeBuffer.add(xy.getXVal(), yPlotValue);
LOG.debug(String.format("%.3f\t%.0f", xy.getXVal(), yPlotValue));
}
Collections.sort(bufferTimeList);
seriesPlayTimeBufferCollection.addSeries(seriesPlayTimeBuffer);
LOG.debug(videoStream.getByteToolTipDetailMap());
}
}
BufferTimeBPResult bufferTimeResult = bufferInSecondsCalculatorImpl.updateBufferTimeResult(bufferTimeList);
aroTraceData.getAnalyzerResult().setBufferTimeResult(bufferTimeResult);
plot.setRenderer(createRenderer());
}
plot.setDataset(seriesPlayTimeBufferCollection);
}
use of com.att.aro.core.videoanalysis.XYPair in project VideoOptimzer by attdevsupport.
the class BufferOccupancyPlot method populate.
/*
* called by:
* -> VideoChunksPlot.refreshPlot(XYPlot, AROTraceData, double, VideoEvent)
*/
@Override
public void populate(XYPlot plot, AROTraceData analysis) {
if (analysis != null) {
streamingVideoData = analysis.getAnalyzerResult().getStreamingVideoData();
double maxBuffer = 0;
bufferFillDataCollection.removeAllSeries();
for (VideoStream videoStream : streamingVideoData.getVideoStreams()) {
if (videoStream.isSelected()) {
this.videoStream = videoStream;
LOG.debug("VideoStream :" + videoStream.getManifest().getVideoName());
seriesByteBuffer = new XYSeries("Byte Buffer");
ArrayList<XYPair> byteBufferList = videoStream.getByteBufferList();
double yPlotValue = 0.00;
for (XYPair xy : byteBufferList) {
yPlotValue = xy.getYVal();
if (maxBuffer < yPlotValue) {
maxBuffer = yPlotValue;
}
bufferSizeList.add(yPlotValue);
seriesByteBuffer.add(xy.getXVal(), yPlotValue);
}
Collections.sort(bufferSizeList);
bufferFillDataCollection.addSeries(seriesByteBuffer);
LOG.debug(videoStream.getByteToolTipDetailMap());
}
}
XYItemRenderer renderer = new StandardXYItemRenderer();
renderer.setBaseToolTipGenerator(toolTipGenerator());
renderer.setSeriesStroke(0, new BasicStroke(2.0f));
renderer.setSeriesPaint(0, Color.blue);
renderer.setSeriesShape(0, shape);
plot.setRenderer(renderer);
BufferOccupancyBPResult bufferOccupancyResult = bufferOccupancyCalculatorImpl.setMaxBuffer(maxBuffer);
bufferOccupancyResult.setBufferByteDataSet(bufferSizeList);
analysis.getAnalyzerResult().setBufferOccupancyResult(bufferOccupancyResult);
}
plot.setDataset(bufferFillDataCollection);
}
Aggregations