Skip to content

fix compiling VideoIO with JuliaC#452

Merged
bjarthur merged 3 commits into
JuliaIO:masterfrom
bjarthur:bja/juliac
May 4, 2026
Merged

fix compiling VideoIO with JuliaC#452
bjarthur merged 3 commits into
JuliaIO:masterfrom
bjarthur:bja/juliac

Conversation

@bjarthur
Copy link
Copy Markdown
Member

here is a minimal working example for which compilation fails:

module FFMPEGTest

using VideoIO

(@main)(args) = return 0

end # module FFMPEGTest

]generate FFMPEGTest and put the above in src/FFMPEGTest.jl.

then ]app add JuliaC@0.2.3

finally ~/.julia/bin/juliac --output-exe foo --bundle build FFMPEGTest

all sort of errors result. this PR fixes it.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.45%. Comparing base (c8f9b00) to head (22eb67a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #452      +/-   ##
==========================================
- Coverage   80.05%   79.45%   -0.61%     
==========================================
  Files          10       10              
  Lines        1499     1499              
==========================================
- Hits         1200     1191       -9     
- Misses        299      308       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread lib/libffmpeg.jl Outdated
Comment on lines 14018 to 14043
const AMF_SURFACE_FORMAT = Cint

AMF_SURFACE_UNKNOWN = 0
AMF_SURFACE_NV12 = 1
AMF_SURFACE_YV12 = 2
AMF_SURFACE_BGRA = 3
AMF_SURFACE_ARGB = 4
AMF_SURFACE_RGBA = 5
AMF_SURFACE_GRAY8 = 6
AMF_SURFACE_YUV420P = 7
AMF_SURFACE_U8V8 = 8
AMF_SURFACE_YUY2 = 9
AMF_SURFACE_P010 = 10
AMF_SURFACE_RGBA_F16 = 11
AMF_SURFACE_UYVY = 12
AMF_SURFACE_R10G10B10A2 = 13
AMF_SURFACE_Y210 = 14
AMF_SURFACE_AYUV = 15
AMF_SURFACE_Y410 = 16
AMF_SURFACE_Y416 = 17
AMF_SURFACE_GRAY9 = 18
AMF_SURFACE_GRAY10 = 19
AMF_SURFACE_GRAY12 = 20
AMF_SURFACE_GRAY14 = 21
AMF_SURFACE_GRAY16 = 22

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like these should be enums, not (non-const) globals

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, enum is a thing in Julia: https://docs.julialang.org/en/v1/base/base/#Base.Enums.@enum

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh! yes. just changed it to conform to how clang handles enums elsewhere in this file. e.g. https://github.com/JuliaIO/VideoIO.jl/blob/master/lib/libffmpeg.jl#L143-L155

@bjarthur bjarthur merged commit e4de8ff into JuliaIO:master May 4, 2026
17 of 18 checks passed
@bjarthur bjarthur deleted the bja/juliac branch May 4, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants