use of com.att.aro.core.IVideoBestPractices in project VideoOptimzer by attdevsupport.
the class StartupDelayDialog method launchStartupCalculations.
/**
* @param startupTime
*/
public void launchStartupCalculations(double startupTime) {
try {
if (startupTime >= segmentChosen.getVideoEvent().getEndTS() && segmentChosen.isSelected()) {
if (videoStreamStartup != null) {
videoStreamStartup.setValidationStartup(ValidationStartup.USER);
}
if (!allUserEventList.isEmpty()) {
segmentChosen.getVideoEvent().setPlayRequestedTime(Double.valueOf(playRequestedTime.getText()));
videoStream.setPlayRequestedTime(Double.valueOf(playRequestedTime.getText()));
}
saveStartupDelay(startupTime, segmentChosen.getVideoEvent(), videoStream, userEventChosen);
videoSegmentAnalyzer.applyStartupDelayToStream(startupTime, segmentChosen.getVideoEvent(), videoStream, streamingVideoData);
AROTraceData aroTraceData = mainFrame.getController().getTheModel();
IVideoBestPractices videoBestPractices = ContextAware.getAROConfigContext().getBean(IVideoBestPractices.class);
videoBestPractices.analyze(aroTraceData);
getGraphPanel().setTraceData(aroTraceData);
VideoManifestPanel videoManifestPanel = segmentTablePanel.getVideoManifestPanel();
videoManifestPanel.refresh(segmentTablePanel.getAnalyzerResult());
mainFrame.refreshBestPracticesTab();
destroy();
}
} catch (Exception ex) {
LOG.error("Error generating video chunk and buffer plots", ex);
MessageDialogFactory.showMessageDialog(parentPanel, "Error in drawing buffer graphs", "Failed to generate buffer plots", JOptionPane.ERROR_MESSAGE);
}
}
use of com.att.aro.core.IVideoBestPractices in project VideoOptimzer by attdevsupport.
the class SliderDialogBox method getSetButtonListener.
public ActionListener getSetButtonListener(final VideoChunksPlot vcPlot) {
return new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
ComboManifest comboBoxItem = (ComboManifest) jcb.getSelectedItem();
if (segmentChosen != null && segmentChosen.isSelected && (comboBoxItem.getVideoStream() != null)) {
dispose();
try {
LOGGER.info("startTimeField :" + startTimeField.getText());
setStartTime(Double.valueOf(startTimeField.getText()));
} catch (NumberFormatException e1) {
// covers user entered bad data, just go with getStartTime()
}
try {
if (getStartTime() >= segmentChosen.getVideoEvent().getEndTS() && segmentChosen.isSelected) {
ComboManifest selectedStream = (ComboManifest) jcb.getSelectedItem();
if (selectedStream.getVideoStream() != null) {
VideoStream videoStream = selectedStream.getVideoStream();
segmentChosen.getVideoEvent().setPlayTime(getStartTime());
videoStream.getManifest().setDelay(getStartTime() - segmentChosen.getVideoEvent().getEndTS());
videoStream.getManifest().setStartupVideoEvent(segmentChosen.getVideoEvent());
videoStream.getManifest().setStartupDelay(segmentChosen.getVideoEvent().getSegmentStartTime() - videoStream.getManifest().getRequestTime());
LOGGER.info(String.format("Segment playTime = %.03f", segmentChosen.getVideoEvent().getPlayTime()));
startTimeField.setText(String.format("%.03f", segmentChosen.getVideoEvent().getPlayTime()));
revalidate();
for (VideoStream stream : streamingVideoData.getVideoStreamMap().values()) {
if (stream.equals(videoStream)) {
stream.setSelected(true);
} else {
stream.setSelected(false);
}
}
} else {
for (VideoStream stream : streamingVideoData.getVideoStreamMap().values()) {
if (stream.isSelected()) {
stream.getManifest().setDelay(getStartTime() - segmentChosen.getVideoEvent().getEndTS());
}
}
}
AROTraceData aroTraceData = mainFrame.getController().getTheModel();
streamingVideoData.scanVideoStreams();
IVideoBestPractices videoBestPractices = ContextAware.getAROConfigContext().getBean(IVideoBestPractices.class);
videoBestPractices.analyze(aroTraceData);
mainFrame.getDiagnosticTab().getGraphPanel().refresh(aroTraceData);
getGraphPanel().setTraceData(aroTraceData);
AROTraceData traceData = vcPlot.refreshPlot(getGraphPanel().getSubplotMap().get(ChartPlotOptions.VIDEO_CHUNKS).getPlot(), getGraphPanel().getTraceData(), getStartTime(), segmentChosen.getVideoEvent());
getGraphPanel().setTraceData(traceData);
mainFrame.getVideoTab().refresh(traceData);
}
} catch (Exception ex) {
LOGGER.error("Error generating video chunk and buffer plots", ex);
MessageDialogFactory.showMessageDialog(parentPanel, "Error in drawing buffer graphs", "Failed to generate buffer plots", JOptionPane.ERROR_MESSAGE);
}
} else {
showWarningMessage();
}
}
};
}
use of com.att.aro.core.IVideoBestPractices in project VideoOptimzer by attdevsupport.
the class AROController method analyzeVideoBP.
private void analyzeVideoBP() {
ApplicationContext context = SpringContextUtil.getInstance().getContext();
IVideoBestPractices videoBestPractices = context.getBean(IVideoBestPractices.class);
AROTraceData traceData = getTheModel();
videoBestPractices.analyze(traceData);
theView.showChartItems(HIDE_SHOW_CHARTPLOTOPTIONS);
theView.refresh();
}
Aggregations