Skip to content

Commit 5eedbb4

Browse files
committed
Release 2.0.0 (9th Jul 2019)
License update: KVS SDK and GStreamer kvssink plugin are under Apache 2.0 license now. C-Producer - New feature Language level is C89. It should work for all GCC versions, tested minimum GCC version is 4.1. The Kinesis Video Streams C producer library wraps kinesis-video-pic (Platform Independent Code) with additional layer of API that allows scenario and platform-specific callbacks and events. Callbacks for sample retry logic implementation are now supported through C Producer CPP Producer - Updates Language level is C++11 instead of C++14. Required minimum GCC version is 4.8. Kinesis Video Producer CPP (kinesis-video-producer directory) is now revised to a wrapper of C Producer SDK which interfaces with the Platform Independent Repository (PIC, kinesis-video-pic directory). Platform Independent Code - New functionality Automatic CPD (codec private data) extraction from the stream Reset stream and reset connection functionality in PIC - In case of unrecoverable errors users can simply call reset stream; internally SDK will free & create the stream. Log level supported in PIC. It can be set in member variable of DeviceInfo.ClientInfo. Platform Independent Code - Bug Fixes Skip over error fragments - SDK will continue skip any invalid fragments are ingested through SDK earlier and continue streaming with valid ingested fragments. It will not just loop back and keep resending the broken fragment now. All unit tests (pic_test, cproducer_test, producer_test) are at C++11 level. Required minimum GCC version is 4.8. Please note the following changes if you have customized the SDK for your integration and not using samples directly. Changes to utility functions: RotatingStaticCredentialProvider is removed from C++ producer. Customer can use StaticCredentialProvider instead. CredentialProviderUtil and SerializedCredentials are removed from C++ producer. Following functions are removed from DefaultCallbackProvider: sleepUntilWithTimeCallback, shutdownStream, notifyResult, getControlPlaneUri, safeFreeBuffer, getStreamStatusFromString. Changes to the object model: Following attributes have been added: Version number is added to TrackInfo, Frame, StreamDescription, DeviceInfo, StreamInfo. Following attributes have been removed: certPath is removed from DeviceInfo in PIC.
1 parent a8bbb9b commit 5eedbb4

File tree

654 files changed

+28194
-17289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

654 files changed

+28194
-17289
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ kinesis-video-native-build/start
1111
kinesis-video-native-build/test_h264_jpg.mkv
1212
kinesis-video-native-build/test_jpeg.mkv
1313
test-stream/
14+
*.key
15+
*.gpg

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,32 @@ Amazon Kinesis Video Streams Producer SDK for C/C++ makes it easy to build an on
1717
Amazon Kinesis Video Streams Producer SDK for C/C++ contains the following sub-directories/projects:
1818
* kinesis-video-pic - The Platform Independent Codebase which is the basic building block for the C++/Java producer SDK. The project includes multiple sub-projects for each sub-component with unit tests.
1919
* kinesis-video-producer - The C++ Producer SDK with unit test.
20+
* kinesis-video-c-producer - The C Producer SDK with unit test.
2021
* kinesis-video-producer-jni - The C++ wrapper for JNI to expose the functionality to Java/Android.
2122
* kinesis-video-gst-demo - C++ GStreamer sample application (for webcam, USB camera and RTSP) .
2223
* kinesis-video-gstreamer-plugin - GStreamer plugin sink element (kvssink) and demo application.
2324
* **kinesis-video-native-build** - Native build directory with a build script for **Mac OS/Linux/Raspberry PI/Windows**. This is the directory that will contain the artifacts **(executable binaries)** and JNI libraries after the build.
2425
* This should be your **current working directory** for running the install-scripts.
2526

2627
----
28+
### Supported Platforms
29+
----
30+
Kinesis Video Streams Producer SDK was tested on following platforms:
31+
```
32+
Ubuntu 16
33+
Ubuntu 17
34+
Ubuntu 18
35+
Raspberry Raspbian
36+
MacOS El Captian
37+
MacOS Sierra
38+
MacOS High Sierra
39+
Windows 7 Enterprise
40+
Windows 10 Enterprise
41+
Windows Server 2012 R2
42+
Windows Server 2016
43+
```
2744

45+
----
2846
### Build and install Kinesis Video Streams Producer SDK and sample applications
2947
----
3048
There are few build-time tools/dependencies which need to be installed in order to compile the core producer SDK libraries and the sample applications. Sample applications are provided to demonstrate _**how to send video**_ from **webcam**, **USB camera**, or **IP camera** (RTSP).
@@ -50,6 +68,32 @@ This library is licensed under the Apache License, 2.0.
5068
----
5169
### Release notes
5270

