Skip to content

Commit

Permalink
Rework manifest parsing and general fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-ferrand committed Sep 26, 2022
1 parent 563c8a7 commit 17cfee1
Show file tree
Hide file tree
Showing 25 changed files with 1,229 additions and 237 deletions.
27 changes: 17 additions & 10 deletions src/main/java/com/blazemeter/jmeter/hls/gui/HlsSamplerGui.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.blazemeter.jmeter.hls.gui;

import com.blazemeter.jmeter.hls.logic.BandwidthSelector;
import com.blazemeter.jmeter.hls.logic.HlsSampler;
import com.blazemeter.jmeter.hls.logic.ResolutionSelector;
import com.blazemeter.jmeter.videostreaming.core.Protocol;
import com.google.common.annotations.VisibleForTesting;
import java.awt.BorderLayout;
Expand Down Expand Up @@ -50,12 +48,18 @@ public void configure(TestElement el) {
hlsSamplerPanel.setMasterUrl(sampler.getMasterUrl());
hlsSamplerPanel.setPlayVideoDuration(sampler.isPlayVideoDuration());
hlsSamplerPanel.setPlaySeconds(sampler.getPlaySeconds());
hlsSamplerPanel.setAudioLanguageOptions(sampler.getAudioLanguageOptions());
hlsSamplerPanel.setAudioLanguage(sampler.getAudioLanguage());
hlsSamplerPanel.setSubtitleOptions(sampler.getSubtitleOptions());
hlsSamplerPanel.setSubtitleLanguage(sampler.getSubtitleLanguage());
hlsSamplerPanel.setBandwidthSelector(sampler.getBandwidthSelector());
hlsSamplerPanel.setResolutionSelector(sampler.getResolutionSelector());
hlsSamplerPanel.setBandwidthOptions(sampler.getBandwidthOptions());
hlsSamplerPanel.setBandwidthSelected(sampler.getBandwidthSelected());
hlsSamplerPanel.setResolutionOptions(sampler.getResolutionOptions());
hlsSamplerPanel.setResolutionSelected(sampler.getResolutionSelected());
hlsSamplerPanel.setResumeStatus(sampler.getResumeVideoStatus());
hlsSamplerPanel.setIncludeTypeInHeaders(sampler.getIncludeTypeInHeadersStatus());
hlsSamplerPanel.setProtocolSelector(sampler.getProtocolSelector());
hlsSamplerPanel.setVariantsProvider(sampler);
}

@Override
Expand All @@ -66,11 +70,16 @@ public void modifyTestElement(TestElement s) {
sampler.setMasterUrl(hlsSamplerPanel.getMasterUrl());
sampler.setPlayVideoDuration(hlsSamplerPanel.isPlayVideoDuration());
sampler.setPlaySeconds(hlsSamplerPanel.getPlaySeconds());
sampler.setAudioLanguageOptions(hlsSamplerPanel.getAudioLanguageOptions());
sampler.setAudioLanguage(hlsSamplerPanel.getAudioLanguage());
sampler.setSubtitleOptions(hlsSamplerPanel.getSubtitleOptions());
sampler.setSubtitleLanguage(hlsSamplerPanel.getSubtitleLanguage());
sampler.setBandwidthSelector(hlsSamplerPanel.getBandwidthSelector());
sampler.setResolutionSelector(hlsSamplerPanel.getResolutionSelector());
sampler.setBandwidthOptions(hlsSamplerPanel.getBandwidthOptions());
sampler.setBandwidthSelected(hlsSamplerPanel.getBandwidthSelected());
sampler.setResolutionOptions(hlsSamplerPanel.getResolutionOptions());
sampler.setResolutionSelected(hlsSamplerPanel.getResolutionSelected());
sampler.setResumeVideoStatus(hlsSamplerPanel.getResumeVideoStatus());
sampler.setIncludeTypeInHeadersStatus(hlsSamplerPanel.getIncludeTypeInHeadersStatus());
sampler.setProtocolSelector(hlsSamplerPanel.getProtocolSelector());
}
}
Expand All @@ -79,13 +88,11 @@ public void modifyTestElement(TestElement s) {
public void clearGui() {
super.clearGui();
hlsSamplerPanel.setMasterUrl("");
hlsSamplerPanel.setDefaultForAllBoxes();
hlsSamplerPanel.setPlayVideoDuration(false);
hlsSamplerPanel.setPlaySeconds("");
hlsSamplerPanel.setAudioLanguage("");
hlsSamplerPanel.setSubtitleLanguage("");
hlsSamplerPanel.setBandwidthSelector(BandwidthSelector.MIN);
hlsSamplerPanel.setResolutionSelector(ResolutionSelector.MIN);
hlsSamplerPanel.setResumeStatus(false);
hlsSamplerPanel.setIncludeTypeInHeaders(false);
hlsSamplerPanel.setProtocolSelector(Protocol.AUTOMATIC);
}

Expand Down
Loading

0 comments on commit 17cfee1

Please sign in to comment.