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

EBP creation #96

Merged
merged 12 commits into from
Oct 16, 2018
Merged

EBP creation #96

merged 12 commits into from
Oct 16, 2018

Conversation

alextarasov1
Copy link
Contributor

Added support for creating EBPs. Receiver types for EBPs changed to pointers in order to allow for modification. Data function added to convert EBPs back into raw bytes. Added GroupingFlag into EncoderBoundaryPoint interface since it is a common flag between Comcast and Cablelabs EBPs.

Example of new functionality:

e := ebp.CreateCableLabsEbp()
e.SetFragmentFlag(true)
e.SetConcealmentFlag(true)
e.SetExtensionFlag(true)
e.SetPartitionFlag(true)
e.SetSapFlag(true)
e.SapType = 0x02
e.SetGroupingFlag(true)
e.Grouping = []byte{0xFF, 0x7F}
e.SetTimeFlag(true)
e.SetEBPTime(time.Unix(0, 1396964696553818999).UTC())
e.PartitionFlags = 0x03
e.ReservedBytes = []byte{0x04, 0x05}
fmt.Printf("%X\n", e.Data())

Copy link
Collaborator

@WillGunther WillGunther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew, finally a shorter one! This generally looks good. There is a lot of code duplication that I'm thinking might be avoided through go type embedding

ebp/doc.go Outdated
@@ -34,15 +34,77 @@ const (
CableLabsFormatIdentifier = 0x45425030
)

// cableLabsEbp is an encoder boundary point
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these type and interface definitions be moved to ebp.go? We want to move away from using doc.go like this as it should only be used for documentation.

Copy link
Collaborator

@WillGunther WillGunther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for addressing the docs changes.

@WillGunther WillGunther dismissed mikereedell’s stale review October 16, 2018 15:25

Changes have been addressed

@WillGunther WillGunther merged commit 4d9f735 into Comcast:master Oct 16, 2018
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

Successfully merging this pull request may close these issues.

3 participants