diff --git a/api/TimeAddressableMediaStore.yaml b/api/TimeAddressableMediaStore.yaml index 74ba911..9cb3711 100644 --- a/api/TimeAddressableMediaStore.yaml +++ b/api/TimeAddressableMediaStore.yaml @@ -263,8 +263,24 @@ paths: application/json: schema: $ref: schemas/flow.json - example: - $ref: examples/flow-get-200.json + examples: + video: + summary: Video Flow - H.264 Codec + value: + $ref: examples/flow-get-200-video-h264.json + audio: + summary: Audio Flow - AAC Codec + value: + $ref: examples/flow-get-200-audio-aac.json + rawvideo: + summary: Video Flow - Uncompressed (Quicktime) + value: + $ref: examples/flow-get-200-video-raw.json + ttml: + summary: Data Flow - TTML + description: TAMS can also be used for storing non-AV content such as subtitles or event data + value: + $ref: examples/flow-get-200-data-ttml.json "404": description: The requested flow does not exist. "400": @@ -545,8 +561,22 @@ paths: type: boolean content: application/json: - example: - $ref: examples/flow-segments-get-200.json + schema: + type: array + items: + $ref: schemas/flow-segment.json + examples: + basic: + summary: Basic Example + value: + $ref: examples/flow-segments-get-200.json + sample_count: + summary: Partial Segment + description: | + This example takes part of an existing segment, offsets it with `ts_offset` and then selects a + subset of the samples within using `ts_offset` for the second segment in the sequence. + value: + $ref: examples/flow-segments-get-200-sample-offset.json post: description: | Register a new flow segment, attaching the object id given to a point in the flow timeline. diff --git a/api/examples/flow-get-200-audio-aac.json b/api/examples/flow-get-200-audio-aac.json new file mode 100644 index 0000000..020aeb5 --- /dev/null +++ b/api/examples/flow-get-200-audio-aac.json @@ -0,0 +1,24 @@ +{ + "id": "6101df05-06bb-41b8-8af4-cf7cd33df209", + "source_id": "41d7f7eb-c48d-4513-9b37-17b418d26d7f", + "generation": 1, + "created": "2018-03-06T09:10:22Z", + "metadata_updated": "2018-03-06T09:12:22Z", + "segments_updated": "2018-03-06T11:14:32Z", + "description": "audio capture web", + "label": "capture_1", + "format": "urn:x-nmos:format:audio", + "created_by": "tams-dev", + "tags": { + "quality": "web", + "_tams_segmentation_rate": "375/8" + }, + "codec": "audio/aac", + "container": "video/mp2t", + "avg_bit_rate": 128, + "sample_rate": 48000, + "channels": 2, + "bit_depth": 24, + "coded_frame_size": 1024, + "mp4_oti": 2 +} \ No newline at end of file diff --git a/api/examples/flow-get-200-data-ttml.json b/api/examples/flow-get-200-data-ttml.json new file mode 100644 index 0000000..b029c7d --- /dev/null +++ b/api/examples/flow-get-200-data-ttml.json @@ -0,0 +1,13 @@ +{ + "id": "e85efab4-993b-4ad6-9af3-4cd8d0d38860", + "source_id": "a77d0061-0878-4e8a-a114-772d03f952c1", + "format": "urn:x-nmos:format:data", + "generation": 0, + "created": "2023-12-14T16:34:58.131620", + "tags": { + "_tams_segmentation_rate": "200" + }, + "codec": "application/ttml+xml", + "container": "application/ttml+xml", + "data_type": "urn:x-tams:data:subtitle" +} \ No newline at end of file diff --git a/api/examples/flow-get-200.json b/api/examples/flow-get-200-video-h264.json similarity index 100% rename from api/examples/flow-get-200.json rename to api/examples/flow-get-200-video-h264.json diff --git a/api/examples/flow-get-200-video-raw.json b/api/examples/flow-get-200-video-raw.json new file mode 100644 index 0000000..342c3a8 --- /dev/null +++ b/api/examples/flow-get-200-video-raw.json @@ -0,0 +1,41 @@ +{ + "id": "0fde9c11-da9d-434a-a113-d3b20a2cf251", + "source_id": "2aa143ac-0ab7-4d75-bc32-5c00c13d186f", + "generation": 0, + "created": "2018-03-06T09:10:22Z", + "metadata_updated": "2018-03-06T09:12:22Z", + "segments_updated": "2018-03-06T11:14:32Z", + "description": "video capture", + "label": "capture_1", + "format": "urn:x-nmos:format:video", + "created_by": "tams-dev", + "tags": { + "quality": "full", + "_tams_segmentation_rate": "25" + }, + "codec": "video/raw", + "container": "video/quicktime", + "avg_bit_rate": 1658880, + "frame_rate": { + "numerator": 50, + "denominator": 1 + }, + "frame_width": 1920, + "frame_height": 1080, + "bit_depth": 8, + "interlace_mode": "progressive", + "colorspace": "BT709", + "transfer_characteristic": "SDR", + "aspect_ratio": { + "numerator": 16, + "denominator": 9 + }, + "pixel_aspect_ratio": { + "numerator": 1, + "denominator": 1 + }, + "component_type": "YCbCr", + "unc_type": "UYVY", + "vert_chroma_subs": 1, + "horiz_chroma_subs": 2 +} \ No newline at end of file diff --git a/api/examples/flow-segments-get-200-sample-offset.json b/api/examples/flow-segments-get-200-sample-offset.json new file mode 100644 index 0000000..6c0fa94 --- /dev/null +++ b/api/examples/flow-segments-get-200-sample-offset.json @@ -0,0 +1,27 @@ +[ + { + "object_id": "tams-demo/tams-67cd7994-47d4-4e89-9e9f-5e548b7eb7dd.ts", + "range": "[0:0_10:0)", + "sample_count": 240, + "sample_offset": 0, + "get_url": "https://a4c52e22f45b4a0fa3ea3b9a42b35808-tams-demo.static.lon1.bbcis.uk/tams-67cd7994-47d4-4e89-9e9f-5e548b7eb7dd.ts", + "key_frame_count": 10 + }, + { + "object_id": "tams-demo/tams-7dffa41c-9e12-4e7d-a269-0aae8351d806.ts", + "range": "[10:0_15:0)", + "ts_offset": "5:0", + "sample_count": 120, + "sample_offset": 60, + "get_url": "https://a4c52e22f45b4a0fa3ea3b9a42b35808-tams-demo.static.lon1.bbcis.uk/tams-7dffa41c-9e12-4e7d-a269-0aae8351d806.ts", + "key_frame_count": 5 + }, + { + "object_id": "tams-demo/tams-bdfb03ae-25a5-4a72-9b9e-14c5119813c9.ts", + "range": "[15:0_25:0)", + "sample_count": 240, + "sample_offset": 0, + "get_url": "https://a4c52e22f45b4a0fa3ea3b9a42b35808-tams-demo.static.lon1.bbcis.uk/tams-bdfb03ae-25a5-4a72-9b9e-14c5119813c9.ts", + "key_frame_count": 10 + } +]