-
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
Conversation
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.
Can you also add a (small) sample file with some added unit tests for validation?
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 comment
The reason will be displayed to describe this comment to others. Learn more.
This would need the -show_chapters
flag to be present in the ffprobe command, correct? If so, please add it.
@@ -24,8 +24,20 @@ const ( | |||
|
|||
// ProbeData is the root json data structure returned by an ffprobe. | |||
type ProbeData struct { |
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
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 comment
The reason will be displayed to describe this comment to others. Learn more.
A util function for returning a time.Duration
for this is probably a good idea. (see the one on Format
)
Start uint64 `json:"start"` | ||
StartTime string `json:"start_time"` | ||
End uint64 `json:"end"` | ||
EndTime string `json:"end_time"` |
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.
Same
Resolved by #49 |
No description provided.