@huddly/camera-proto
v1.4.0
Published
An npm package describing the protobuf api for huddly network cameras
Downloads
15
Readme
falcon-interface
Language and style guide for proto3
The .proto format: https://developers.google.com/protocol-buffers/docs/proto3 Style guide: https://developers.google.com/protocol-buffers/docs/style Guides to use the interface in C++, python etc. is found in the menu to the left in the above links.
Important note about enums:
- The default value is the first defined enum value, which must be 0.
- The zero value enum should have the suffix unspecified. E.g. it should not be used under normal conditions.
- The zero value needs to be the first element, for compatibility with the proto2 semantics where the first enum value is always the default.
How to build
conan create . -r conan -pr:h x86_64-gcc-10-2 --user huddly -pr:b x86_64-gcc-10-2
Proto markups
Below you can see the different markups that are used to ignore proto code that is specific to huddly. When generating the google proto file, all the code that has been tagged with the markup lines will not be present.
// @HuddlyOnly-NextBlock
This markup will ignore the whole block that follows after the markup line. It will also ignore any nested blocks within the ignore block.
// @HuddlyOnly-NextLine
This markup will ignore the next line that follows after the markup line.
Releasing NPM package
NOTE: There is a bug with ts-protoc-gen
dependency where the generated ts file has the wrong import (imports "grpc" instead of "@grpc/grpc-js"). For now, this issue/file needs to be update manually before publishing the package.
Making a npm release is done manually by one of the developers with publishing access to our huddly organization account on npmjs. The following procedure should be followed when wanting to make a new npm package release:
- Make sure you know what is the current released version on artifactory (through conan) for falcon interface and use that to bump the version on package.json
- You can either update the version manually by editting the package.json or run
npm version [patch|minor|major]
to bump it through npm
- You can either update the version manually by editting the package.json or run
- After having updated the package.json version, make sure you commit the changes to github
- Last step is to make the actual release. You can do that by running the following command
npm run publish-package
. NOTE Running this command requires you to be logged in to npmjs through your terminal windows with the huddly account.
Releasing Nuget package
The simplest way to release a nuget package is to use the github actions workflow specified in the next section. If you wish to do it manually, see the
Deploying through GitHub Actions
First decide if you wish to create a stable release, or a pre-release.
Pre-release
Go to the actions pane on GitHub -> select the 'Compile and publish' workflow -> 'Run workflow' -> select the appropriate branch
Stable
Go to 'Releases' on GitHub -> Draft a new release -> Choose a tag, just create a new tag that follows the convention (vX.Y.Z) -> Check 'Set as the latest release' -> Publish release
Deploying manually
Build C# files
Note: To build the C# files you need to have protoc installed. It's possible to do this windows, but the current author have only tested these steps through linux (WSL).
protoc --proto_path=api/ --csharp_out=lib api/huddly.proto
Setup Artifactory sources in nuget
Making a nuget release is done manually by whomever has access to artifactory. The following procedure should be followed:
- Go to artifactory.huddly.io and log in. Navigate to artifacts and locate
huddly-nuget
repository. Click on the repository and go toSet me Up
- On the
Set me up page
of the nuget repository, enter you password and copy the information for setting up your nuget repository locally - The following command sets up a nuget repository (Note, if you enter the password on the set me up page, you can use the authentication key instead of the password on the next command):
nuget sources Add -Name Artifactory -Source https://artifactory.huddly.io/artifactory/api/nuget/nuget -username <USERNAME> -password <PASSWORD/API_KEY>
nuget sources Add -Name ArtifactoryNugetLocal -Source https://artifactory.huddly.io/artifactory/api/nuget/nuget-local -username <USERNAME> -password <PASSWORD/API_KEY>
- After having run that command you need to make sure you authenticate yourself against that repository. The following command can be used:
nuget setapikey <USERNAME>:<PASSWORD/API_KEY> -Source Artifactory
nuget setapikey <USERNAME>:<PASSWORD/API_KEY> -Source ArtifactoryNugetLocal
Publishing on artifactory
- Now you are good to publish any nuget packages to the nuget-local repository on artifactory.
- By setting up the
nuget
repository locally, you can fetch nuget packages from the official nuget registry but also from our own one hosted on artifactorynuget
is a virtual repositorynuget-local
is a local repository where we host our nuget packagesnuget-remote
is a remote repository in artifactory pointing to official nuget registry (this one we dont have to set up as setting up the virtual one is sufficient)
- Make sure your versions are matching on all packages (npm and nuget). TIP: you can use
./scripts/bump_version.sh
script to bump the versions for the npm and nuget packages. - Pack and push your new nuget package using the following command:
nuget pack Huddly.CameraProto.nuspec
nuget push <.nupkg file generated by previous command> -Source ArtifactoryNugetLocal
- Locate your newly pushed nuget package on the
nuget-local
repository on artifactory.
NOTE: Affected projects when doing changes to this repository and/or making new releases include:
Director Modes
modes {
mode: "speaker-centric"
}
modes {
mode: "default"
}
- speaker-centric = "Speaker"
- default = "Conversation"