Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Jan 23, 2025
1 parent c2dd48a commit 162f432
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ReferenceTests/src/compare_media.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ end
rgbf_convert(x::AbstractMatrix{<:RGB}) = convert(Matrix{RGBf}, x)
rgbf_convert(x::AbstractMatrix{<:RGBA}) = convert(Matrix{RGBAf}, x)

# pulled from Makie so we don't need to include it
function extract_frames(video, frame_folder; loglevel="quiet")
path = joinpath(frame_folder, "frame%04d.png")
run(`$(FFMPEG_jll.ffmpeg()) -loglevel $(loglevel) -i $video -y $path`)
if @isdefined Makie
using Makie: extract_frames
else
# pulled from Makie so we don't need to include it
function extract_frames(video, frame_folder; loglevel="quiet")
path = joinpath(frame_folder, "frame%04d.png")
run(`$(FFMPEG_jll.ffmpeg()) -loglevel $(loglevel) -i $video -y $path`)
end
end

function get_frames(video::AbstractString)
Expand Down

0 comments on commit 162f432

Please sign in to comment.