From 73e80f2cf0f79be85f04f105e09f85b7b6ee3199 Mon Sep 17 00:00:00 2001 From: jcolwe200 Date: Tue, 7 Jul 2020 14:28:49 -0700 Subject: [PATCH 1/2] adjusting signal point insertion to be nested per xsd --- types/scte224v20180501/sctestructures.go | 4 ++ types/scte224v20180501/sctestructures_test.go | 65 +++++++++++-------- 2 files changed, 42 insertions(+), 27 deletions(-) diff --git a/types/scte224v20180501/sctestructures.go b/types/scte224v20180501/sctestructures.go index 92fb401..ff2232f 100644 --- a/types/scte224v20180501/sctestructures.go +++ b/types/scte224v20180501/sctestructures.go @@ -220,6 +220,10 @@ type SignalPointDeletionAction struct { } type SignalPointInsertionAction struct { + SignalPoints []*SignalPoint `xml:"urn:scte:224:action SignalPoint,omitempty" json:"signalPoint,omitempty"` +} + +type SignalPoint struct { Offset Duration `xml:"offset,attr,omitempty" json:"offset,omitempty"` SegmentationTypeId *uint `xml:"segmentationTypeId,attr,omitempty" json:"segmentationTypeId,omitempty"` SegmentationUpidType *uint `xml:"segmentationUpidType,attr,omitempty" json:"segmentationUpidType,omitempty"` diff --git a/types/scte224v20180501/sctestructures_test.go b/types/scte224v20180501/sctestructures_test.go index aced7e7..a10d5ab 100644 --- a/types/scte224v20180501/sctestructures_test.go +++ b/types/scte224v20180501/sctestructures_test.go @@ -128,7 +128,9 @@ func TestViewingPolicy2018(t *testing.T) { const spi string = ` - + + + ` const spd string = ` @@ -215,34 +217,43 @@ func TestSignalPointInsertion(t *testing.T) { if nil == action { t.Error("expected non-nil signalPointInsertion") } else { - if action.Offset.GoDuration() != 0 { - t.Error("expected zero offset rather than" + action.Offset) - } - - if nil != action.SegmentationUpidType { - if *action.SegmentationUpidType != 1 { - t.Error("expected SegmentationUpid of 1 rather than", *action.SegmentationUpidType) - } + if len(action.SignalPoints) == 0 { + t.Error("expected SignalPoints") } else { - t.Error("expected non-nil SegmentationUpid") - } - if action.SegmentationUpid != "399191745" { - t.Error("expected SegmentationUpid of \"399191745\" rather than" + action.SegmentationUpid) - } - if nil != action.SegmentationTypeId { - if *action.SegmentationTypeId != 48 { - t.Error("expected segmentationTypeId of 48 rather than", *action.SegmentationTypeId) + sp := action.SignalPoints[0] + if nil == sp { + t.Error("expected non-nil signalPoint") + } else { + if sp.Offset.GoDuration() != 0 { + t.Error("expected zero offset rather than" + sp.Offset) + } + + if nil != sp.SegmentationUpidType { + if *sp.SegmentationUpidType != 1 { + t.Error("expected SegmentationUpid of 1 rather than", *sp.SegmentationUpidType) + } + } else { + t.Error("expected non-nil SegmentationUpid") + } + if sp.SegmentationUpid != "399191745" { + t.Error("expected SegmentationUpid of \"399191745\" rather than" + sp.SegmentationUpid) + } + if nil != sp.SegmentationTypeId { + if *sp.SegmentationTypeId != 48 { + t.Error("expected segmentationTypeId of 48 rather than", *sp.SegmentationTypeId) + } + } else { + t.Error("expected non-nil segmentationTypeId") + } + repeatInterval := sp.RepeatInterval.GoDuration() + if time.Second*75 != repeatInterval { + t.Error("expected a 75 second interval rather than", repeatInterval) + } + totalRepeatTime := sp.RepeatStop.Sub(*sp.RepeatStart) + if time.Minute*15 != totalRepeatTime { + t.Error("expected repeats to last 15 minutes rather than", totalRepeatTime) + } } - } else { - t.Error("expected non-nil segmentationTypeId") - } - repeatInterval := action.RepeatInterval.GoDuration() - if time.Second*75 != repeatInterval { - t.Error("expected a 75 second interval rather than", repeatInterval) - } - totalRepeatTime := action.RepeatStop.Sub(*action.RepeatStart) - if time.Minute*15 != totalRepeatTime { - t.Error("expected repeats to last 15 minutes rather than", totalRepeatTime) } roundtrip, rerr := xml.MarshalIndent(vpol, "", " ") if nil != rerr { From 2ab6bc29679b58b327f7d561bd58e5bc5560a19d Mon Sep 17 00:00:00 2001 From: jcolwe200 Date: Tue, 7 Jul 2020 14:49:01 -0700 Subject: [PATCH 2/2] adding action schema I claim to support --- .../SCTE224_Action_20200130.xsd | 240 ++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 types/scte224v20180501/SCTE224_Action_20200130.xsd diff --git a/types/scte224v20180501/SCTE224_Action_20200130.xsd b/types/scte224v20180501/SCTE224_Action_20200130.xsd new file mode 100644 index 0000000..30fe2d4 --- /dev/null +++ b/types/scte224v20180501/SCTE224_Action_20200130.xsd @@ -0,0 +1,240 @@ + + + + + alternate content or slate. Use "urn:scte:224:action:blackout" as the value to indicate that the underlying content must be blacked out, but there is no alternative content to show. + + + + + Maximum allowed vertical playback resolution. Typical values are 480 for SD content and 720 or 1080 for HD or 2160 or 4320 for UHD. + + + + + DRM token + + + + + Frequency which client must revalidate policy + + + + + Maximum allowed concurrent clients (from subscriber) + + + + + Fast forward allowed (trickmodeRestrictios?) + + + + + Rewind allowed (trickmodeRestrictios?) + + + + + Resuming of session allowed + + + + + Disallow use of HDMI + + + + + Disallow download (local storage) + + + + + Disallow mirroring + + + + + Preview period from start of program (can view even if not entitled) + + + + + A period of time and (optional) maximum number of views over the period of time allowed per subscriber. The separator shall be a "," between the period start date, period end date and maximum views. + + + + + + An integer representing the value of APS. + 0 – Analog protection off + 1 – AGC process on, split burst off + 2 – AGC process on, 2-line split burst on + 3 – AGC process on, 4-line split burst on + + + + + An integer representing the value of EMI. + 0 – Copying is permitted + 1 – No further copying is permitted + 2 – One generation copy is permitted + 3 – Copying is prohibited + + + + + + An integer representing the value of CIT. + 0 – No image constraint asserted + 1 – Image constraint required + + + + + + An integer representing the value of the Copy Generation Management System (Analog). + 0 – Copying is permitted without restriction + 1 – No further copying permitted + 2 – One generation of copies may be made + 3 – No copying is permitted + + + + + This element defines a specific use of content that has been captured off of the live feed. There may be multiple Capture elements, by they can not have overlapping availability windows. Care should also be taken to insure that the content is not Reap(ed) before a reasonable grace period after the last window has closed. + + + + + + Playback window start for this capture. Can be one of: + - An exact UTC time + - A duration from the start time of the asset (based on the Mediapoint or signal) + - A percentage of the content duration from the start time of the asset (based on the Mediapoint or signal). For the Start message this would typically be 0 for the start of air or 100 for the actual finish time of the content. Values under 100 require the duration to be known ahead of time. + + + + + + + + + + + + Playback window stop for this capture. Streams can not be started after this time, but may be playable up to the Reap time if specified. Can be one of: + - An exact UTC time + - A duration from the start time of the asset (based on the Mediapoint or signal) + - A percentage of the content duration from the start time of the asset (based on the Mediapoint or signal). For the Start message this would typically be 0 for the start of air or 100 for the actual finish time of the content. + + + + + + + + + + + + At this time the content is to be removed from the server and is no longer playable. If multiple Capture elements are used this should only be set once beyond the last playout time. This may be an absolute time or a duration after the StopWindow. That duration may be expressed as a specific value or percent of the content length. + + + + + + + + + + + + Content item that is to be the first item that plays out to the viewer. It needs to be in front of any other content item including advertisements. + + + + + + + + + + + + + + + + + Can insert a preroll dynamic ad even if not signaled. + + + + + Midroll Dynamic Ad Insertion as specified by signals, mediapoints or other agreed upon methods. + + + + + Can insert a postroll dynamic ad even if not signaled. + + + + + This content is subject to FCC childrens programming rules AKA KidVid + + + + + Insert Signal at one or more points in the content based on the designated + start point (ex. MatchSignal) + + + + + + + + Offset from match signal or time + + + + + See table in SCTE 35 - segmentation_type_id + + + + + See table in SCTE 35 - segmentation_upid_type + + + + + + fixed or pattern for UPID + Example + 1. segmentationUpidType=0x09, segmentationUpid=SIGNAL:0RepxyxtQk65aT7clrgNRA== + 2. segmentationUpidType=0x09, segmentationUpid=SIGNAL:%Base64GUID% - is there some standard xpath/regex to do this? + + + + + + + + + + + Delete the Signal at the point identified in the MatchSignal XPath criteria. + + + ​ + \ No newline at end of file