Skip to content

Commit 5a5bcb1

Browse files
committed
Add putting of eofr, extend sample run duration to 2min
1 parent 722434a commit 5a5bcb1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

samples/KvsVideoOnlyRealtimeStreamingSample.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define DEFAULT_CALLBACK_CHAIN_COUNT 5
66
#define DEFAULT_KEY_FRAME_INTERVAL 45
77
#define DEFAULT_FPS_VALUE 25
8-
#define DEFAULT_STREAM_DURATION 20 * HUNDREDS_OF_NANOS_IN_A_SECOND
8+
#define DEFAULT_STREAM_DURATION 2 * HUNDREDS_OF_NANOS_IN_A_MINUTE
99
#define DEFAULT_STORAGE_SIZE 20 * 1024 * 1024
1010
#define RECORDED_FRAME_AVG_BITRATE_BIT_PS 3800000
1111
#define VIDEO_CODEC_NAME_H264 "h264"
@@ -183,6 +183,11 @@ INT32 main(INT32 argc, CHAR* argv[])
183183

184184
CHK_STATUS(readFrameData(&frame, frameFilePath, videoCodec));
185185

186+
if (frame.flags == FRAME_FLAG_KEY_FRAME && !firstFrame) {
187+
Frame eofr = EOFR_FRAME_INITIALIZER;
188+
putKinesisVideoFrame(streamHandle, &eofr);
189+
}
190+
186191
CHK_STATUS(putKinesisVideoFrame(streamHandle, &frame));
187192
if (firstFrame) {
188193
startUpLatency = (DOUBLE) (GETTIME() - startTime) / (DOUBLE) HUNDREDS_OF_NANOS_IN_A_MILLISECOND;

0 commit comments

Comments
 (0)