]> git.sesse.net Git - bmusb/blobdiff - bmusb.h
Send the audio format explicitly down, not just the ID.
[bmusb] / bmusb.h
diff --git a/bmusb.h b/bmusb.h
index 935318c35cda00c91965ac076ba7102d4980a7ce..5b7c0f9c8e35a501c91bf40bdc81fb8d79f3770f 100644 (file)
--- a/bmusb.h
+++ b/bmusb.h
@@ -66,9 +66,15 @@ struct VideoFormat {
        bool has_signal = false;
 };
 
+struct AudioFormat {
+       uint16_t id = 0;  // For debugging/logging only.
+       unsigned bits_per_sample = 0;
+       unsigned num_channels = 0;
+};
+
 typedef std::function<void(uint16_t timecode,
                            FrameAllocator::Frame video_frame, size_t video_offset, VideoFormat video_format,
-                           FrameAllocator::Frame audio_frame, size_t audio_offset, uint16_t audio_format)>
+                           FrameAllocator::Frame audio_frame, size_t audio_offset, AudioFormat audio_format)>
        frame_callback_t;
 
 class CaptureInterface {