Merge pull request #1146 from leibnewton/fix_on_stream_changed

修复OnStreamChangedHook媒体轨道信息解析错误
pull/1209/head
648540858 2023-12-11 10:05:36 +08:00 committed by GitHub
commit 33506a0046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 93 additions and 28 deletions

View File

@ -120,17 +120,17 @@ public class OnStreamChangedHookParam extends HookParam{
/** /**
* H264 = 0, H265 = 1, AAC = 2, G711A = 3, G711U = 4 * H264 = 0, H265 = 1, AAC = 2, G711A = 3, G711U = 4
*/ */
private int codecId; private int codec_id;
/** /**
* CodecAAC CodecH264 * CodecAAC CodecH264
*/ */
private String codecIdName; private String codec_id_name;
/** /**
* Video = 0, Audio = 1 * Video = 0, Audio = 1
*/ */
private int codecType; private int codec_type;
/** /**
* *
@ -140,17 +140,17 @@ public class OnStreamChangedHookParam extends HookParam{
/** /**
* *
*/ */
private int sampleBit; private int sample_bit;
/** /**
* *
*/ */
private int sampleRate; private int sample_rate;
/** /**
* fps * fps
*/ */
private int fps; private float fps;
/** /**
* *
@ -162,6 +162,31 @@ public class OnStreamChangedHookParam extends HookParam{
*/ */
private int width; private int width;
/**
*
*/
private int frames;
/**
*
*/
private int key_frames;
/**
* GOP
*/
private int gop_size;
/**
* GOP(ms)
*/
private int gop_interval_ms;
/**
*
*/
private float loss;
public int getChannels() { public int getChannels() {
return channels; return channels;
} }
@ -170,28 +195,28 @@ public class OnStreamChangedHookParam extends HookParam{
this.channels = channels; this.channels = channels;
} }
public int getCodecId() { public int getCodec_id() {
return codecId; return codec_id;
} }
public void setCodecId(int codecId) { public void setCodec_id(int codec_id) {
this.codecId = codecId; this.codec_id = codec_id;
} }
public String getCodecIdName() { public String getCodec_id_name() {
return codecIdName; return codec_id_name;
} }
public void setCodecIdName(String codecIdName) { public void setCodec_id_name(String codec_id_name) {
this.codecIdName = codecIdName; this.codec_id_name = codec_id_name;
} }
public int getCodecType() { public int getCodec_type() {
return codecType; return codec_type;
} }
public void setCodecType(int codecType) { public void setCodec_type(int codec_type) {
this.codecType = codecType; this.codec_type = codec_type;
} }
public boolean isReady() { public boolean isReady() {
@ -202,27 +227,27 @@ public class OnStreamChangedHookParam extends HookParam{
this.ready = ready; this.ready = ready;
} }
public int getSampleBit() { public int getSample_bit() {
return sampleBit; return sample_bit;
} }
public void setSampleBit(int sampleBit) { public void setSample_bit(int sample_bit) {
this.sampleBit = sampleBit; this.sample_bit = sample_bit;
} }
public int getSampleRate() { public int getSample_rate() {
return sampleRate; return sample_rate;
} }
public void setSampleRate(int sampleRate) { public void setSample_rate(int sample_rate) {
this.sampleRate = sampleRate; this.sample_rate = sample_rate;
} }
public int getFps() { public float getFps() {
return fps; return fps;
} }
public void setFps(int fps) { public void setFps(float fps) {
this.fps = fps; this.fps = fps;
} }
@ -241,6 +266,46 @@ public class OnStreamChangedHookParam extends HookParam{
public void setWidth(int width) { public void setWidth(int width) {
this.width = width; this.width = width;
} }
public int getFrames() {
return frames;
}
public void setFrames(int frames) {
this.frames = frames;
}
public int getKey_frames() {
return key_frames;
}
public void setKey_frames(int key_frames) {
this.key_frames = key_frames;
}
public int getGop_size() {
return gop_size;
}
public void setGop_size(int gop_size) {
this.gop_size = gop_size;
}
public int getGop_interval_ms() {
return gop_interval_ms;
}
public void setGop_interval_ms(int gop_interval_ms) {
this.gop_interval_ms = gop_interval_ms;
}
public float getLoss() {
return loss;
}
public void setLoss(float loss) {
this.loss = loss;
}
} }
public static class OriginSock{ public static class OriginSock{