71+
#### Release 2.0.0 (9th Jul 2019)
72+
* License update: KVS SDK and GStreamer kvssink plugin are under Apache 2.0 license now.
73+
* C-Producer - New feature
74+
* Language level is C89. It should work for all GCC versions, tested minimum GCC version is 4.1.
75+
* The Kinesis Video Streams C producer library wraps kinesis-video-pic (Platform Independent Code) with additional layer of API that allows scenario and platform-specific callbacks and events.
76+
* Callbacks for sample retry logic implementation are now supported through C Producer
77+
* CPP Producer - Updates
78+
* Language level is C++11 instead of C++14. Required minimum GCC version is 4.8.
79+
* Kinesis Video Producer CPP (kinesis-video-producer directory) is now revised to a wrapper of C Producer SDK which interfaces with the Platform Independent Repository (PIC, kinesis-video-pic directory).
80+
* Platform Independent Code - New functionality
81+
* Automatic CPD (codec private data) extraction from the stream
82+
* Reset stream and reset connection functionality in PIC - In case of unrecoverable errors users can simply call reset stream; internally SDK will free & create the stream.
83+
* Log level supported in PIC. It can be set in member variable of DeviceInfo.ClientInfo.
84+
* Platform Independent Code - Bug Fixes
85+
* Skip over error fragments - SDK will continue skip any invalid fragments are ingested through SDK earlier and continue streaming with valid ingested fragments. It will not just loop back and keep resending the broken fragment now.
86+
* All unit tests (pic_test, cproducer_test, producer_test) are at C++11 level. Required minimum GCC version is 4.8.
87+
88+
* Please note the following changes if you have customized the SDK for your integration and not using samples directly.
89+
* Changes to utility functions:
90+
* RotatingStaticCredentialProvider is removed from C++ producer. Customer can use StaticCredentialProvider instead.
91+
* CredentialProviderUtil and SerializedCredentials are removed from C++ producer.
92+
* Following functions are removed from DefaultCallbackProvider: sleepUntilWithTimeCallback, shutdownStream, notifyResult, getControlPlaneUri, safeFreeBuffer, getStreamStatusFromString.
93+
* Changes to the object model:
94+
* Following attributes have been added: Version number is added to TrackInfo, Frame, StreamDescription, DeviceInfo, StreamInfo.
95+
* Following attributes have been removed: certPath is removed from DeviceInfo in PIC.
96+
5397
#### Release 1.7.9 (13th Mar 2019)
5498
* Fix memory leak in kinesis_video_gstreamer_audio_video_sample_app.
5599

docker_native_scripts/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM ubuntu:17.10
1+
FROM ubuntu:18.04
22

3+
RUN apt-get upgrade
34
RUN apt-get update
5+
46
RUN apt-get install -y git && \
57
apt-get install -y vim && \
68
apt-get install -y curl && \

docker_native_scripts/windows/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Dockerfile to build Kinesis Video Streams Producer CPP as a Windows container
33

4-
FROM microsoft/windowsservercore
4+
FROM mcr.microsoft.com/windows/servercore:ltsc2019
55
WORKDIR /opt/
66

77
# ================= Install Git ============================================================================

install-instructions-linux.md

+35-11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
#### Instructions for installing Kinesis Video Streams Producer SDK on Linux (Ubuntu, Raspberry PI)
23

34
----
@@ -98,6 +99,10 @@ If you are using Raspberry pi, you can also install the `gstreamer1.0-omx` packa
9899
```
99100
sudo apt-get install gstreamer1.0-omx
100101
```
102+
If `make` is not installed already you can install `make` using
103+
```
104+
sudo apt-get install make
105+
```
101106
Run the build script: (within `kinesis-video-native-build` folder)
102107
```
103108
./min-install-script
@@ -122,7 +127,8 @@ $ ./java-install-script
122127
```
123128

124129
----
125-
### Running Examples:
130+
### How to run sample applications for sending media to KVS using [GStreamer](https://gstreamer.freedesktop.org/):
131+
126132
##### Setting credentials in environment variables
127133
Define AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables with the AWS access key id and secret key:
128134

