-
Notifications
You must be signed in to change notification settings - Fork 8
/
dovi_tool.rb
42 lines (36 loc) · 1.12 KB
/
dovi_tool.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class DoviTool < Formula
desc "CLI tool for Dolby Vision metadata on video streams"
homepage "https://github.com/quietvoid/dovi_tool/"
url "https://github.com/quietvoid/dovi_tool/archive/refs/tags/2.1.2.tar.gz"
sha256 "a905a8ddb47583d3d9a7571a736a44c76f3ebf0b5838aa01d401f5715825785a"
license "MIT"
head "https://github.com/quietvoid/dovi_tool.git", branch: "main"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
depends_on "cargo-c" => :build
depends_on "rust" => :build
on_linux do
depends_on "pkg-config" => :build
depends_on "fontconfig"
end
def install
system "cargo", "install", *std_cargo_args
pkgshare.install "assets"
cd "dolby_vision" do
system "cargo", "cinstall", "--prefix", prefix
end
end
test do
output = shell_output("#{bin}/dovi_tool info #{pkgshare}/assets/hevc_tests/regular_rpu.bin --frame 0")
assert_match <<~EOS, output
Parsing RPU file...
{
"dovi_profile": 8,
"header": {
"rpu_nal_prefix": 25,
EOS
assert_match "dovi_tool #{version}", shell_output("#{bin}/dovi_tool --version")
end
end