diff options
Diffstat (limited to 'src/video/hap.zig')
| -rw-r--r-- | src/video/hap.zig | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/video/hap.zig b/src/video/hap.zig index 70b194a..6cc8716 100644 --- a/src/video/hap.zig +++ b/src/video/hap.zig @@ -21,7 +21,10 @@ pub const HAPDecoder = struct { format: ?c.HapTextureFormat, gl_format: c.GLenum, - pub fn init(allocator: std.mem.Allocator, codec_par: c.AVCodecParameters) dec.Errors!*dec.Decoder { + pub fn init( + allocator: std.mem.Allocator, + codec_par: c.AVCodecParameters, + ) dec.Errors!*dec.Decoder { const self = try allocator.create(HAPDecoder); self.* = .{ @@ -55,7 +58,12 @@ pub const HAPDecoder = struct { ); } - fn launchThread(workfn: c.HapDecodeWorkFunction, p: ?*anyopaque, count: c_uint, info: ?*anyopaque) callconv(.C) void { + fn launchThread( + workfn: c.HapDecodeWorkFunction, + p: ?*anyopaque, + count: c_uint, + info: ?*anyopaque, + ) callconv(.C) void { _ = info; var i: c_uint = 0; @@ -64,7 +72,11 @@ pub const HAPDecoder = struct { } } - pub fn processPacket(decoder: *dec.Decoder, packet: *c.AVPacket, texture: ?*const gl.Texture) dec.Errors!bool { + pub fn processPacket( + decoder: *dec.Decoder, + packet: *c.AVPacket, + texture: ?*const gl.Texture, + ) dec.Errors!bool { const self: *HAPDecoder = @fieldParentPtr("decoder", decoder); var textureCount: u32 = undefined; |
