Search in sources :

Example 1 with XYPair

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);
}
Also used : XYPair(com.att.aro.core.videoanalysis.XYPair)

Example 2 with XYPair

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;
}
Also used : XYPair(com.att.aro.core.videoanalysis.XYPair)

Example 3 with XYPair

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();
}
Also used : VideoStream(com.att.aro.core.videoanalysis.pojo.VideoStream) XYPair(com.att.aro.core.videoanalysis.XYPair)

Example 4 with XYPair

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);
}
Also used : XYSeries(org.jfree.data.xy.XYSeries) VideoStream(com.att.aro.core.videoanalysis.pojo.VideoStream) BufferTimeBPResult(com.att.aro.core.packetanalysis.pojo.BufferTimeBPResult) XYPair(com.att.aro.core.videoanalysis.XYPair)

Example 5 with XYPair

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);
}
Also used : XYSeries(org.jfree.data.xy.XYSeries) BasicStroke(java.awt.BasicStroke) BufferOccupancyBPResult(com.att.aro.core.packetanalysis.pojo.BufferOccupancyBPResult) StandardXYItemRenderer(org.jfree.chart.renderer.xy.StandardXYItemRenderer) VideoStream(com.att.aro.core.videoanalysis.pojo.VideoStream) StandardXYItemRenderer(org.jfree.chart.renderer.xy.StandardXYItemRenderer) XYItemRenderer(org.jfree.chart.renderer.xy.XYItemRenderer) XYPair(com.att.aro.core.videoanalysis.XYPair)

Aggregations

XYPair (com.att.aro.core.videoanalysis.XYPair)5 VideoStream (com.att.aro.core.videoanalysis.pojo.VideoStream)3 XYSeries (org.jfree.data.xy.XYSeries)2 BufferOccupancyBPResult (com.att.aro.core.packetanalysis.pojo.BufferOccupancyBPResult)1 BufferTimeBPResult (com.att.aro.core.packetanalysis.pojo.BufferTimeBPResult)1 BasicStroke (java.awt.BasicStroke)1 StandardXYItemRenderer (org.jfree.chart.renderer.xy.StandardXYItemRenderer)1 XYItemRenderer (org.jfree.chart.renderer.xy.XYItemRenderer)1