moved res and divisor into pipeline in ui

-- added handling of divisor and res in socket handler 
-- moved pipeline to be index -1 in ui
-- removed driver mode object
This commit is contained in:
ori agranat
2019-11-30 19:24:03 +02:00
parent 9efb6373a6
commit 5fe728751d
9 changed files with 55 additions and 122 deletions

View File

@@ -4,6 +4,9 @@
<CVslider name="Brightness" v-model="value.brightness" :min="0" :max="100" @input="handleData('brightness')"/>
<CVselect name="Orientation" v-model="value.rotationMode" :list="['Normal','90° CW','180°','90° CCW']"
@input="handleData('rotationMode')"/>
<CVselect name="Resolution" v-model="value.VideoModeIndex" :list="resolutionList" @input="handleData('VideoModeIndex')"/>
<CVselect name="Stream Resolution" v-model="value.streamDivisor"
:list="streamResolutionList" @input="handleData('streamDivisor')"/>
</div>
</template>
@@ -30,7 +33,29 @@
a: 1
}
},
computed: {}
computed: {
resolutionList: {
get() {
let tmp_list = [];
for (let i of this.$store.state.resolutionList) {
tmp_list.push(`${i['width']} X ${i['height']} at ${i['fps']} FPS, ${i['pixelFormat']}`)
}
return tmp_list;
}
},
streamResolutionList: {
get() {
let cam_res = this.$store.state.resolutionList[this.value.VideoModeIndex];
let tmp_list = [];
let x = 1;
for (let i = 0; i < 4; i++) {
tmp_list.push(`${cam_res['width'] / x} X ${cam_res['height'] / x}`);
x *= 2;
}
return tmp_list;
}
}
}
}
</script>