Skip to content

Commit 835b79b

Browse files
committed
wip: video player
1 parent 4286522 commit 835b79b

File tree

12 files changed

+2106
-205
lines changed

12 files changed

+2106
-205
lines changed

dhall/sourceTreeParts.dhall

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ let render = let dir = "./src" in sourceTreePart::{
325325
] : List Text
326326
}
327327
}
328-
let sdl2mpv = let dir = "./sdl2_mpv" in sourceTreePart::{
328+
let sdl3mpv = let dir = "./sdl3_mpv" in sourceTreePart::{
329329
, name = "render"
330330
, dir = dir
331331
, includeDirs = {
@@ -335,6 +335,8 @@ let sdl2mpv = let dir = "./sdl2_mpv" in sourceTreePart::{
335335
}
336336
, sources = [
337337
, "${dir}/main.cpp"
338+
, "${dir}/events.cpp"
339+
, "${dir}/app.cpp"
338340
]
339341
, cxxflags = {
340342
, global = [
@@ -904,6 +906,6 @@ in
904906
, tracyEnabled
905907
, tracyDisabled
906908
, sdl3
907-
, sdl2mpv
909+
, sdl3mpv
908910
, mpv
909911
}

video_player/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set(CMAKE_CXX_COMPILER clang++)
77

88
add_compile_definitions()
99
include_directories("${CMAKE_CURRENT_LIST_DIR}/./contrib/sdl3/include"
10+
"${CMAKE_CURRENT_LIST_DIR}/./contrib/flatbuffers"
1011
"${CMAKE_CURRENT_LIST_DIR}/./contrib/tracy/public")
1112
set(COMPILE_OPTIONS -std=c++20
1213
-fno-exceptions
@@ -15,11 +16,14 @@ link_libraries(-DNDEBUG
1516
-lmpv)
1617

1718

18-
add_library(render OBJECT "${CMAKE_CURRENT_LIST_DIR}/./sdl2_mpv/main.cpp")
19+
add_library(render OBJECT "${CMAKE_CURRENT_LIST_DIR}/./sdl3_mpv/main.cpp"
20+
"${CMAKE_CURRENT_LIST_DIR}/./sdl3_mpv/events.cpp"
21+
"${CMAKE_CURRENT_LIST_DIR}/./sdl3_mpv/app.cpp")
1922

2023
add_library(mpv_imported OBJECT IMPORTED)
2124
set_property(TARGET mpv_imported PROPERTY IMPORTED_OBJECTS "${CMAKE_CURRENT_LIST_DIR}/./contrib/sdl3/build/libSDL3.a")
2225

26+
2327
add_library(tracyDisabled OBJECT "${CMAKE_CURRENT_LIST_DIR}/./contrib/tracy/public/TracyClient.cpp")
2428
add_executable(imzero_video_play $<TARGET_OBJECTS:render>
2529
$<TARGET_OBJECTS:mpv_imported>

video_player/build_cpp.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ set -ev
33
here=$(dirname "$(readlink -f "$BASH_SOURCE")")
44
cd "$here"
55

6+
source env.sh
7+
8+
flatc="../../contrib/flatbuffers/flatc"
9+
"$flatc" -o src --cpp spec/userInteraction.fbs
10+
611
./cmakelists.dhall
712

813
generate_buildinfo() {

video_player/common.dhall

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ let asan = False
55
let sourceTreePartsRepo = ../dhall/sourceTreeParts.dhall
66
let sourceTreeParts = [
77
, sourceTreePartsRepo.sdl3
8-
, sourceTreePartsRepo.sdl2mpv
8+
, sourceTreePartsRepo.sdl3mpv
99
, sourceTreePartsRepo.mpv
10+
, sourceTreePartsRepo.flatbuffers
1011
] # (if debug then [ , sourceTreePartsRepo.tracyEnabled ] else [ ,sourceTreePartsRepo.tracyDisabled ] : List lib.sourceTreePart.Type )
1112
--let cxx = "${clangdir}/bin/clang++"
1213
let cxx = "clang++"

video_player/sdl2_mpv/main.cpp

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)