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 {
172
172
173
173
// Ref:
174
174
// https://github.com/romatthe/alephone/blob/b1f7af38b14f74585f0442f1dd757d1238bfcef4/Source_Files/FFmpeg/SDL_ffmpeg.c#L2048
175
-
176
175
func (decoder * decoder ) re (src * ff.AVFrame ) (* ff.AVFrame , error ) {
177
176
switch decoder .codec .Codec ().Type () {
178
177
case ff .AVMEDIA_TYPE_AUDIO :
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ import (
7
7
////////////////////////////////////////////////////////////////////////////
8
8
// TYPES
9
9
10
+ // Media Types: Audio, Video, Subtitle or Data
10
11
type MediaType int
11
12
12
13
////////////////////////////////////////////////////////////////////////////
13
14
// GLOBALS
14
15
15
- // Media Types
16
16
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
19
19
)
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ func (r *reader) Close() error {
126
126
////////////////////////////////////////////////////////////////////////////////
127
127
// STRINGIFY
128
128
129
+ // Display the reader as a string
129
130
func (r * reader ) MarshalJSON () ([]byte , error ) {
130
131
return json .Marshal (r .input )
131
132
}
@@ -175,7 +176,7 @@ func (r *reader) Demux(fn DecoderFunc) error {
175
176
return nil
176
177
}
177
178
178
- // Decode packets from the streams into frames
179
+ // Return a function to decode packets from the streams into frames
179
180
func (r * reader ) Decode (fn FrameFunc ) DecoderFunc {
180
181
return func (codec Decoder , packet Packet ) error {
181
182
if packet != nil {
@@ -231,7 +232,7 @@ type jsonMetadata struct {
231
232
Value string `json:"value"`
232
233
}
233
234
234
- // Metadata returns the metadata for the media stream
235
+ // Return the metadata for the media stream
235
236
func (r * reader ) Metadata () []Metadata {
236
237
entries := ff .AVUtil_dict_entries (r .input .Metadata ())
237
238
result := make ([]Metadata , len (entries ))
You can’t perform that action at this time.
0 commit comments