Skip to content

Commit 70f74f1

Browse files
jdelaplaniyatim23byongwu
authored
Release 3 3 1 (#865)
* 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 <[email protected]> Co-authored-by: Byong-Wu Chong <[email protected]>
1 parent 2b343c9 commit 70f74f1

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
uses: actions/checkout@v2
8686
- name: Install dependencies
8787
run: |
88+
sudo apt-get update
8889
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
8990
- name: Build repository
9091
run: |
@@ -123,6 +124,7 @@ jobs:
123124
uses: actions/checkout@v2
124125
- name: Install dependencies
125126
run: |
127+
sudo apt-get update
126128
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
127129
- name: Build repository
128130
run: |
@@ -156,6 +158,7 @@ jobs:
156158
uses: actions/checkout@v2
157159
- name: Install dependencies
158160
run: |
161+
sudo apt-get update
159162
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
160163
- name: Build repository
161164
run: |
@@ -326,7 +329,7 @@ jobs:
326329
steps:
327330
- name: Install dependencies
328331
run: |
329-
sudo apt update
332+
sudo apt-get update
330333
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
331334
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
332335
- name: Clone repository
@@ -347,7 +350,7 @@ jobs:
347350
steps:
348351
- name: Install dependencies
349352
run: |
350-
sudo apt update
353+
sudo apt-get update
351354
sudo apt-get -y install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi
352355
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
353356
- name: Clone repository

docs/linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ $ gst-launch-1.0 -v rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE
5454
```
5555
$ 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"
5656
```
57-
You can find the RTSP URL from your IP camera manual or manufacturers product page.
57+
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.
5858

5959
###### Running the `gst-launch-1.0` command to start streaming from USB camera source in **Ubuntu**.
6060
```

src/JNI/com/amazonaws/kinesis/video/producer/jni/Parameters.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,14 @@ BOOL setClientInfo(JNIEnv *env, jobject clientInfo, PClientInfo pClientInfo) {
225225
CHK_JVM_EXCEPTION(env);
226226
}
227227

228+
methodId = env->GetMethodID(cls, "getAutomaticStreamingFlags", "()I");
229+
if (methodId == NULL) {
230+
DLOGW("Couldn't find method id getAutomaticStreamingFlags");
231+
} else {
232+
pClientInfo->automaticStreamingFlags = (AUTOMATIC_STREAMING_FLAGS) env->CallIntMethod(clientInfo, methodId);
233+
CHK_JVM_EXCEPTION(env);
234+
}
235+
228236
CleanUp:
229237
return STATUS_FAILED(retStatus) ? FALSE : TRUE;
230238
}
@@ -713,6 +721,14 @@ BOOL setStreamInfo(JNIEnv* env, jobject streamInfo, PStreamInfo pStreamInfo)
713721
CHK_JVM_EXCEPTION(env);
714722
}
715723

724+
methodId = env->GetMethodID(cls, "getStorePressurePolicy", "()I");
725+
if (methodId == NULL) {
726+
DLOGW("Couldn't find method id getStorePressurePolicy");
727+
} else {
728+
pStreamInfo->streamCaps.storePressurePolicy = (CONTENT_STORE_PRESSURE_POLICY) env->CallIntMethod(streamInfo, methodId);
729+
CHK_JVM_EXCEPTION(env);
730+
}
731+
716732
CleanUp:
717733
return STATUS_FAILED(retStatus) ? FALSE : TRUE;
718734
}

0 commit comments

Comments
 (0)