generated from AMWA-TV/info-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2503438
commit 1ffd12b
Showing
10 changed files
with
760 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { jsonIgnoreReplacer } from "json-ignore"; | ||
import { NmosResource } from "./NmosResource"; | ||
import { RegistrationClient } from "./RegistrationClient"; | ||
|
||
export class NmosFlow extends NmosResource | ||
{ | ||
public source_id: string; | ||
public device_id: string; | ||
public parents: string[]; | ||
public grain_rate: object; | ||
|
||
public constructor( | ||
id: string, | ||
source_id: string, | ||
device_id: string, | ||
base_label: string, | ||
parents: string[], | ||
grain_rate_numerator: number, | ||
grain_rate_denominator: number, | ||
registrationClient: RegistrationClient) | ||
{ | ||
super(id, `${base_label} flow`, registrationClient); | ||
|
||
this.source_id = source_id; | ||
this.device_id = device_id; | ||
this.parents = parents; | ||
this.grain_rate = { | ||
"numerator": grain_rate_numerator, | ||
"denominator": grain_rate_denominator | ||
}; | ||
this.tags = {}; | ||
} | ||
|
||
public ToJson() | ||
{ | ||
return JSON.stringify(this, jsonIgnoreReplacer); | ||
} | ||
|
||
public ToJsonArray() | ||
{ | ||
return JSON.stringify([this], jsonIgnoreReplacer); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { jsonIgnoreReplacer } from "json-ignore"; | ||
import { RegistrationClient } from "./RegistrationClient"; | ||
import { NmosFlow } from "./NmosFlow"; | ||
|
||
export class NmosFlowVideo extends NmosFlow | ||
{ | ||
public format: string; | ||
public frame_width: number; | ||
public frame_height: number; | ||
public colorspace: string; | ||
public interlace_mode: string; | ||
public transfer_characteristic: string; | ||
public media_type: string; | ||
public components: object[]; | ||
|
||
public constructor( | ||
id: string, | ||
source_id: string, | ||
device_id: string, | ||
label: string, | ||
parents: string[], | ||
grain_rate_numerator: number, | ||
grain_rate_denominator: number, | ||
format: string, | ||
frame_width: number, | ||
frame_height: number, | ||
colorspace: string, | ||
interlace_mode: string, | ||
transfer_characteristic: string, | ||
media_type: string, | ||
components: object[], | ||
registrationClient: RegistrationClient) | ||
{ | ||
super(id, source_id, device_id, label, parents, grain_rate_numerator, grain_rate_denominator, registrationClient); | ||
|
||
this.format = format; | ||
this.frame_width = frame_width; | ||
this.frame_height = frame_height; | ||
this.colorspace = colorspace; | ||
this.interlace_mode = interlace_mode; | ||
this.transfer_characteristic = transfer_characteristic; | ||
this.media_type = media_type; | ||
this.components = components; | ||
} | ||
|
||
public ToJson() | ||
{ | ||
return JSON.stringify(this, jsonIgnoreReplacer); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import { jsonIgnore, jsonIgnoreReplacer } from "json-ignore"; | ||
import { NmosResource } from "./NmosResource"; | ||
import { RegistrationClient } from "./RegistrationClient"; | ||
import { NmosActivation, TransportParamsSet } from "./NmosReceiverCore"; | ||
|
||
export abstract class NmosSender extends NmosResource | ||
{ | ||
public flow_id: string; | ||
public device_id: string; | ||
public transport: string; | ||
public interface_bindings: string[]; | ||
public subscription: object; | ||
public manifest_href: string; | ||
|
||
@jsonIgnore() | ||
public constraints: object[]; | ||
|
||
@jsonIgnore() | ||
public active: NmosSenderActive | null; | ||
|
||
@jsonIgnore() | ||
public staged: NmosSenderActive | null; | ||
|
||
public caps: object; | ||
|
||
public constructor( | ||
id: string, | ||
flow_id: string, | ||
device_id: string, | ||
base_label: string, | ||
transport: string, | ||
manifest_href: string, | ||
registrationClient: RegistrationClient) | ||
{ | ||
super(id, `${base_label} sender`, registrationClient); | ||
|
||
this.flow_id = flow_id; | ||
this.device_id = device_id; | ||
this.transport = transport; | ||
this.interface_bindings = [ 'eth0' ]; | ||
this.manifest_href = manifest_href; | ||
this.subscription = { | ||
"receiver_id": null, | ||
"active": true | ||
}; | ||
this.tags = {}; | ||
this.caps = {}; | ||
|
||
this.active = null; | ||
this.staged = null; | ||
this.constraints = []; | ||
} | ||
|
||
public ToJson() | ||
{ | ||
return JSON.stringify(this, jsonIgnoreReplacer); | ||
} | ||
|
||
public FetchTransportType() | ||
{ | ||
let split = this.transport.split('.'); | ||
split.pop(); | ||
return split.join('.'); | ||
} | ||
|
||
public abstract FetchActive() : NmosSenderActive | null; | ||
|
||
public abstract FetchStaged() : NmosSenderActive | null; | ||
|
||
public abstract FetchConstraints() : object | null; | ||
|
||
public abstract FetchSdp(): string | null; | ||
} | ||
|
||
export abstract class NmosSenderActive | ||
{ | ||
public receiver_id: string | null; | ||
public master_enable: boolean; | ||
public activation: NmosActivation; | ||
|
||
public transport_params: TransportParamsSet[] | null | ||
|
||
public constructor( | ||
receiver_id: string | null, | ||
master_enable: boolean, | ||
activation: NmosActivation, | ||
transport_params: TransportParamsSet[]) | ||
{ | ||
this.receiver_id = receiver_id; | ||
this.master_enable = master_enable; | ||
this.activation = activation; | ||
this.transport_params = transport_params; | ||
} | ||
|
||
public ToJson() | ||
{ | ||
return JSON.stringify(this, jsonIgnoreReplacer); | ||
} | ||
} |
Oops, something went wrong.