adcom1: rename StartDelayMode -> StartDelay

This commit is contained in:
mxmCherry
2022-05-19 15:45:45 +03:00
parent adb3bd01b9
commit 7b1a4ea9d4
6 changed files with 29 additions and 29 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ type AudioPlacement struct {
// Definition:
// Indicates the start delay in seconds for pre-roll, mid-roll, or post-roll placements.
// For additional generic values, refer to List: Start Delay Modes.
Delay StartDelayMode `json:"delay,omitempty"`
Delay StartDelay `json:"delay,omitempty"`
// Attribute:
// skip
+25
View File
@@ -0,0 +1,25 @@
package adcom1
// StartDelay represents video or audio start delay.
type StartDelay int64
// Options for the video or audio start delay.
// If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.
const (
StartPreRoll StartDelay = 0 // Pre-Roll
StartMidRoll StartDelay = -1 // Generic Mid-Roll
StartPostRoll StartDelay = -2 // Generic Post-Roll
)
// Ptr returns pointer to own value.
func (d StartDelay) Ptr() *StartDelay {
return &d
}
// Val safely dereferences pointer, returning default value (StartDelayPreRoll) for nil.
func (d *StartDelay) Val() StartDelay {
if d == nil {
return StartPreRoll
}
return *d
}
-25
View File
@@ -1,25 +0,0 @@
package adcom1
// StartDelayMode represents video or audio start delay.
type StartDelayMode int64
// Options for the video or audio start delay.
// If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.
const (
StartDelayPreRoll StartDelayMode = 0 // Pre-Roll
StartDelayGenericMidRoll StartDelayMode = -1 // Generic Mid-Roll
StartDelayGenericPostRoll StartDelayMode = -2 // Generic Post-Roll
)
// Ptr returns pointer to own value.
func (s StartDelayMode) Ptr() *StartDelayMode {
return &s
}
// Val safely dereferences pointer, returning default value (StartDelayPreRoll) for nil.
func (s *StartDelayMode) Val() StartDelayMode {
if s == nil {
return StartDelayPreRoll
}
return *s
}
+1 -1
View File
@@ -31,7 +31,7 @@ type VideoPlacement struct {
// Definition:
// Indicates the start delay in seconds for pre-roll, mid-roll, or post-roll placements.
// For additional generic values, refer to List: Start Delay Modes.
Delay StartDelayMode `json:"delay,omitempty"`
Delay StartDelay `json:"delay,omitempty"`
// Attribute:
// skip
+1 -1
View File
@@ -74,7 +74,7 @@ type Audio struct {
// Indicates the start delay in seconds for pre-roll, mid-roll, or
// post-roll ad placements. Refer to List: Start Delay Modes in
// AdCOM 1.0.
StartDelay *adcom1.StartDelayMode `json:"startdelay,omitempty"`
StartDelay *adcom1.StartDelay `json:"startdelay,omitempty"`
// Attribute:
// rqddurs
+1 -1
View File
@@ -55,7 +55,7 @@ type Video struct {
// Indicates the start delay in seconds for pre-roll, mid-roll, or
// post-roll ad placements. Refer to List: Start Delay Modes
// in AdCOM 1.0.
StartDelay *adcom1.StartDelayMode `json:"startdelay,omitempty"`
StartDelay *adcom1.StartDelay `json:"startdelay,omitempty"`
// Attribute:
// maxseq