Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Add DeckLink documentation #599

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:

- name: 📄 Generate JSON schema
run: |
cargo run --bin generate_json_schema
cargo run --bin generate_docs
cargo run --bin generate_json_schema --features decklink
cargo run --bin generate_docs --features decklink

- name: 🧪 Run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable

- name: 📄 Generate docs from JSON schema
run: cargo run --bin generate_docs
run: cargo run --bin generate_docs --features decklink

- name: 🛠 Install dependencies
run: npm ci
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

### 💥 Breaking changes

<!-- - Example description. ([#1234](issue_url) by [@username](profile_url)) -->

### ✨ New features

- Support DeckLink cards as an input. ([#587](https://github.com/membraneframework/live_compositor/pull/587), [#597](https://github.com/membraneframework/live_compositor/pull/597), [#598](https://github.com/membraneframework/live_compositor/pull/598), [#599](https://github.com/membraneframework/live_compositor/pull/599) by [@wkozyra95](https://github.com/wkozyra95))

### 🐛 Bug fixes

## [v0.2.0](https://github.com/membraneframework/live_compositor/releases/tag/v0.2.0)
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/api/components/WebView.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
sidebar_position: 8
hide_table_of_contents: true
title: WebView
---

[<span class="badge badge--info">Required feature: web_renderer</span>](../../deployment/overview.md#web-renderer-support)

import Docs from "@site/pages/api/generated/component-WebView.md"

# WebView
Expand Down
14 changes: 14 additions & 0 deletions docs/pages/api/inputs/decklink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: DeckLink
---
import Docs from "@site/pages/api/generated/renderer-DeckLink.md"


<span class="badge badge--primary">Added in v0.3.0</span>
[<span class="badge badge--info">Required feature: decklink</span>](../../deployment/overview.md#decklink-support)

# DeckLink

An input type that allows consuming streams from Blackmagic DeckLink cards.

<Docs />
6 changes: 6 additions & 0 deletions docs/pages/api/renderers/web.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
title: Web Renderer
---

import Docs from "@site/pages/api/generated/renderer-WebRenderer.md"

[<span class="badge badge--info">Required feature: web_renderer</span>](../../deployment/overview.md#web-renderer-support)

# Web Renderer

Represents an instance of a website opened with Chromium embedded inside the compositor. Used by a [`WebView` component](../components/WebView). Only one `WebView` component can use a specific instance at a time.
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/api/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ POST: /api/input/:input_id/register

```typescript
type RequestBody = {
type: "rtp_stream" | "mp4";
type: "rtp_stream" | "mp4" | "decklink";
... // input specific options
}
```
Expand All @@ -110,6 +110,7 @@ Register external source that can be used as a compositor input. See inputs docu

- [RTP](./inputs/rtp.md)
- [MP4](./inputs/mp4.md)
- [DeckLink](./inputs/decklink.md)

### Unregister input

Expand Down
11 changes: 11 additions & 0 deletions docs/pages/deployment/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ or content provided by the end user. Unless you specifically need that capabilit
web rendering support.
:::

## DeckLink support

If you want to use a DeckLink device as an input you need to use binaries compiled with support for it. When building from
source you need to have `decklink` feature enabled (enabled by default).

Currently, we do not provide binaries or Dockerfiles with DeckLink support, and only support x86_64 Linux platform.

## Membrane Framework plugin

#### Requirements
Expand All @@ -51,3 +58,7 @@ configure compositor with environment variables.

Default binary used by the plugin was built without web rendering support. To use web rendering inside the plugin you need to override
the compositor binary.

#### DeckLink support

Not supported
2 changes: 1 addition & 1 deletion docs/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const sidebars: SidebarsConfig = {
label: 'Inputs',
collapsible: false,
description: 'Elements that deliver media from external sources.',
items: ['api/inputs/rtp', 'api/inputs/mp4'],
items: ['api/inputs/rtp', 'api/inputs/mp4', 'api/inputs/decklink'],
},
],
},
Expand Down
5 changes: 3 additions & 2 deletions src/bin/generate_docs/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use docs_config::DocsConfig;
use document::generate;
use live_compositor::types::{
Image, ImageSpec, InputStream, Mp4, Rescaler, RtpInputStream, RtpOutputStream, Shader,
ShaderSpec, Text, Tiles, View, WebRendererSpec, WebView,
DeckLink, Image, ImageSpec, InputStream, Mp4, Rescaler, RtpInputStream, RtpOutputStream,
Shader, ShaderSpec, Text, Tiles, View, WebRendererSpec, WebView,
};
use markdown::overrides;
use std::{fs, path::PathBuf};
Expand Down Expand Up @@ -34,6 +34,7 @@ fn main() {
generate::<WebRendererSpec>("WebRenderer", &config),
generate::<RtpInputStream>("RtpInputStream", &config),
generate::<Mp4>("Mp4", &config),
generate::<DeckLink>("DeckLink", &config),
];

let component_pages = [
Expand Down
8 changes: 4 additions & 4 deletions src/types/register_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ pub struct DeckLink {
/// Single DeckLink device can consist of multiple sub-devices. This field defines
/// index of sub-device that should be used.
///
/// When selecting an input device both `subdevice_index` AND `display_name` fields need
/// to match id they are specified.
/// When selecting an input device both `subdevice_index` **AND** `display_name` fields need
/// to match if they are specified.
pub subdevice_index: Option<u32>,

/// Select sub-device to use based on the display name. This is the value you see in e.g.
/// Blackmagic Media Express app. like "DeckLink Quad HDMI Recorder (3)"
///
/// When selecting an input both `subdevice_index` AND `display_name` fields need
/// to match id they are specified.
/// When selecting an input both `subdevice_index` **AND** `display_name` fields need
/// to match if they are specified.
pub display_name: Option<String>,

/// (**default=`true`**) Enable audio support.
Expand Down