This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from RainwayApp/beta
feat(0.3.0): Stabilize from `0.3.0-beta.1` to `0.3.0`
- Loading branch information
Showing
10 changed files
with
838 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,11 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
- beta | ||
push: | ||
branches: | ||
- main | ||
- beta | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
|
@@ -25,20 +27,20 @@ jobs: | |
run: cmake . -B build && cmake --build build --config Debug && cmake --build build --config Release | ||
|
||
- name: Parse git commit | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' }} | ||
run: echo GH_REL_TAG=$(git rev-parse --short HEAD 2> /dev/null | sed "s/\(.*\)/v0-\1/") >> $GITHUB_ENV | ||
|
||
# Remotely we create and push the tag | ||
- name: Create Release Tag | ||
run: git tag ${{ env.GH_REL_TAG }} && git push origin ${{ env.GH_REL_TAG }} | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' }} | ||
|
||
# Locally we debug the tag parse | ||
- run: echo ${{ env.GH_REL_TAG }} | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' }} | ||
|
||
- name: Package Public | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' }} | ||
shell: pwsh | ||
run: | | ||
mkdir rel | ||
|
@@ -48,9 +50,10 @@ jobs: | |
# Remotely we create the release from the tag | ||
- name: GH Release | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' }} | ||
uses: softprops/[email protected] | ||
with: | ||
tag_name: ${{ env.GH_REL_TAG }} | ||
prerelease: ${{ github.ref != 'refs/heads/main' }} | ||
generate_release_notes: true | ||
files: rel/*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# host-example | ||
|
||
This example demonstrates how to build a simple host application using the Rainway SDK in a C++ application. | ||
|
||
It accepts all incoming stream requests from clients (such as the [Web Demo](https://webdemo.rainway.com/)). | ||
|
||
For more information about Rainway, see [our docs](https://docs.rainway.com). To sign up, visit [rainway.com](https://rainway.com). | ||
|
||
## Building and running this example | ||
|
||
See the [parent README](../README.md) for detailed build instructions. | ||
|
||
```ps1 | ||
cd .. | ||
cmake . -B build | ||
cmake --build build -t host-example | ||
# Get your Rainway API key here: https://hub.rainway.com/keys | ||
.\build\bin\Debug\host-example.exe pk_live_YourRainwayApiKey | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# You may install cmake from https://cmake.org/download/ | ||
cmake_minimum_required(VERSION 3.22.0) | ||
project("video-player-example") | ||
|
||
# Create an executable target from our source | ||
add_executable(${PROJECT_NAME} src/main.cpp) | ||
add_compile_definitions(NOMINMAX) | ||
|
||
# Specify the target uses the c++ linker | ||
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) | ||
|
||
# Specify the target binary should output to <build_dir>/bin | ||
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") | ||
|
||
# Specify the target uses c++17 | ||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) | ||
|
||
# Link the target against the downloaded rainwaysdk | ||
target_link_libraries(${PROJECT_NAME} rainwaysdk) | ||
|
||
# Include the downloaded rainwaysdk include dir (where the header is) for the target | ||
# Note: rainwaysdk_SOURCE_DIR is autocreated by FetchContent_MakeAvailable() | ||
target_include_directories(${PROJECT_NAME} PRIVATE ${rainwaysdk_SOURCE_DIR}/include) | ||
|
||
# Include the downloaded rainwaysdk root dir (where the dll and lib are) for the target | ||
# Note: rainwaysdk_SOURCE_DIR is autocreated by FetchContent_MakeAvailable() | ||
target_link_directories(${PROJECT_NAME} PRIVATE ${rainwaysdk_SOURCE_DIR}) | ||
|
||
# Add a custom command to copy the rainwaysdk dll to the build directory | ||
# If the build directory has a different version (or no dll) | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
"${rainwaysdk_SOURCE_DIR}/rainwaysdk.dll" | ||
$<TARGET_FILE_DIR:${PROJECT_NAME}>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# video-player-example | ||
|
||
This C++ example uses the Rainway SDK's [BYOFB mode](https://docs.rainway.com/docs/byofb) and [MediaFoundation](https://docs.microsoft.com/en-us/windows/win32/medfound/microsoft-media-foundation-sdk) to stream video from a file. | ||
|
||
It accepts all incoming stream requests from clients (such as the [Web Demo](https://webdemo.rainway.com/)), and streams the video to them. Try connecting with multiple clients at once! | ||
|
||
For more information about Rainway, see [our docs](https://docs.rainway.com). To sign up, visit [rainway.com](https://rainway.com). | ||
|
||
## Building and running this example | ||
|
||
See the [parent README](../README.md) for detailed build instructions. | ||
|
||
```ps1 | ||
cd .. | ||
cmake . -B build | ||
cmake --build build -t video-player-example | ||
# Get your Rainway API key here: https://hub.rainway.com/keys | ||
.\build\bin\Debug\video-player-example.exe pk_live_YourRainwayApiKey C:\path\to\media.mp4 | ||
``` |
Oops, something went wrong.