File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff 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-
176175func (decoder * decoder ) re (src * ff.AVFrame ) (* ff.AVFrame , error ) {
177176 switch decoder .codec .Codec ().Type () {
178177 case ff .AVMEDIA_TYPE_AUDIO :
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ import (
77////////////////////////////////////////////////////////////////////////////
88// TYPES
99
10+ // Media Types: Audio, Video, Subtitle or Data
1011type MediaType int
1112
1213////////////////////////////////////////////////////////////////////////////
1314// GLOBALS
1415
15- // Media Types
1616const (
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)
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ func (r *reader) Close() error {
126126////////////////////////////////////////////////////////////////////////////////
127127// STRINGIFY
128128
129+ // Display the reader as a string
129130func (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
179180func (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
235236func (r * reader ) Metadata () []Metadata {
236237 entries := ff .AVUtil_dict_entries (r .input .Metadata ())
237238 result := make ([]Metadata , len (entries ))
You can’t perform that action at this time.
0 commit comments