Commit ad746e85 by Jonathan Thomas

Refactor profiles data into json file, format decimal FPS profiles correctly

parent 22ca61b8
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
<div class="mb-3"> <div class="mb-3">
<select v-model="selected_profile" @change="profileChanged" class="form-select" aria-label="Choose a profile..."> <select v-model="selected_profile" @change="profileChanged" class="form-select" aria-label="Choose a profile...">
<option value="" selected>Choose a profile...</option> <option value="" selected>Choose a profile...</option>
<option v-for="preset in presets" :key="preset.id" :value="preset.id"> <option v-for="profile in profiles" :key="profile.id" :value="profile.id">
{{ preset.width }}x{{ preset.height }} @ {{ preset.fps.toFixed(0) }}fps</option> {{ profile.width }}x{{ profile.height }} @ {{ profile.fps }}fps</option>
</select> </select>
</div> </div>
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
<script> <script>
import { mapActions, mapMutations, mapGetters } from 'vuex' import { mapActions, mapMutations, mapGetters } from 'vuex'
import { Modal } from "bootstrap" import { Modal } from "bootstrap"
import profiles from '../data/profiles.json'
export default { export default {
name: "Projects.vue", name: "Projects.vue",
...@@ -129,71 +130,12 @@ export default { ...@@ -129,71 +130,12 @@ export default {
project_height: 1080, project_height: 1080,
show_spinner: false, show_spinner: false,
selected_profile: 3031, selected_profile: 3031,
presets: [ profiles
{"id": 6061, "width": 3840, "height": 2160, "fps_num": 60, "fps_den": 1, "fps": 60.0},
{"id": 67001, "width": 3840, "height": 2160, "fps_num": 60000, "fps_den": 1001, "fps": 59.94005994005994},
{"id": 6051, "width": 3840, "height": 2160, "fps_num": 50, "fps_den": 1, "fps": 50.0},
{"id": 6031, "width": 3840, "height": 2160, "fps_num": 30, "fps_den": 1, "fps": 30.0},
{"id": 37001, "width": 3840, "height": 2160, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 6026, "width": 3840, "height": 2160, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 6025, "width": 3840, "height": 2160, "fps_num": 24, "fps_den": 1, "fps": 24.0},
{"id": 31001, "width": 3840, "height": 2160, "fps_num": 24000, "fps_den": 1001, "fps": 23.976023976023978},
{"id": 4061, "width": 2560, "height": 1440, "fps_num": 60, "fps_den": 1, "fps": 60.0},
{"id": 65001, "width": 2560, "height": 1440, "fps_num": 60000, "fps_den": 1001, "fps": 59.94005994005994},
{"id": 4051, "width": 2560, "height": 1440, "fps_num": 50, "fps_den": 1, "fps": 50.0},
{"id": 4031, "width": 2560, "height": 1440, "fps_num": 30, "fps_den": 1, "fps": 30.0},
{"id": 35001, "width": 2560, "height": 1440, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 4026, "width": 2560, "height": 1440, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 4025, "width": 2560, "height": 1440, "fps_num": 24, "fps_den": 1, "fps": 24.0},
{"id": 29001, "width": 2560, "height": 1440, "fps_num": 24000, "fps_den": 1001, "fps": 23.976023976023978},
{"id": 3061, "width": 1920, "height": 1080, "fps_num": 60, "fps_den": 1, "fps": 60.0},
{"id": 64001, "width": 1920, "height": 1080, "fps_num": 60000, "fps_den": 1001, "fps": 59.94005994005994},
{"id": 3051, "width": 1920, "height": 1080, "fps_num": 50, "fps_den": 1, "fps": 50.0},
{"id": 3031, "width": 1920, "height": 1080, "fps_num": 30, "fps_den": 1, "fps": 30.0},
{"id": 34001, "width": 1920, "height": 1080, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 3026, "width": 1920, "height": 1080, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 3025, "width": 1920, "height": 1080, "fps_num": 24, "fps_den": 1, "fps": 24.0},
{"id": 28001, "width": 1920, "height": 1080, "fps_num": 24000, "fps_den": 1001, "fps": 23.976023976023978},
{"id": 33521, "width": 1440, "height": 1080, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 2546, "width": 1440, "height": 1080, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 2061, "width": 1280, "height": 720, "fps_num": 60, "fps_den": 1, "fps": 60.0},
{"id": 63001, "width": 1280, "height": 720, "fps_num": 60000, "fps_den": 1001, "fps": 59.94005994005994},
{"id": 2051, "width": 1280, "height": 720, "fps_num": 50, "fps_den": 1, "fps": 50.0},
{"id": 2031, "width": 1280, "height": 720, "fps_num": 30, "fps_den": 1, "fps": 30.0},
{"id": 33001, "width": 1280, "height": 720, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 2026, "width": 1280, "height": 720, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 2025, "width": 1280, "height": 720, "fps_num": 24, "fps_den": 1, "fps": 24.0},
{"id": 27001, "width": 1280, "height": 720, "fps_num": 24000, "fps_den": 1001, "fps": 23.976023976023978},
{"id": 1626, "width": 1024, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 32335, "width": 854, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 1370, "width": 768, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 32201, "width": 720, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 32207, "width": 720, "height": 486, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 1322, "width": 720, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 26207, "width": 720, "height": 486, "fps_num": 24000, "fps_den": 1001, "fps": 23.976023976023978},
{"id": 32121, "width": 640, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 826, "width": 512, "height": 288, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 31961, "width": 480, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 1082, "width": 480, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 31667, "width": 426, "height": 240, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 698, "width": 384, "height": 288, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 31641, "width": 352, "height": 288, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 31833, "width": 352, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 31593, "width": 352, "height": 240, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 666, "width": 352, "height": 288, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 954, "width": 352, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 656, "width": 352, "height": 288, "fps_num": 15, "fps_den": 1, "fps": 15.0},
{"id": 31561, "width": 320, "height": 240, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 576, "width": 320, "height": 240, "fps_num": 15, "fps_den": 1, "fps": 15.0},
{"id": 31321, "width": 176, "height": 144, "fps_num": 30000, "fps_den": 1001, "fps": 29.97002997002997},
{"id": 346, "width": 176, "height": 144, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 336, "width": 176, "height": 144, "fps_num": 15, "fps_den": 1, "fps": 15.0}
]
} }
}, },
methods: { methods: {
profileChanged() { profileChanged() {
let profile_details = this.presets.filter(p => p.id == this.selected_profile)[0] let profile_details = this.profiles.filter(p => p.id == this.selected_profile)[0]
this.project_width = profile_details.width this.project_width = profile_details.width
this.project_height = profile_details.height this.project_height = profile_details.height
this.project_fps_num = profile_details.fps_num this.project_fps_num = profile_details.fps_num
......
[
{"id": 6061, "width": 3840, "height": 2160, "fps_num": 60, "fps_den": 1, "fps": 60.0},
{"id": 67001, "width": 3840, "height": 2160, "fps_num": 60000, "fps_den": 1001, "fps": 59.94},
{"id": 6051, "width": 3840, "height": 2160, "fps_num": 50, "fps_den": 1, "fps": 50.0},
{"id": 6031, "width": 3840, "height": 2160, "fps_num": 30, "fps_den": 1, "fps": 30.0},
{"id": 37001, "width": 3840, "height": 2160, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 6026, "width": 3840, "height": 2160, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 6025, "width": 3840, "height": 2160, "fps_num": 24, "fps_den": 1, "fps": 24.0},
{"id": 31001, "width": 3840, "height": 2160, "fps_num": 24000, "fps_den": 1001, "fps": 23.98},
{"id": 4061, "width": 2560, "height": 1440, "fps_num": 60, "fps_den": 1, "fps": 60.0},
{"id": 65001, "width": 2560, "height": 1440, "fps_num": 60000, "fps_den": 1001, "fps": 59.94},
{"id": 4051, "width": 2560, "height": 1440, "fps_num": 50, "fps_den": 1, "fps": 50.0},
{"id": 4031, "width": 2560, "height": 1440, "fps_num": 30, "fps_den": 1, "fps": 30.0},
{"id": 35001, "width": 2560, "height": 1440, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 4026, "width": 2560, "height": 1440, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 4025, "width": 2560, "height": 1440, "fps_num": 24, "fps_den": 1, "fps": 24.0},
{"id": 29001, "width": 2560, "height": 1440, "fps_num": 24000, "fps_den": 1001, "fps": 23.98},
{"id": 3061, "width": 1920, "height": 1080, "fps_num": 60, "fps_den": 1, "fps": 60.0},
{"id": 64001, "width": 1920, "height": 1080, "fps_num": 60000, "fps_den": 1001, "fps": 59.94},
{"id": 3051, "width": 1920, "height": 1080, "fps_num": 50, "fps_den": 1, "fps": 50.0},
{"id": 3031, "width": 1920, "height": 1080, "fps_num": 30, "fps_den": 1, "fps": 30.0},
{"id": 34001, "width": 1920, "height": 1080, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 3026, "width": 1920, "height": 1080, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 3025, "width": 1920, "height": 1080, "fps_num": 24, "fps_den": 1, "fps": 24.0},
{"id": 28001, "width": 1920, "height": 1080, "fps_num": 24000, "fps_den": 1001, "fps": 23.98},
{"id": 33521, "width": 1440, "height": 1080, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 2546, "width": 1440, "height": 1080, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 2061, "width": 1280, "height": 720, "fps_num": 60, "fps_den": 1, "fps": 60.0},
{"id": 63001, "width": 1280, "height": 720, "fps_num": 60000, "fps_den": 1001, "fps": 59.94},
{"id": 2051, "width": 1280, "height": 720, "fps_num": 50, "fps_den": 1, "fps": 50.0},
{"id": 2031, "width": 1280, "height": 720, "fps_num": 30, "fps_den": 1, "fps": 30.0},
{"id": 33001, "width": 1280, "height": 720, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 2026, "width": 1280, "height": 720, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 2025, "width": 1280, "height": 720, "fps_num": 24, "fps_den": 1, "fps": 24.0},
{"id": 27001, "width": 1280, "height": 720, "fps_num": 24000, "fps_den": 1001, "fps": 23.98},
{"id": 1626, "width": 1024, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 32335, "width": 854, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 1370, "width": 768, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 32201, "width": 720, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 32207, "width": 720, "height": 486, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 1322, "width": 720, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 26207, "width": 720, "height": 486, "fps_num": 24000, "fps_den": 1001, "fps": 23.98},
{"id": 32121, "width": 640, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 826, "width": 512, "height": 288, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 31961, "width": 480, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 1082, "width": 480, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 31667, "width": 426, "height": 240, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 698, "width": 384, "height": 288, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 31641, "width": 352, "height": 288, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 31833, "width": 352, "height": 480, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 31593, "width": 352, "height": 240, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 666, "width": 352, "height": 288, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 954, "width": 352, "height": 576, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 656, "width": 352, "height": 288, "fps_num": 15, "fps_den": 1, "fps": 15.0},
{"id": 31561, "width": 320, "height": 240, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 576, "width": 320, "height": 240, "fps_num": 15, "fps_den": 1, "fps": 15.0},
{"id": 31321, "width": 176, "height": 144, "fps_num": 30000, "fps_den": 1001, "fps": 29.97},
{"id": 346, "width": 176, "height": 144, "fps_num": 25, "fps_den": 1, "fps": 25.0},
{"id": 336, "width": 176, "height": 144, "fps_num": 15, "fps_den": 1, "fps": 15.0}
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment