Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from SnoopPrecompile to PrecompileTools #399

Merged
merged 1 commit into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"

[compat]
ColorTypes = "0.9, 0.10, 0.11"
Expand All @@ -24,5 +24,5 @@ Glob = "1.2"
ImageCore = "0.8, 0.9"
ProgressMeter = "1.2"
Requires = "1.0"
SnoopPrecompile = "1"
PrecompileTools = "1"
julia = "1.6"
6 changes: 3 additions & 3 deletions src/VideoIO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Requires, Dates, ProgressMeter
using ImageCore: channelview, rawview
using ColorTypes: RGB, Gray, N0f8, N6f10, YCbCr, Normed, red, green, blue
using FileIO: File
using SnoopPrecompile
using PrecompileTools

using Base: fieldindex, RefValue, cconvert
using Base.GC: @preserve
Expand Down Expand Up @@ -194,9 +194,9 @@ function __init__()
end
end

@precompile_setup begin
@setup_workload begin
imgstack = map(_->rand(UInt8, 10, 10), 1:10)
@precompile_all_calls begin
@compile_workload begin
loglevel!(libffmpeg.AV_LOG_FATAL) # Silence precompilation process
fname = string(tempname(), ".mp4")
VideoIO.save(fname, imgstack)
Expand Down