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

Adding Chapters to ProbeData struct #45

Closed
wants to merge 1 commit into from

Conversation

orungrau
Copy link

No description provided.

Copy link
Owner

@vansante vansante left a 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"`
Copy link
Owner

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 {
Copy link
Owner

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"`
Copy link
Owner

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"`
Copy link
Owner

Choose a reason for hiding this comment

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

Same

@Arthi-chaud Arthi-chaud mentioned this pull request May 27, 2024
@vansante
Copy link
Owner

Resolved by #49

@vansante vansante closed this May 31, 2024
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.

2 participants