@@ -141,7 +147,7 @@ the LD_LIBRARY_PATH as below:
141147
```
142148
export LD_LIBRARY_PATH=/opt/awssdk/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib:$LD_LIBRARY_PATH
143149
```
144-
* (Skip this if you installed gstreamer using apt-get) The `gst-launch-1.0` and `gst-inspect-1.0` binaries are built inside the folder `<YourSdkFolderPath>/kinesis-video-native-build/downloads/local/bin`. You can either run the following commands from that folder using `./gst-launch-1.0` or you can include that in your **PATH** environment variable using the following export command and run `gst-launch-1.0`
150+
* (Skip this if you installed GStreamer using `apt-get`) The `gst-launch-1.0` and `gst-inspect-1.0` binaries are built inside the folder `<YourSdkFolderPath>/kinesis-video-native-build/downloads/local/bin`. You can either run the following commands from that folder using `./gst-launch-1.0` or you can include that in your **PATH** environment variable using the following export command and run `gst-launch-1.0`
145151
```
146152
$ export PATH=<YourSdkFolderPath>/kinesis-video-native-build/downloads/local/bin:$PATH
147153
```
@@ -150,7 +156,7 @@ $ export PATH=<YourSdkFolderPath>/kinesis-video-native-build/downloads/local/bin
150156
$ export GST_PLUGIN_PATH=<YourSdkFolderPath>/kinesis-video-native-build/downloads/local/lib:$GST_PLUGIN_PATH
151157
```
152158

153-
###### Discovering available devices.
159+
###### Discovering audio and video devices available in your system.
154160
Change your current working directory to `<YourSdkFolderPath>/kinesis-video-native-build/downloads/local/bin`;
155161
then run the `gst-device-monitor-1.0` command to identify available media devices in your system. An example output as follows:
156162
```
@@ -182,15 +188,15 @@ Device found:
182188
gst-launch-1.0 v4l2src device=/dev/video4 ! ...
183189
```
184190

185-
###### Running the `gst-launch-1.0` command to start streaming from RTSP camera source.
191+
###### Running the `gst-launch-1.0` command to start streaming from a RTSP camera source.
186192
```
187-
$ gst-launch-1.0 -v rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128
193+
$ gst-launch-1.0 -v rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! h264parse ! kvssink stream-name=YourStreamName storage-size=128
188194
```
189195

190196
**Note:** If you are using **IoT credentials** then you can pass them as parameters to the gst-launch-1.0 command
191197
```
192198
$ gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au !
193-
kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases"
199+
h264parse ! kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases"
194200
```
195201
You can find the RTSP URL from your IP camera manual or manufacturers product page.
196202

@@ -206,7 +212,7 @@ $ gst-launch-1.0 -v v4l2src device=/dev/video0 ! h264parse ! video/x-h264,stream
206212
###### Running the `gst-launch-1.0` command to start streaming from camera source in **Raspberry-PI**.
207213

208214
```
209-
$ gst-launch-1.0 -v v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! omxh264enc periodicity-idr=45 inline-header=FALSE ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName access-key="YourAccessKey" secret-key="YourSecretKey"
215+
$ gst-launch-1.0 -v v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! omxh264enc periodicty-idr=45 inline-header=FALSE ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName access-key="YourAccessKey" secret-key="YourSecretKey"
210216
```
211217
or use a different encoder
212218
```
@@ -320,7 +326,7 @@ You can also choose to use other video devices by doing
320326

321327
`export AWS_KVS_VIDEO_DEVICE=/dev/video1`
322328

