Skip to content

Commit f1c7d31

Browse files
committed
Updated Documentation
1 parent f6eaee9 commit f1c7d31

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Close()
9090
type Options struct {
9191
Bitrate int // Bitrate.
9292
Loop int // For GIFs only. -1=no loop, 0=infinite loop, >0=number of loops.
93-
Delay int // Delay for final frame of GIFs.
93+
Delay int // Delay for final frame of GIFs in centiseconds.
9494
Macro int // Macroblock size for determining how to resize frames for codecs.
9595
FPS float64 // Frames per second for output video.
9696
Quality float64 // If bitrate not given, use quality instead. Must be between 0 and 1. 0:best, 1:worst.

camera.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type Camera struct {
2525
cmd *exec.Cmd // ffmpeg command.
2626
}
2727

28+
// Camera device name.
2829
func (camera *Camera) Name() string {
2930
return camera.name
3031
}
@@ -37,10 +38,12 @@ func (camera *Camera) Height() int {
3738
return camera.height
3839
}
3940

41+
// Channels of video frames.
4042
func (camera *Camera) Depth() int {
4143
return camera.depth
4244
}
4345

46+
// Frames per second of video.
4447
func (camera *Camera) FPS() float64 {
4548
return camera.fps
4649
}

video.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (video *Video) Depth() int {
4545
return video.depth
4646
}
4747

48-
// Bitrate of video.
48+
// Bitrate of video in bits/s.
4949
func (video *Video) Bitrate() int {
5050
return video.bitrate
5151
}
@@ -60,10 +60,12 @@ func (video *Video) Stream() int {
6060
return video.stream
6161
}
6262

63+
// Video duration in seconds.
6364
func (video *Video) Duration() float64 {
6465
return video.duration
6566
}
6667

68+
// Frames per second of video.
6769
func (video *Video) FPS() float64 {
6870
return video.fps
6971
}

videowriter.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type VideoWriter struct {
3131
type Options struct {
3232
Bitrate int // Bitrate.
3333
Loop int // For GIFs only. -1=no loop, 0=infinite loop, >0=number of loops.
34-
Delay int // Delay for final frame of GIFs.
34+
Delay int // Delay for final frame of GIFs in centiseconds.
3535
Macro int // Macroblock size for determining how to resize frames for codecs.
3636
FPS float64 // Frames per second for output video.
3737
Quality float64 // If bitrate not given, use quality instead. Must be between 0 and 1. 0:best, 1:worst.
@@ -56,26 +56,32 @@ func (writer *VideoWriter) Height() int {
5656
return writer.height
5757
}
5858

59+
// Bitrate of video in bits/s.
5960
func (writer *VideoWriter) Bitrate() int {
6061
return writer.bitrate
6162
}
6263

64+
// For GIFs only, defines looping behavior. -1=no loop, 0=infinite loop, >0=number of loops.
6365
func (writer *VideoWriter) Loop() int {
6466
return writer.loop
6567
}
6668

69+
// Delay for final frame of GIFs in centiseconds.
6770
func (writer *VideoWriter) Delay() int {
6871
return writer.delay
6972
}
7073

74+
// Macroblock size for determining how to resize frames for codecs.
7175
func (writer *VideoWriter) Macro() int {
7276
return writer.macro
7377
}
7478

79+
// Frames per second of video.
7580
func (writer *VideoWriter) FPS() float64 {
7681
return writer.fps
7782
}
7883

84+
// Video Codec Quality parameter. Must be between 0 and 1. 0:best, 1:worst.
7985
func (writer *VideoWriter) Quality() float64 {
8086
return writer.quality
8187
}

0 commit comments

Comments
 (0)