From a43f3d7b8d7a1d7649fc43adeb1246c1fac934be Mon Sep 17 00:00:00 2001 From: Nicholas Young Date: Fri, 25 Oct 2024 18:57:39 -0700 Subject: [PATCH] fixed build errors --- build.zig | 6 +++--- src/main.zig | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index 867a0e9..09e1bd2 100644 --- a/build.zig +++ b/build.zig @@ -63,9 +63,9 @@ pub fn build(b: *std.Build) void { exe.root_module.addImport("gst", gobject.module("gst1")); exe.root_module.addImport("gstapp", gobject.module("gstapp1")); - // exe.addIncludePath(.{ .cwd_relative = "/usr/include/hailo" }); - // exe.addLibraryPath(.{ .cwd_relative = "/home/nixolas/Documents/hailort/build/hailort/libhailort/src"}); - // exe.linkSystemLibrary("hailort"); + exe.addIncludePath(.{ .cwd_relative = "/usr/include/hailo" }); + exe.addLibraryPath(.{ .cwd_relative = "/home/nixolas/Documents/hailort/build/hailort/libhailort/src"}); + exe.linkSystemLibrary("hailort"); diff --git a/src/main.zig b/src/main.zig index e814d6b..6b78387 100644 --- a/src/main.zig +++ b/src/main.zig @@ -129,7 +129,8 @@ pub fn main() !void { const sample = sink.pullSample() orelse unreachable; const buffer: *gst.Buffer = sample.getBuffer() orelse unreachable; - buffer.extract(0, input_data, input_frame_size); + const buf_ret = buffer.extract(0, @ptrCast(input_data), input_frame_size); + std.debug.print("Buffer extract returned: '{d}'\n", .{ buf_ret });