Skip to content

Commit 0a2b66e

Browse files
committed
Updated docs
1 parent 5175b83 commit 0a2b66e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

decoder.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ func (decoder *decoder) Rescale(width, height int) error {
172172

173173
// Ref:
174174
// https://github.com/romatthe/alephone/blob/b1f7af38b14f74585f0442f1dd757d1238bfcef4/Source_Files/FFmpeg/SDL_ffmpeg.c#L2048
175-
176175
func (decoder *decoder) re(src *ff.AVFrame) (*ff.AVFrame, error) {
177176
switch decoder.codec.Codec().Type() {
178177
case ff.AVMEDIA_TYPE_AUDIO:

mediatype.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
////////////////////////////////////////////////////////////////////////////
88
// TYPES
99

10+
// Media Types: Audio, Video, Subtitle or Data
1011
type MediaType int
1112

1213
////////////////////////////////////////////////////////////////////////////
1314
// GLOBALS
1415

15-
// Media Types
1616
const (
17-
AUDIO = MediaType(ff.AVMEDIA_TYPE_AUDIO)
18-
VIDEO = MediaType(ff.AVMEDIA_TYPE_VIDEO)
17+
AUDIO = MediaType(ff.AVMEDIA_TYPE_AUDIO) // Audio media type
18+
VIDEO = MediaType(ff.AVMEDIA_TYPE_VIDEO) // Video media type
1919
)

reader.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ func (r *reader) Close() error {
126126
////////////////////////////////////////////////////////////////////////////////
127127
// STRINGIFY
128128

129+
// Display the reader as a string
129130
func (r *reader) MarshalJSON() ([]byte, error) {
130131
return json.Marshal(r.input)
131132
}
@@ -175,7 +176,7 @@ func (r *reader) Demux(fn DecoderFunc) error {
175176
return nil
176177
}
177178

178-
// Decode packets from the streams into frames
179+
// Return a function to decode packets from the streams into frames
179180
func (r *reader) Decode(fn FrameFunc) DecoderFunc {
180181
return func(codec Decoder, packet Packet) error {
181182
if packet != nil {
@@ -231,7 +232,7 @@ type jsonMetadata struct {
231232
Value string `json:"value"`
232233
}
233234

234-
// Metadata returns the metadata for the media stream
235+
// Return the metadata for the media stream
235236
func (r *reader) Metadata() []Metadata {
236237
entries := ff.AVUtil_dict_entries(r.input.Metadata())
237238
result := make([]Metadata, len(entries))

0 commit comments

Comments
 (0)