From 8d7faf74297e9bb5b5809b792b1656ee66d6998a Mon Sep 17 00:00:00 2001 From: chehefen Date: Thu, 21 Feb 2019 21:57:21 +0000 Subject: [PATCH] Bug fix for broken MKV generated due to difference between trackInfoType in Java and C layer. --- README.md | 2 ++ .../internal/mediasource/DefaultOnStreamDataAvailable.java | 0 .../internal/mediasource/OnStreamDataAvailable.java | 0 .../internal/mediasource/bytes/BytesGenerator.java | 0 .../internal/mediasource/bytes/BytesMediaSource.java | 0 .../mediasource/bytes/BytesMediaSourceConfiguration.java | 0 .../mediasource/multitrack/MultiTrackFrameSource.java | 0 .../mediasource/multitrack/MultiTrackMediaSource.java | 0 .../multitrack/MultiTrackMediaSourceConfiguration.java | 0 .../java/auth/JavaCredentialsProviderImpl.java | 0 .../java/client/JavaKinesisVideoClient.java | 0 .../java/client/KinesisVideoJavaClientFactory.java | 0 .../{kinesisvideo => }/java/logging/SysOutLogChannel.java | 0 .../java/mediasource/file/AudioVideoFileMediaSource.java | 0 .../file/AudioVideoFileMediaSourceConfiguration.java | 0 .../java/mediasource/file/AudioVideoFrameSource.java | 0 .../java/mediasource/file/ImageFileMediaSource.java | 3 ++- .../mediasource/file/ImageFileMediaSourceConfiguration.java | 0 .../java/mediasource/file/ImageFrameSource.java | 0 .../java/service/JavaKinesisVideoServiceClient.java | 0 .../com/amazonaws/kinesisvideo/producer/MkvTrackInfoType.java | 4 +++- .../java/com/amazonaws/kinesisvideo/util/VersionUtil.java | 2 +- 22 files changed, 8 insertions(+), 3 deletions(-) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/internal/mediasource/DefaultOnStreamDataAvailable.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/internal/mediasource/OnStreamDataAvailable.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/internal/mediasource/bytes/BytesGenerator.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/internal/mediasource/bytes/BytesMediaSource.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/internal/mediasource/bytes/BytesMediaSourceConfiguration.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/internal/mediasource/multitrack/MultiTrackFrameSource.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/internal/mediasource/multitrack/MultiTrackMediaSource.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/internal/mediasource/multitrack/MultiTrackMediaSourceConfiguration.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/auth/JavaCredentialsProviderImpl.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/client/JavaKinesisVideoClient.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/client/KinesisVideoJavaClientFactory.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/logging/SysOutLogChannel.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/mediasource/file/AudioVideoFileMediaSource.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/mediasource/file/AudioVideoFileMediaSourceConfiguration.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/mediasource/file/AudioVideoFrameSource.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/mediasource/file/ImageFileMediaSource.java (98%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/mediasource/file/ImageFileMediaSourceConfiguration.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/mediasource/file/ImageFrameSource.java (100%) rename src/main/java/com/amazonaws/kinesisvideo/{kinesisvideo => }/java/service/JavaKinesisVideoServiceClient.java (100%) diff --git a/README.md b/README.md index a5f54935..d89cdeed 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,8 @@ export LD_LIBRARY_PATH=//amazon-kinesis-video-st This should resolve native library loading issues. ## Release Notes +### Release 1.9.2 (21 Feburary 2019) +* Bug fix for broken MKV generated due to difference between trackInfoType in Java and C layer. ### Release 1.9.1 (19 Feburary 2019) * Bug fix for credentials not rotating issue when given credentials expire in less than 40 minutes. diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/DefaultOnStreamDataAvailable.java b/src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/DefaultOnStreamDataAvailable.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/DefaultOnStreamDataAvailable.java rename to src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/DefaultOnStreamDataAvailable.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/OnStreamDataAvailable.java b/src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/OnStreamDataAvailable.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/OnStreamDataAvailable.java rename to src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/OnStreamDataAvailable.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/bytes/BytesGenerator.java b/src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/bytes/BytesGenerator.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/bytes/BytesGenerator.java rename to src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/bytes/BytesGenerator.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/bytes/BytesMediaSource.java b/src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/bytes/BytesMediaSource.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/bytes/BytesMediaSource.java rename to src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/bytes/BytesMediaSource.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/bytes/BytesMediaSourceConfiguration.java b/src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/bytes/BytesMediaSourceConfiguration.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/bytes/BytesMediaSourceConfiguration.java rename to src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/bytes/BytesMediaSourceConfiguration.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/multitrack/MultiTrackFrameSource.java b/src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/multitrack/MultiTrackFrameSource.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/multitrack/MultiTrackFrameSource.java rename to src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/multitrack/MultiTrackFrameSource.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/multitrack/MultiTrackMediaSource.java b/src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/multitrack/MultiTrackMediaSource.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/multitrack/MultiTrackMediaSource.java rename to src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/multitrack/MultiTrackMediaSource.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/multitrack/MultiTrackMediaSourceConfiguration.java b/src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/multitrack/MultiTrackMediaSourceConfiguration.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/internal/mediasource/multitrack/MultiTrackMediaSourceConfiguration.java rename to src/main/java/com/amazonaws/kinesisvideo/internal/mediasource/multitrack/MultiTrackMediaSourceConfiguration.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/auth/JavaCredentialsProviderImpl.java b/src/main/java/com/amazonaws/kinesisvideo/java/auth/JavaCredentialsProviderImpl.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/auth/JavaCredentialsProviderImpl.java rename to src/main/java/com/amazonaws/kinesisvideo/java/auth/JavaCredentialsProviderImpl.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/client/JavaKinesisVideoClient.java b/src/main/java/com/amazonaws/kinesisvideo/java/client/JavaKinesisVideoClient.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/client/JavaKinesisVideoClient.java rename to src/main/java/com/amazonaws/kinesisvideo/java/client/JavaKinesisVideoClient.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/client/KinesisVideoJavaClientFactory.java b/src/main/java/com/amazonaws/kinesisvideo/java/client/KinesisVideoJavaClientFactory.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/client/KinesisVideoJavaClientFactory.java rename to src/main/java/com/amazonaws/kinesisvideo/java/client/KinesisVideoJavaClientFactory.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/logging/SysOutLogChannel.java b/src/main/java/com/amazonaws/kinesisvideo/java/logging/SysOutLogChannel.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/logging/SysOutLogChannel.java rename to src/main/java/com/amazonaws/kinesisvideo/java/logging/SysOutLogChannel.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/AudioVideoFileMediaSource.java b/src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/AudioVideoFileMediaSource.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/AudioVideoFileMediaSource.java rename to src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/AudioVideoFileMediaSource.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/AudioVideoFileMediaSourceConfiguration.java b/src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/AudioVideoFileMediaSourceConfiguration.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/AudioVideoFileMediaSourceConfiguration.java rename to src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/AudioVideoFileMediaSourceConfiguration.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/AudioVideoFrameSource.java b/src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/AudioVideoFrameSource.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/AudioVideoFrameSource.java rename to src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/AudioVideoFrameSource.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/ImageFileMediaSource.java b/src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/ImageFileMediaSource.java similarity index 98% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/ImageFileMediaSource.java rename to src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/ImageFileMediaSource.java index a6b3b924..b7d7bb00 100644 --- a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/ImageFileMediaSource.java +++ b/src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/ImageFileMediaSource.java @@ -18,6 +18,7 @@ import static com.amazonaws.kinesisvideo.util.StreamInfoConstants.RETENTION_ONE_HOUR; import static com.amazonaws.kinesisvideo.util.StreamInfoConstants.USE_FRAME_TIMECODES; import static com.amazonaws.kinesisvideo.util.StreamInfoConstants.VERSION_ZERO; +import static com.amazonaws.kinesisvideo.util.StreamInfoConstants.VIDEO_CODEC_ID; import static com.amazonaws.kinesisvideo.util.StreamInfoConstants.VIDEO_CONTENT_TYPE; import javax.annotation.Nonnull; @@ -97,7 +98,7 @@ public StreamInfo getStreamInfo() { RELATIVE_TIMECODES, REQUEST_FRAGMENT_ACKS, RECOVER_ON_FAILURE, - VIDEO_CONTENT_TYPE, + VIDEO_CODEC_ID, "test-track", DEFAULT_BITRATE, imageFileMediaSourceConfiguration.getFps(), diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/ImageFileMediaSourceConfiguration.java b/src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/ImageFileMediaSourceConfiguration.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/ImageFileMediaSourceConfiguration.java rename to src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/ImageFileMediaSourceConfiguration.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/ImageFrameSource.java b/src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/ImageFrameSource.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/mediasource/file/ImageFrameSource.java rename to src/main/java/com/amazonaws/kinesisvideo/java/mediasource/file/ImageFrameSource.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/service/JavaKinesisVideoServiceClient.java b/src/main/java/com/amazonaws/kinesisvideo/java/service/JavaKinesisVideoServiceClient.java similarity index 100% rename from src/main/java/com/amazonaws/kinesisvideo/kinesisvideo/java/service/JavaKinesisVideoServiceClient.java rename to src/main/java/com/amazonaws/kinesisvideo/java/service/JavaKinesisVideoServiceClient.java diff --git a/src/main/java/com/amazonaws/kinesisvideo/producer/MkvTrackInfoType.java b/src/main/java/com/amazonaws/kinesisvideo/producer/MkvTrackInfoType.java index 805d6092..19d59069 100644 --- a/src/main/java/com/amazonaws/kinesisvideo/producer/MkvTrackInfoType.java +++ b/src/main/java/com/amazonaws/kinesisvideo/producer/MkvTrackInfoType.java @@ -1,7 +1,9 @@ package com.amazonaws.kinesisvideo.producer; +/* IMPORTANT!!! Make sure the values in this file correspond to their native counterparts in MKV_TRACK_INFO_TYPE +stucture from amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-pic/src/mkvgen/include/com/amazonaws/kinesis/video/mkvgen/Include.h */ public enum MkvTrackInfoType { - VIDEO(0), AUDIO(1), UNKNOWN(-1); + VIDEO(1), AUDIO(2), UNKNOWN(3); private final int mValue; public static final int getStatusCode(String status) { diff --git a/src/main/java/com/amazonaws/kinesisvideo/util/VersionUtil.java b/src/main/java/com/amazonaws/kinesisvideo/util/VersionUtil.java index 83f3210d..41e21936 100644 --- a/src/main/java/com/amazonaws/kinesisvideo/util/VersionUtil.java +++ b/src/main/java/com/amazonaws/kinesisvideo/util/VersionUtil.java @@ -6,7 +6,7 @@ public final class VersionUtil { - public static final String AWS_SDK_KVS_PRODUCER_VERSION_STRING = "1.9.1"; + public static final String AWS_SDK_KVS_PRODUCER_VERSION_STRING = "1.9.2"; private static final String DEFAULT_USER_AGENT_NAME = "AWS-SDK-KVS";