323-
If no `AWS_KVS_VIDEO_DEVICE` environment variable was detected, the sample app will use the default video device.
329+
If no `AWS_KVS_VIDEO_DEVICE` environment variable was detected, the sample application will use the default video device.
324330
After the environment variables are set, launch the sample application with a stream name and it will start streaming.
325331
```
326332
AWS_ACCESS_KEY_ID=YourAccessKeyId AWS_SECRET_ACCESS_KEY=YourSecretAccessKey ./kinesis_video_gstreamer_audio_video_sample_app <my-stream>
@@ -330,6 +336,15 @@ AWS_ACCESS_KEY_ID=YourAccessKeyId AWS_SECRET_ACCESS_KEY=YourSecretAccessKey ./ki
330336

331337
Refer the **README.md** file in the *docker_native_scripts* folder for running the build and RTSP demo application within Docker container.
332338

339+
### How to run sample applications for sending H264 video files to KVS
340+
341+
The sample application `kinesis_video_cproducer_video_only_sample` sends h264 video frames inside the folder `kinesis-video-c-producer/samples/h264SampleFrames` to KVS.
342+
The following command sends the video frames in a loop for ten seconds to KVS.
343+
`./kinesis_video_cproducer_video_only_sample YourStreamName 10`
344+
345+
If you want to send H264 files from another folder (`MyH264FramesFolder`) you can run the sample with the following arguments
346+
`./kinesis_video_cproducer_video_only_sample YourStreamName 10 MyH264FramesFolder`
347+
333348
##### Additional examples
334349

335350
For additional examples on using Kinesis Video Streams Java SDK and Kinesis Video Streams Parsing Library refer:
@@ -339,14 +354,23 @@ For additional examples on using Kinesis Video Streams Java SDK and Kinesis Vid
339354
##### [Kinesis Video Streams Android SDK](https://github.com/awslabs/aws-sdk-android-samples/tree/master/AmazonKinesisVideoDemoApp)
340355
----
341356

342-
##### Running C++ Unit tests
357+
##### Running C++ unit tests
343358

344-
The executable for **unit tests** will be built in `./start` inside the `kinesis-video-native-build` directory. Launch it and it will run the unit test and kick off dummy frame streaming.
359+
**Note:** Please set the [credentials](https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/install-instructions-linux.md#setting-credentials-in-environment-variables) before running the unit tests.
360+
361+
The executable for **unit tests** will be built as `./producer_test` inside the `kinesis-video-native-build` directory. Launch it and it will run the unit test and kick off dummy frame streaming.
362+
363+
##### Running C unit tests
364+
365+
The executable for **unit tests** will be built as `./cproducer_test` inside the `kinesis-video-native-build` directory.
366+
367+
##### Running PIC unit tests
368+
369+
The executable for **unit tests** will be built as `./pic_test` inside the `kinesis-video-native-build` directory.
345370

346371
##### Enabling verbose logs
347372
Define `HEAP_DEBUG` and `LOG_STREAMING` C-defines by uncommenting the appropriate lines in CMakeList.txt in the kinesis-video-native-build directory.
348373

349-
350374
----
351375
##### How to configure logging for producer SDK sample applications.
352376

install-instructions-macos.md

+27-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The bulk of the **install script** is building the open source dependencies. The
4848

4949
First make sure that the following libraries have been installed using Homebrew
5050
```
51-
brew install pkg-config openssl cmake gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly log4cplus
51+
brew install pkg-config openssl cmake gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly log4cplus gst-libav
5252
```
5353

5454
After all required libraries have been installed, run
@@ -111,14 +111,14 @@ Device found:
111111
###### Running the `gst-launch-1.0` command to start streaming from RTSP camera source.
112112

113113
```
114-
$ gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey"
114+
$ gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! h264parse ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey"
115115
```
116116

117117
**Note:** If you are using **IoT credentials** then you can pass them as parameters to the gst-launch-1.0 command
118118

119119
```
120120
$ gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au !
121-
kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases"
121+
h264parse ! kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases"
122122
```
123123
You can find the RTSP URL from your IP camera manual or manufacturers product page.
124124

@@ -219,6 +219,17 @@ AWS_ACCESS_KEY_ID=YourAccessKeyId AWS_SECRET_ACCESS_KEY=YourSecretAccessKey ./ki
219219
##### Using Docker to run the sample application
220220
Refer the **README.md** file in the *docker_native_scripts* folder for running the build and **RTSP sample application** to start streaming from **IP camera** within Docker container.
221221

222+
### How to run sample applications for sending H264 video files to KVS
223+
224+
The sample application `kinesis_video_cproducer_video_only_sample` sends h264 video frames inside the folder `kinesis-video-c-producer/samples/h264SampleFrames` to KVS.
225+
The following command sends the video frames in a loop for ten seconds to KVS.
226+
you can run `./kinesis_video_cproducer_video_only_sample YourStreamName 10`
227+
`./kinesis_video_cproducer_video_only_sample YourStreamName 10`
228+
229+
If you want to send H264 files from another folder (`MyH264FramesFolder`) you can run the sample with the following arguments
230+
`./kinesis_video_cproducer_video_only_sample YourStreamName 10 MyH264FramesFolder`
231+
232+
222233
##### Additional examples
223234
For additional examples on using Kinesis Video Streams Java SDK and Kinesis Video Streams Parsing Library refer:
224235

@@ -228,7 +239,19 @@ For additional examples on using Kinesis Video Streams Java SDK and Kinesis Vid
228239
-----
229240

230241
##### Running C++ Unit tests
231-
The executable for **unit tests** will be built in `./start` inside the `kinesis-video-native-build` directory. Launch it and it will run the unit test and kick off dummy frame streaming.
242+
243+
**Note:** Please set the [credentials](https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/install-instructions-macos.md#setting-credentials-in-environment-variables) before running the unit tests.
244+
245+
The executable for **unit tests** will be built as `./producer_test` inside the `kinesis-video-native-build` directory. Launch it and it will run the unit test and kick off dummy frame streaming.
246+
247+
##### Running C unit tests
248+
249+
The executable for **unit tests** will be built as `./cproducer_test` inside the `kinesis-video-native-build` directory.
250+
251+
##### Running PIC unit tests
252+
253+
The executable for **unit tests** will be built as `./pic_test` inside the `kinesis-video-native-build` directory.
254+
232255

233256
##### Enabling verbose logs
234257
Define `HEAP_DEBUG` and `LOG_STREAMING` C-defines by uncommenting the appropriate lines in CMakeList.txt in the kinesis-video-native-build directory.

0 commit comments

Comments
 (0)