[vlc-commits] sout: sdi: add audio multiplex debugging

Francois Cartegnie git at videolan.org
Mon Oct 8 18:11:32 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct  4 16:00:00 2018 +0200| [50c06a45d29f2c1a780319b8c9416ee920a1ebf9] | committer: Francois Cartegnie

sout: sdi: add audio multiplex debugging

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50c06a45d29f2c1a780319b8c9416ee920a1ebf9
---

 modules/stream_out/sdi/SDIAudioMultiplex.cpp | 13 +++++++++++++
 modules/stream_out/sdi/SDIAudioMultiplex.hpp |  1 +
 2 files changed, 14 insertions(+)

diff --git a/modules/stream_out/sdi/SDIAudioMultiplex.cpp b/modules/stream_out/sdi/SDIAudioMultiplex.cpp
index 70d8f175f7..25cc4b4173 100644
--- a/modules/stream_out/sdi/SDIAudioMultiplex.cpp
+++ b/modules/stream_out/sdi/SDIAudioMultiplex.cpp
@@ -382,6 +382,19 @@ void SDIAudioMultiplex::SetSubFrameSource(uint8_t n, AES3AudioBuffer *buf,
     *s = AES3AudioSubFrameSource(buf, idx);
 }
 
+void SDIAudioMultiplex::Debug(vlc_object_t *p_obj) const
+{
+    msg_Dbg(p_obj, "Multiplex: head %ld bufferstart() %ld", head, bufferStart());
+    for(unsigned i=0; i<MAX_AES3_AUDIO_FRAMES; i++)
+    {
+        const AES3AudioFrameSource *source = &framesources[i];
+        if(!source->subframe0.available())
+            msg_Dbg(p_obj, " [%d.0] bufferstart() %ld", i, source->subframe0.bufferStartTime());
+        if(!source->subframe1.available())
+            msg_Dbg(p_obj, " [%d.1] bufferstart() %ld", i, source->subframe1.bufferStartTime());
+    }
+}
+
 block_t * SDIAudioMultiplex::Extract(unsigned samples)
 {
     vlc_tick_t start = bufferStart();
diff --git a/modules/stream_out/sdi/SDIAudioMultiplex.hpp b/modules/stream_out/sdi/SDIAudioMultiplex.hpp
index e7b245c3f6..c37f4bbf10 100644
--- a/modules/stream_out/sdi/SDIAudioMultiplex.hpp
+++ b/modules/stream_out/sdi/SDIAudioMultiplex.hpp
@@ -90,6 +90,7 @@ namespace sdi_sout
             block_t * Extract(unsigned);
             unsigned getFreeSubFrameSlots() const;
             void SetSubFrameSource(uint8_t, AES3AudioBuffer *, AES3AudioSubFrameIndex);
+            void Debug(vlc_object_t *) const;
 
             SDIAudioMultiplexConfig config;
             vlc_tick_t head;



More information about the vlc-commits mailing list