mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-06 00:17:00 +08:00
fix comment
This commit is contained in:
@@ -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.
|
||||||
|
Reference in New Issue
Block a user