Skip to content

Commit

Permalink
Update for develop (#740)
Browse files Browse the repository at this point in the history
* Minor syntax fix

.. is required for fetching files from parent dir ... without .. it throws error

* Update README and travis.yml to acknowledge develop

* Fix typo in readme

* add free missing (#746)

Co-authored-by: David D <david.desbiens@tentaq.com>

* Update readme (#744)

* Fix typo in readme

* Update Readme

Debug section: add solution to cmake error "could not find JNI"

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* Add instruction to set offline mode (#741)

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

Co-authored-by: Ketul shah <ketulshah1993@gmail.com>
Co-authored-by: Jeremy Gunawan <jggunawa@amazon.com>
Co-authored-by: waikup83 <waikup@hotmail.com>
Co-authored-by: David D <david.desbiens@tentaq.com>
Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>
Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>
  • Loading branch information
7 people authored Sep 1, 2021
1 parent 00ba9cf commit 79b05cb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ open-source/libautoconf
outputs
tags
dependency

.vs
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sudo: true
branches:
only:
- master
- develop

cache:
- directories:
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
* GStreamer Plugin (kvssink)
* JNI

Amazon Kinesis Video Streams Producer SDK for C/C++ makes it easy to build an on-device application that securely connects to a video stream, and reliably publishes video and other media data to Kinesis Video Streams. It takes care of all the underlying tasks required to package the frames and fragments generated by the device's media pipeline. The SDK also hand
les stream creation, token rotation for secure and uninterrupted streaming, processing acknowledgements returned by Kinesis Video Streams, and other tasks.
Amazon Kinesis Video Streams Producer SDK for C/C++ makes it easy to build an on-device application that securely connects to a video stream, and reliably publishes video and other media data to Kinesis Video Streams. It takes care of all the underlying tasks required to package the frames and fragments generated by the device's media pipeline. The SDK also handles stream creation, token rotation for secure and uninterrupted streaming, processing acknowledgements returned by Kinesis Video Streams, and other tasks.

## Build
### Download
Expand Down Expand Up @@ -84,31 +83,31 @@ You can pass the following options to `cmake ..`.

#### To Include JNI

JNI examples are NOT built by default. If you wish to build JNI you MUST add -DBUILD_JNI=TRUE when running cmake:
JNI examples are NOT built by default. If you wish to build JNI you MUST add `-DBUILD_JNI=TRUE` when running `cmake`:

```
cmake -DBUILD_JNI=TRUE
```

#### To Include Building GStreamer Sample Programs

The GStreamer plugin and samples are NOT built by default. If you wish to build them you MUST add -DBUILD_GSTREAMER_PLUGIN=TRUE when running cmake:
The GStreamer plugin and samples are NOT built by default. If you wish to build them you MUST add `-DBUILD_GSTREAMER_PLUGIN=TRUE` when running cmake:

```
cmake -DBUILD_GSTREAMER_PLUGIN=TRUE
cmake -DBUILD_GSTREAMER_PLUGIN=TRUE ..
```

### Compiling

After running cmake, in the same build directior run make:
After running cmake, in the same build directory run `make`:

```
make
```

On Windows you should run `nmake` instead of `make`

In your build directory you will now have shared objects for all the targets you have selected
In your build directory you will now have shared objects for all the targets you have selected.

## Run
### GStreamer Plugin (kvssink)
Expand Down Expand Up @@ -170,20 +169,25 @@ The kvssink element has the following required parameters:

For examples of common use cases you can look at [Example: Kinesis Video Streams Producer SDK GStreamer Plugin](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/examples-gstreamer-plugin.html)

## Running in offline mode
By default, the samples run in near realtime mode. To set offline mode, set streamInfo.streamCaps.streamingType to `STREAMING_TYPE_OFFLINE`, where, `streamInfo` is of type `StreamInfo`, `streamCaps` is of type `StreamCaps` and `streamingType` is of type `STREAMING_TYPE`.

## Dockerscripts
* The sample docker scripts for RTSP plugin, raspberry pi and linux can be found in the [Kinesis demos repository](https://github.com/aws-samples/amazon-kinesis-video-streams-demos/tree/master/producer-cpp).

## DEBUG
* When building the JNI, if you run into a cmake error `Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)`, make sure your environment variables are set correctly:
`export JAVA_INCLUDE_PATH2=/Library/Java/JavaVirtualMachines/<YOUR_JDK_VERSION>/Contents/Home/include` or `export JAVA_INCLUDE_PATH2=$JAVA_HOME/include` for Mac OS.
`export JAVA_INCLUDE_PATH2='/usr/java/<JDK_VERSION>/include'` for Linux.
* If you are successfully streaming but run into issue with playback. You can do `export KVS_DEBUG_DUMP_DATA_FILE_DIR=/path/to/directory` before streaming. Producer will then dump MKV files into that path. The file is exactly what KVS will receive. You can use [MKVToolNIX](https://mkvtoolnix.download/index.html) to check that everything looks correct. You can also try to play the MKV file in compatible players.

## FAQ
* Is CPP-SDK and GStreamer supported on Mac/Windows/Linux (Supported Platforms)
* Is CPP-SDK and GStreamer supported on Mac/Windows/Linux (Supported Platforms)?
Yes! We have FAQs and platform specific instructions for [Windows](docs/windows.md), [MacOS](docs/macos.md) and [Linux](docs/linux.md)

## Development

The repository is using master branch as the aggregation and all of the feature development is done in appropriate feature branches. The PRs (Pull Requests) are cut on a feature branch and once approved with all the checks passed they can be merged by a click of a button on the PR tool. The master branch should always be build-able and all the tests should be passing. We are welcoming any contribution to the code base.
The repository is using develop branch as the aggregation and all of the feature development is done in appropriate feature branches. The PRs (Pull Requests) are cut on a feature branch and once approved with all the checks passed they can be merged by a click of a button on the PR tool. The master branch should always be build-able and all the tests should be passing. We are welcoming any contribution to the code base. The master branch contains our most recent release cycle from develop.

### Release
The repository is under active development and even with incremental unit test coverage where some of the tests are actually full integration tests, we require more rigorous internal testing in order to 'cut' release versions. The release is cut against a particular commit that gets approved. The general philosophy is to cut a release when a set of commits contribute to a self-containing feature or when we add major internal functionality improvements.
Expand Down
5 changes: 5 additions & 0 deletions src/gstreamer/gstkvssink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,12 @@ gst_kvs_sink_finalize(GObject *object) {
g_free(kvssink->track_name);
g_free(kvssink->secret_key);
g_free(kvssink->access_key);
g_free(kvssink->aws_region);
g_free(kvssink->audio_codec_id);
g_free(kvssink->kms_key_id);
g_free(kvssink->log_config_path);
g_free(kvssink->credential_file_path);

if (kvssink->iot_certificate) {
gst_structure_free (kvssink->iot_certificate);
}
Expand Down

0 comments on commit 79b05cb

Please sign in to comment.