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

Clarify role of connection-map vs input-ports and output-ports #42

Open
mtneug opened this issue Dec 23, 2022 · 0 comments
Open

Clarify role of connection-map vs input-ports and output-ports #42

mtneug opened this issue Dec 23, 2022 · 0 comments

Comments

@mtneug
Copy link

mtneug commented Dec 23, 2022

The connection-map is described as follows:

The array of connection-map object provides a description of the media workflow DAG, i.e. the connection information between different tasks in the graph. (Subclause 8.4.1)

The input-ports and output-ports are described as follows:

The input-ports and output-ports objects specify the endpoints where the data is communicated from NBMP sources to tasks; and between tasks; and from tasks to NBMP sinks. (Subclause 8.2.1)

It's unclear to me what will ultimately define the DAG. My current understanding is that connection-map defines the DAG between tasks and input-ports and output-ports are only used to connect input and output streams to tasks and otherwise only describe available in-/output ports.

Assume the following workflow:

input -> normalize -> transcode720p -> output

Would the following WDD be a proper description (omitting some of the required fields)?

As a side question: Why is the function ID specified as part of the connection-map instead of in the function-restrictions. If one task has multiple connections, the function ID is repeated multiple times with possible inconsistencies.

{
  "general": {
    "name": "Example"
  },
  "input": {
    "media-parameters": [
      {
        "stream-id": "videoIn1",
        "name": "videoIn1",
        "keywords": [
          "master"
        ],
        "mime-type": "video/mp4",
        "protocol": "http",
        "mode": "pull",
        "caching-server-url": "http://example.com/master.mp4"
      }
    ]
  },
  "output": {
    "media-parameters": [
      {
        "stream-id": "videoOut1",
        "name": "videoOut1",
        "keywords": [
          "720p"
        ],
        "mime-type": "video/mp4",
        "protocol": "http",
        "mode": "push",
        "caching-server-url": "http://example.com/720p.mp4"
      }
    ]
  },
  "processing": {
    "connection-map": [
      {
        "connection-id": "normalize -> transcode720p",
        "from": {
          "id": "normalize-function",
          "instance": "normalize",
          "port-name": "normalize-video-output"
        },
        "to": {
          "id": "transcode-function",
          "instance": "transcode720p",
          "port-name": "transcode720p-video-input"
        }
      }
    ],
    "function-restrictions": [
      {
        "instance": "normalize",
        "general": {
          "id": "normalize",
          "name": "normalize",
          "input-ports": [
            {
              "port-name": "normalize-video-input",
              "bind": {
                "stream-id": "videoIn1",
                "name": "normalize-video-input"
              }
            }
          ],
          "output-ports": [
            {
              "port-name": "normalize-video-output",
              "bind": {
                // Do I need to specify `stream-id`?
                "name": "normalize-video-output"
              }
            }
          ]
        }
      },
      {
        "instance": "transcode720p",
        "general": {
          "id": "transcode720p",
          "name": "transcode720p",
          "input-ports": [
            {
              "port-name": "transcode720p-video-input",
              "bind": {
                // Do I need to specify `stream-id`?
                "name": "transcode720p-video-input"
              }
            }
          ],
          "output-ports": [
            {
              "port-name": "transcode720p-video-output",
              "bind": {
                "stream-id": "videoOut1",
                "name": "transcode720p-video-output"
              }
            }
          ]
        }
      }
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant