Docs: More updates

Changes the media stuff's `@since 4.9.0` to `@since unreleased`
to reduce potential confusion on the docs. As a part of the final
4.9.0 commits, I will be changing it back to 4.9.0. We also fix the
contributing document since it was all messed up.
This commit is contained in:
tt2468 2020-07-09 03:50:50 -07:00
parent 9cdb32d56a
commit aa8fa00811
3 changed files with 45 additions and 45 deletions

View File

@ -12,22 +12,22 @@ Localization happens on [Crowdin](https://crowdin.com/project/obs-websocket)
### Code Formatting Guidelines
- Function and variable names: snake_case for C names, camelCase for C++ method names
* Function and variable names: snake_case for C names, camelCase for C++ method names
- Request and Event names should use MixedCaps names
* Request and Event names should use MixedCaps names
- Request and Event json properties should use camelCase. For more detailed info on property naming, see [Google's JSON Style Guide](https://google.github.io/styleguide/jsoncstyleguide.xml)
* Request and Event json properties should use camelCase. For more detailed info on property naming, see [Google's JSON Style Guide](https://google.github.io/styleguide/jsoncstyleguide.xml)
- Code is indented with Tabs. Assume they are 8 columns wide
* Code is indented with Tabs. Assume they are 8 columns wide
- 80 columns max code width. (Docs can be larger)
* 80 columns max code width. (Docs can be larger)
- New and updated requests/events must always come with accompanying documentation comments (see existing protocol elements for examples).
These are required to automatically generate the [protocol specification document](docs/generated/protocol.md).
* New and updated requests/events must always come with accompanying documentation comments (see existing protocol elements for examples).
These are required to automatically generate the [protocol specification document](docs/generated/protocol.md).
### Code Best-Practices
- Favor return-early code and avoid wrapping huge portions of code in conditionals. As an example, this:
* Favor return-early code and avoid wrapping huge portions of code in conditionals. As an example, this:
```cpp
if (success) {
return req->SendOKResponse();
@ -43,23 +43,23 @@ if (!success) {
return req->SendOKResponse();
```
- Some example common response/request property names are:
- `sceneName` - The name of a scene
- `sourceName` - The name of a source
- `fromScene` - From a scene - scene name
* Some example common response/request property names are:
* `sceneName` - The name of a scene
* `sourceName` - The name of a source
* `fromScene` - From a scene - scene name
### Commit Guidelines
- Commits follow the 50/72 standard:
- 50 characters max for the commit title (excluding scope name)
- One empty line after the title
- Description wrapped to 72 columns max width per line.
* Commits follow the 50/72 standard:
* 50 characters max for the commit title (excluding scope name)
* One empty line after the title
* Description wrapped to 72 columns max width per line.
- Commit titles:
- Use present tense
- Prefix the title with a "scope" name
- e.g: "CI: fix wrong behaviour when packaging for OS X"
- Typical scopes: CI, General, Requests, Events, Server
* Commit titles:
* Use present tense
* Prefix the title with a "scope" name
* e.g: "CI: fix wrong behaviour when packaging for OS X"
* Typical scopes: CI, General, Requests, Events, Server
**Example commit:**
@ -73,10 +73,10 @@ transitions.
### Pull Requests
- Pull Requests must never be based off your fork's main branch (in this case, `4.x-current`).
- Start your work in a newly named branch based on the upstream main one (e.g.: `feature/cool-new-feature`, `bugfix/fix-palakis-mistakes`, ...)
* Pull Requests must never be based off your fork's main branch (in this case, `4.x-current`).
* Start your work in a newly named branch based on the upstream main one (e.g.: `feature/cool-new-feature`, `bugfix/fix-palakis-mistakes`, ...)
- Only open a pull request if you are ready to show off your work.
* Only open a pull request if you are ready to show off your work.
- If your work is not done yet, but for any reason you need to PR it (like collecting discussions, testing with CI, getting testers),
create it as a Draft Pull Request** (open the little arrow menu next to the "Create pull request" button, then select "Create draft pull request").
* If your work is not done yet, but for any reason you need to PR it (like collecting discussions, testing with CI, getting testers),
create it as a Draft Pull Request (open the little arrow menu next to the "Create pull request" button, then select "Create draft pull request").

View File

@ -1430,7 +1430,7 @@ void WSEvents::OnSourceFilterOrderChanged(void* param, calldata_t* data) {
* @api events
* @name MediaPlaying
* @category media
* @since 4.9.0
* @since unreleased
*/
void WSEvents::OnMediaPlaying(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
@ -1451,7 +1451,7 @@ void WSEvents::OnMediaPlaying(void* param, calldata_t* data) {
* @api events
* @name MediaPaused
* @category media
* @since 4.9.0
* @since unreleased
*/
void WSEvents::OnMediaPaused(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
@ -1472,7 +1472,7 @@ void WSEvents::OnMediaPaused(void* param, calldata_t* data) {
* @api events
* @name MediaRestarted
* @category media
* @since 4.9.0
* @since unreleased
*/
void WSEvents::OnMediaRestarted(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
@ -1493,7 +1493,7 @@ void WSEvents::OnMediaRestarted(void* param, calldata_t* data) {
* @api events
* @name MediaStopped
* @category media
* @since 4.9.0
* @since unreleased
*/
void WSEvents::OnMediaStopped(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
@ -1514,7 +1514,7 @@ void WSEvents::OnMediaStopped(void* param, calldata_t* data) {
* @api events
* @name MediaNext
* @category media
* @since 4.9.0
* @since unreleased
*/
void WSEvents::OnMediaNext(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
@ -1535,7 +1535,7 @@ void WSEvents::OnMediaNext(void* param, calldata_t* data) {
* @api events
* @name MediaPrevious
* @category media
* @since 4.9.0
* @since unreleased
*/
void WSEvents::OnMediaPrevious(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
@ -1556,7 +1556,7 @@ void WSEvents::OnMediaPrevious(void* param, calldata_t* data) {
* @api events
* @name MediaStarted
* @category media
* @since 4.9.0
* @since unreleased
*/
void WSEvents::OnMediaStarted(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
@ -1577,7 +1577,7 @@ void WSEvents::OnMediaStarted(void* param, calldata_t* data) {
* @api events
* @name MediaEnded
* @category media
* @since 4.9.0
* @since unreleased
*/
void WSEvents::OnMediaEnded(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);

View File

@ -51,7 +51,7 @@ QString getSourceMediaState(obs_source_t *source)
* @api requests
* @name PlayPauseMedia
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::PlayPauseMedia(const RpcRequest& request) {
if ((!request.hasField("sourceName")) || (!request.hasField("playPause"))) {
@ -81,7 +81,7 @@ RpcResponse WSRequestHandler::PlayPauseMedia(const RpcRequest& request) {
* @api requests
* @name RestartMedia
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::RestartMedia(const RpcRequest& request) {
if (!request.hasField("sourceName")) {
@ -110,7 +110,7 @@ RpcResponse WSRequestHandler::RestartMedia(const RpcRequest& request) {
* @api requests
* @name StopMedia
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::StopMedia(const RpcRequest& request) {
if (!request.hasField("sourceName")) {
@ -139,7 +139,7 @@ RpcResponse WSRequestHandler::StopMedia(const RpcRequest& request) {
* @api requests
* @name NextMedia
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::NextMedia(const RpcRequest& request) {
if (!request.hasField("sourceName")) {
@ -168,7 +168,7 @@ RpcResponse WSRequestHandler::NextMedia(const RpcRequest& request) {
* @api requests
* @name PreviousMedia
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::PreviousMedia(const RpcRequest& request) {
if (!request.hasField("sourceName")) {
@ -200,7 +200,7 @@ RpcResponse WSRequestHandler::PreviousMedia(const RpcRequest& request) {
* @api requests
* @name GetMediaDuration
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::GetMediaDuration(const RpcRequest& request) {
if (!request.hasField("sourceName")) {
@ -232,7 +232,7 @@ RpcResponse WSRequestHandler::GetMediaDuration(const RpcRequest& request) {
* @api requests
* @name GetMediaTime
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::GetMediaTime(const RpcRequest& request) {
if (!request.hasField("sourceName")) {
@ -263,7 +263,7 @@ RpcResponse WSRequestHandler::GetMediaTime(const RpcRequest& request) {
* @api requests
* @name SetMediaTime
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::SetMediaTime(const RpcRequest& request) {
if (!request.hasField("sourceName") || !request.hasField("timestamp")) {
@ -295,7 +295,7 @@ RpcResponse WSRequestHandler::SetMediaTime(const RpcRequest& request) {
* @api requests
* @name ScrubMedia
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::ScrubMedia(const RpcRequest& request) {
if (!request.hasField("sourceName") || !request.hasField("timeOffset")) {
@ -332,7 +332,7 @@ RpcResponse WSRequestHandler::ScrubMedia(const RpcRequest& request) {
* @api requests
* @name GetMediaState
* @category media control
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::GetMediaState(const RpcRequest& request) {
if (!request.hasField("sourceName")) {
@ -366,7 +366,7 @@ RpcResponse WSRequestHandler::GetMediaState(const RpcRequest& request) {
* @api requests
* @name GetMediaSourcesList
* @category sources
* @since 4.9.0
* @since unreleased
*/
RpcResponse WSRequestHandler::GetMediaSourcesList(const RpcRequest& request)
{