fix comment

This commit is contained in:
tinyzimmer
2020-10-04 17:48:43 +03:00
parent f3a0d5882f
commit ddde8050f5

View File

@@ -102,11 +102,11 @@ func encodeGif(mainLoop *gst.MainLoop) error {
} }
// Fetch the result from the query. // Fetch the result from the query.
_, val := query.ParseDuration() _, duration := query.ParseDuration()
// This value is in nanoseconds. Since we told theee videorate element to produce 5 frames // This value is in nanoseconds. Since we told the videorate element to produce 5 frames
// per second, we can use this value to calculate the total number of frames to expect. // per second, we know the total frames will be (duration / 1e+9) * 5.
totalFrames := int((time.Duration(val) * time.Nanosecond).Seconds()) * 5 totalFrames := int((time.Duration(duration) * time.Nanosecond).Seconds()) * 5
// Getting data out of the sink is done by setting callbacks. Each new sample // Getting data out of the sink is done by setting callbacks. Each new sample
// will be a new jpeg image from the pipeline. // will be a new jpeg image from the pipeline.