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

Remove need of redundant argument ffmpeg #408

Merged
merged 2 commits into from
Oct 13, 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
11 changes: 7 additions & 4 deletions src/VideoIO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
include("avio.jl")
include("encoding.jl")
include("testvideos.jl")

include("deprecations.jl")

using .TestVideos

if Sys.islinux()
Expand All @@ -56,7 +59,7 @@
end
elseif Sys.iswindows()
function init_camera_devices()
append!(CAMERA_DEVICES, get_camera_devices(ffmpeg, "dshow", "dummy"))
append!(CAMERA_DEVICES, get_camera_devices("dshow", "dummy"))

Check warning on line 62 in src/VideoIO.jl

View check run for this annotation

Codecov / codecov/patch

src/VideoIO.jl#L62

Added line #L62 was not covered by tests
return DEFAULT_CAMERA_FORMAT[] = libffmpeg.av_find_input_format("dshow")
end
function init_camera_settings()
Expand All @@ -66,11 +69,11 @@
elseif Sys.isapple()
function init_camera_devices()
try
append!(CAMERA_DEVICES, get_camera_devices(ffmpeg, "avfoundation", "\"\""))
append!(CAMERA_DEVICES, get_camera_devices("avfoundation", "\"\""))

Check warning on line 72 in src/VideoIO.jl

View check run for this annotation

Codecov / codecov/patch

src/VideoIO.jl#L72

Added line #L72 was not covered by tests
DEFAULT_CAMERA_FORMAT[] = libffmpeg.av_find_input_format("avfoundation")
catch
try
append!(CAMERA_DEVICES, get_camera_devices(ffmpeg, "qtkit", "\"\""))
append!(CAMERA_DEVICES, get_camera_devices("qtkit", "\"\""))

Check warning on line 76 in src/VideoIO.jl

View check run for this annotation

Codecov / codecov/patch

src/VideoIO.jl#L76

Added line #L76 was not covered by tests
DEFAULT_CAMERA_FORMAT[] = libffmpeg.av_find_input_format("qtkit")
catch
end
Expand All @@ -85,7 +88,7 @@
elseif Sys.isbsd()
# copied loosely from apple above - needs figuring out
function init_camera_devices()
append!(CAMERA_DEVICES, get_camera_devices(ffmpeg, "avfoundation", "\"\""))
append!(CAMERA_DEVICES, get_camera_devices("avfoundation", "\"\""))

Check warning on line 91 in src/VideoIO.jl

View check run for this annotation

Codecov / codecov/patch

src/VideoIO.jl#L91

Added line #L91 was not covered by tests
return DEFAULT_CAMERA_FORMAT[] = libffmpeg.av_find_input_format("avfoundation")
end
function init_camera_settings()
Expand Down
2 changes: 1 addition & 1 deletion src/avio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@
const DEFAULT_CAMERA_DEVICE = Ref{String}()
const DEFAULT_CAMERA_OPTIONS = AVDict()

function get_camera_devices(ffmpeg, idev, idev_name)
function get_camera_devices(idev, idev_name)

Check warning on line 1020 in src/avio.jl

View check run for this annotation

Codecov / codecov/patch

src/avio.jl#L1020

Added line #L1020 was not covered by tests
ashwani-rathee marked this conversation as resolved.
Show resolved Hide resolved
camera_devices = String[]

read_vid_devs = false
Expand Down
3 changes: 3 additions & 0 deletions src/deprecations.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# current deprecations

@deprecate get_camera_devices(ffmpeg, idev, idev_name) get_camera_devices(idev, idev_name)
Loading