From e3b3c8b69ca641ac4d8827ca8b65eb594692a158 Mon Sep 17 00:00:00 2001 From: olly Date: Thu, 19 Jan 2017 13:05:07 -0800 Subject: [PATCH] Display EMSG metadata events in EventLogger Issue #2176 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=144998826 --- .../java/com/google/android/exoplayer2/demo/EventLogger.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/demo/src/main/java/com/google/android/exoplayer2/demo/EventLogger.java b/demo/src/main/java/com/google/android/exoplayer2/demo/EventLogger.java index d3e4b1ae3e..edc268ddb9 100644 --- a/demo/src/main/java/com/google/android/exoplayer2/demo/EventLogger.java +++ b/demo/src/main/java/com/google/android/exoplayer2/demo/EventLogger.java @@ -29,6 +29,7 @@ import com.google.android.exoplayer2.decoder.DecoderCounters; import com.google.android.exoplayer2.drm.DefaultDrmSessionManager; import com.google.android.exoplayer2.metadata.Metadata; import com.google.android.exoplayer2.metadata.MetadataRenderer; +import com.google.android.exoplayer2.metadata.emsg.EventMessage; import com.google.android.exoplayer2.metadata.id3.ApicFrame; import com.google.android.exoplayer2.metadata.id3.CommentFrame; import com.google.android.exoplayer2.metadata.id3.GeobFrame; @@ -384,6 +385,10 @@ import java.util.Locale; } else if (entry instanceof Id3Frame) { Id3Frame id3Frame = (Id3Frame) entry; Log.d(TAG, prefix + String.format("%s", id3Frame.id)); + } else if (entry instanceof EventMessage) { + EventMessage eventMessage = (EventMessage) entry; + Log.d(TAG, prefix + String.format("EMSG: scheme=%s, id=%d, value=%s", + eventMessage.schemeIdUri, eventMessage.id, eventMessage.value)); } } }