-
Notifications
You must be signed in to change notification settings - Fork 48
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
Adding Chapters to ProbeData struct #45
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,20 @@ const ( | |
|
||
// ProbeData is the root json data structure returned by an ffprobe. | ||
type ProbeData struct { | ||
Streams []*Stream `json:"streams"` | ||
Format *Format `json:"format"` | ||
Streams []*Stream `json:"streams"` | ||
Format *Format `json:"format"` | ||
Chapters []*Chapters `json:"chapters"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would need the |
||
} | ||
|
||
// Chapters is a json data structure to represent chapters. | ||
type Chapters struct { | ||
ID int `json:"id"` | ||
TimeBase string `json:"time_base"` | ||
Start uint64 `json:"start"` | ||
StartTime string `json:"start_time"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A util function for returning a |
||
End uint64 `json:"end"` | ||
EndTime string `json:"end_time"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
TagList Tags `json:"tags"` | ||
} | ||
|
||
// Format is a json data structure to represent formats | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably nice to add a couple of util methods to the struct for accessing chapters