From 970e23747a4b1f6da51b614a47d4ea35a0155f65 Mon Sep 17 00:00:00 2001 From: nareix Date: Wed, 8 Jun 2016 14:43:53 +0800 Subject: [PATCH] remove unnecessary struct in av --- av.go | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/av.go b/av.go index 20e3fa1..871d703 100644 --- a/av.go +++ b/av.go @@ -112,46 +112,6 @@ const ( PCM_MULAW ) -type BasicAudioCodecData struct { - CodecType int - CodecSampleRate int - CodecChannelLayout ChannelLayout - CodecSampleFormat SampleFormat -} - -func (self BasicAudioCodecData) Type() int { - return self.CodecType -} - -func (self BasicAudioCodecData) IsAudio() bool { - return true -} - -func (self BasicAudioCodecData) IsVideo() bool { - return false -} - -func (self BasicAudioCodecData) SampleRate() int { - return self.CodecSampleRate -} - -func (self BasicAudioCodecData) ChannelLayout() ChannelLayout { - return self.CodecChannelLayout -} - -func (self BasicAudioCodecData) SampleFormat() SampleFormat { - return self.CodecSampleFormat -} - -func NewPCMMulawCodecData() AudioCodecData { - return BasicAudioCodecData{ - CodecType: PCM_MULAW, - CodecSampleFormat: S16, - CodecChannelLayout: CH_MONO, - CodecSampleRate: 8000, - } -} - type CodecData interface { IsVideo() bool IsAudio() bool @@ -171,19 +131,6 @@ type AudioCodecData interface { ChannelLayout() ChannelLayout } -type H264CodecData interface { - VideoCodecData - AVCDecoderConfRecordBytes() []byte - SPS() []byte - PPS() []byte -} - -type AACCodecData interface { - AudioCodecData - MPEG4AudioConfigBytes() []byte - MakeADTSHeader(samples int, payloadLength int) []byte -} - type Muxer interface { WriteHeader([]CodecData) error WritePacket(int, Packet) error