Skip to content

Commit

Permalink
Merge pull request #50 from aws-samples/sdk_update
Browse files Browse the repository at this point in the history
SDK update
  • Loading branch information
codingspirit authored Mar 24, 2022
2 parents 7cace23 + 4cd872d commit efdf470
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Target platform**
The target platform you are using.

**Commit id**
The commit id you are using.
i.e 6f3d3eeccdcf5a36ad63d617712ff732714d40e3

**To Reproduce**
Steps to reproduce the behavior:
1. Setup credentials by '...'
2. Execute binary by '....'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/build-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Build issue
about: Describe the build issue you met
title: "[BUILD ISSUE]"
labels: ''
assignees: ''

---

**Describe the build issue**
A clear and concise description of what the build issue is.

**Target platform**
The target platform you are using.

**Commit id**
The commit id you are using.
47c3e59d9d14df0be7e8532279646c7a63c5b6de

**Build commands**
The build command you are using.
```
export CC=${YOUR_C_TOOLCHAIN}
export CXX=${YOUR_CXX_TOOLCHAIN}
cd amazon-kinesis-video-streams-media-interface
mkdir build; cd build; cmake .. -DBOARD=${YOUR_BOARD_NAME}
make
```

**Additional context**
Add any other context about the problem here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Question
about: Describe the detailed questions that need answers
title: "[QUESTION]"
labels: ''
assignees: ''

---

**Describe the questions**
Describe the detailed questions that need answers.

**Target platform**
The target platform you are using.

**Commit Id**
The commit id you are using.
i.e 6f3d3eeccdcf5a36ad63d617712ff732714d40e3

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion samples/kvs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ message(STATUS "EMBEDDED_MEDIA_LINK_DIR - ${EMBEDDED_MEDIA_LINK_DIR}")
include(ExternalProject)
ExternalProject_Add(kvs-producer
GIT_REPOSITORY https://github.com/aws-samples/amazon-kinesis-video-streams-producer-embedded-c.git
GIT_TAG ca1c73196e9ec18f5ab7f67933ae53ad313bfa53
GIT_TAG v1.0.0
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${AWS_DEPENDENCIES_DIR}/kvs/ -DCMAKE_BUILD_TYPE=Release
BUILD_ALWAYS TRUE
GIT_PROGRESS TRUE
Expand Down
19 changes: 18 additions & 1 deletion samples/kvs/source/option_configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "option_configuration.h"
#include "sample_config.h"

#define AWS_ACCESS_KEY_ENV_VAR "AWS_ACCESS_KEY_ID"
#define AWS_SECRET_KEY_ENV_VAR "AWS_SECRET_ACCESS_KEY"
#define AWS_DEFAULT_REGION_ENV_VAR "AWS_DEFAULT_REGION"
#define AWS_SESSION_TOKEN_ENV_VAR "AWS_SESSION_TOKEN"
#define AWS_DEFAULT_REGION_ENV_VAR "AWS_DEFAULT_REGION"

#define AWS_KINESIS_VIDEO_HOST_ENV_VAR "AWS_KVS_HOST"

Expand Down Expand Up @@ -58,6 +59,22 @@ const char *OptCfg_getAwsSecretAccessKey()
return pAwsSecretAccessKey;
}

const char *OptCfg_getAwsSessionToken()
{
char *pAwsSessionToken = NULL;

#ifdef SAMPLE_OPTIONS_FROM_ENV_VAR
pAwsSessionToken = getenv(AWS_SESSION_TOKEN_ENV_VAR);
#endif /* SAMPLE_OPTIONS_FROM_ENV_VAR */

if (pAwsSessionToken == NULL)
{
pAwsSessionToken = strcmp(AWS_SESSION_TOKEN, "") ? AWS_SESSION_TOKEN : NULL;
}

return pAwsSessionToken;
}

const char *OptCfg_getRegion()
{
char *pRegion = NULL;
Expand Down
11 changes: 11 additions & 0 deletions samples/kvs/source/option_configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ const char *OptCfg_getAwsAccessKey();
*/
const char *OptCfg_getAwsSecretAccessKey();

/**
* @brief Get AWS session token
*
* It searches AWS secret access key with following order:
* 1. environment variable
* 2. sample_config.h
*
* @return AWS session token
*/
const char *OptCfg_getAwsSessionToken();

/**
* @brief Get AWS region
*
Expand Down
2 changes: 2 additions & 0 deletions samples/kvs/source/sample_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/* KVS general configuration */
#define AWS_ACCESS_KEY "xxxxxxxxxxxxxxxxxxxx"
#define AWS_SECRET_KEY "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
/* Only for AK/SK + STS case */
#define AWS_SESSION_TOKEN ""

/* KVS stream configuration */
#define KVS_STREAM_NAME "kvs_example_camera_stream"
Expand Down
2 changes: 1 addition & 1 deletion samples/webrtc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set(WEBRTC_CMAKE_C_FLAGS "-fPIC -std=gnu99")
include(ExternalProject)
ExternalProject_Add(kvs-webrtc
GIT_REPOSITORY https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c.git
GIT_TAG 111c253a0ebea9f4f774ee5896ab5f15c6a0ea12
GIT_TAG v1.7.2
CMAKE_ARGS -DADD_MUCLIBC=${USE_MUCLIBC}
-DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_SAMPLE=OFF -DBUILD_LIBSRTP_DESTINATION_PLATFORM=${BOARD_DESTINATION_PLATFORM} -DCMAKE_INSTALL_PREFIX=${AWS_DEPENDENCIES_DIR}/webrtc/
-DCMAKE_BUILD_TYPE=Release -DOPEN_SRC_INSTALL_PREFIX=${AWS_DEPENDENCIES_DIR}/webrtc/
Expand Down

0 comments on commit efdf470

Please sign in to comment.