18045010223
7 天以前 afe371d39a054b2f2a9e5875b945584eec8a8141
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package cn.org.hentai.jtt1078.flv;
 
/**
 * flv 音频封装
 * author:zhouyili (11861744@qq.com)
 */
public class AudioTag extends FlvTag{
    public static final byte MP3 = 2;
    //UB[4]
    //0 = Linear PCM, platform endian 根据编码的平台,一般用3而不用这个
    //1 = ADPCM
    //2 = MP3
    //3 = Linear PCM, little endian
    //4 = Nellymoser 16-kHz mono
    //5 = Nellymoser 8-kHz mono
    //6 = Nellymoser
    //7 = G.711 A-law logarithmic PCM 8 = G.711 mu-law logarithmic PCM 9 = reserved
    //10 = AAC
    //11 = Speex
    //14 = MP3 8-Khz
    //15 = Device-specific sound
    private byte format;
    //0:5.5kHz,1:11kHz,2:22kHz,3:44kHz,format==10的话为3
    private byte rate;
    //0:8bit,1:16bit
    private byte size;
    //0:mono,1:stereo,format==10的话为1
    private byte type;
    //format==10是aac data,否则是对应编码后的数据
    private byte[] data;
 
    public AudioTag() {
    }
 
    public AudioTag(int offSetTimestamp, int tagDataSize, byte format, byte rate, byte size, byte type, byte[] data) {
        super(offSetTimestamp, tagDataSize);
        this.format = format;
        this.rate = rate;
        this.size = size;
        this.type = type;
        this.data = data;
    }
 
    public byte getFormat() {
        return format;
    }
 
    public void setFormat(byte format) {
        this.format = format;
    }
 
    public byte getRate() {
        return rate;
    }
 
    public void setRate(byte rate) {
        this.rate = rate;
    }
 
    public byte getSize() {
        return size;
    }
 
    public void setSize(byte size) {
        this.size = size;
    }
 
    public byte getType() {
        return type;
    }
 
    public void setType(byte type) {
        this.type = type;
    }
 
    public byte[] getData() {
        return data;
    }
 
    public void setData(byte[] data) {
        this.data = data;
    }
}