Skip to content

Commit

Permalink
Release 3 3 1 (#865)
Browse files Browse the repository at this point in the history
* expose streaming flags in java with jni (#849)

* expose streaming flags in java with jni

* fix indentation

* Elaborated on how to work with IoT credentials. (#851)

It is not a straight-forward process to enable KVS and IoT credentials.
It is required to read and follow through https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-iot.html.

* Add storePressurePolicy call to JNI (#859)

* add store pressure policy

* update ci to add update

* set flag in pClientInfo (#863)

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: Byong-Wu Chong <69205204+byongwu@users.noreply.github.com>
  • Loading branch information
3 people committed May 21, 2022
1 parent 2b343c9 commit 70f74f1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
- name: Build repository
run: |
Expand Down Expand Up @@ -123,6 +124,7 @@ jobs:
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
- name: Build repository
run: |
Expand Down Expand Up @@ -156,6 +158,7 @@ jobs:
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
- name: Build repository
run: |
Expand Down Expand Up @@ -326,7 +329,7 @@ jobs:
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt-get update
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
- name: Clone repository
Expand All @@ -347,7 +350,7 @@ jobs:
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt-get update
sudo apt-get -y install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi
sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
- name: Clone repository
Expand Down
2 changes: 1 addition & 1 deletion docs/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $ gst-launch-1.0 -v rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE
```
$ gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! 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"
```
You can find the RTSP URL from your IP camera manual or manufacturers product page.
You can find the RTSP URL from your IP camera manual or manufacturers product page. For more information on how to set up IoT/role policies and role-aliases, please refer to [iot-based-credential-provider](auth.md#iot-based-credential-provider) and https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-iot.html.

###### Running the `gst-launch-1.0` command to start streaming from USB camera source in **Ubuntu**.
```
Expand Down
16 changes: 16 additions & 0 deletions src/JNI/com/amazonaws/kinesis/video/producer/jni/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ BOOL setClientInfo(JNIEnv *env, jobject clientInfo, PClientInfo pClientInfo) {
CHK_JVM_EXCEPTION(env);
}

methodId = env->GetMethodID(cls, "getAutomaticStreamingFlags", "()I");
if (methodId == NULL) {
DLOGW("Couldn't find method id getAutomaticStreamingFlags");
} else {
pClientInfo->automaticStreamingFlags = (AUTOMATIC_STREAMING_FLAGS) env->CallIntMethod(clientInfo, methodId);
CHK_JVM_EXCEPTION(env);
}

CleanUp:
return STATUS_FAILED(retStatus) ? FALSE : TRUE;
}
Expand Down Expand Up @@ -713,6 +721,14 @@ BOOL setStreamInfo(JNIEnv* env, jobject streamInfo, PStreamInfo pStreamInfo)
CHK_JVM_EXCEPTION(env);
}

methodId = env->GetMethodID(cls, "getStorePressurePolicy", "()I");
if (methodId == NULL) {
DLOGW("Couldn't find method id getStorePressurePolicy");
} else {
pStreamInfo->streamCaps.storePressurePolicy = (CONTENT_STORE_PRESSURE_POLICY) env->CallIntMethod(streamInfo, methodId);
CHK_JVM_EXCEPTION(env);
}

CleanUp:
return STATUS_FAILED(retStatus) ? FALSE : TRUE;
}
Expand Down

0 comments on commit 70f74f1

Please sign in to comment.