Commit 33506a0046775d559a88c779c0ee8a91199fb042

Authored by 648540858
Committed by GitHub
2 parents bdd1846e 9a572b97

Merge pull request #1146 from leibnewton/fix_on_stream_changed

修复OnStreamChangedHook媒体轨道信息解析错误
src/main/java/com/genersoft/iot/vmp/media/zlm/dto/hook/OnStreamChangedHookParam.java
@@ -120,17 +120,17 @@ public class OnStreamChangedHookParam extends HookParam{ @@ -120,17 +120,17 @@ public class OnStreamChangedHookParam extends HookParam{
120 /** 120 /**
121 * H264 = 0, H265 = 1, AAC = 2, G711A = 3, G711U = 4 121 * H264 = 0, H265 = 1, AAC = 2, G711A = 3, G711U = 4
122 */ 122 */
123 - private int codecId; 123 + private int codec_id;
124 124
125 /** 125 /**
126 * 编码类型名称 CodecAAC CodecH264 126 * 编码类型名称 CodecAAC CodecH264
127 */ 127 */
128 - private String codecIdName; 128 + private String codec_id_name;
129 129
130 /** 130 /**
131 * Video = 0, Audio = 1 131 * Video = 0, Audio = 1
132 */ 132 */
133 - private int codecType; 133 + private int codec_type;
134 134
135 /** 135 /**
136 * 轨道是否准备就绪 136 * 轨道是否准备就绪
@@ -140,17 +140,17 @@ public class OnStreamChangedHookParam extends HookParam{ @@ -140,17 +140,17 @@ public class OnStreamChangedHookParam extends HookParam{
140 /** 140 /**
141 * 音频采样位数 141 * 音频采样位数
142 */ 142 */
143 - private int sampleBit; 143 + private int sample_bit;
144 144
145 /** 145 /**
146 * 音频采样率 146 * 音频采样率
147 */ 147 */
148 - private int sampleRate; 148 + private int sample_rate;
149 149
150 /** 150 /**
151 * 视频fps 151 * 视频fps
152 */ 152 */
153 - private int fps; 153 + private float fps;
154 154
155 /** 155 /**
156 * 视频高 156 * 视频高
@@ -162,6 +162,31 @@ public class OnStreamChangedHookParam extends HookParam{ @@ -162,6 +162,31 @@ public class OnStreamChangedHookParam extends HookParam{
162 */ 162 */
163 private int width; 163 private int width;
164 164
  165 + /**
  166 + * 帧数
  167 + */
  168 + private int frames;
  169 +
  170 + /**
  171 + * 关键帧数
  172 + */
  173 + private int key_frames;
  174 +
  175 + /**
  176 + * GOP大小
  177 + */
  178 + private int gop_size;
  179 +
  180 + /**
  181 + * GOP间隔时长(ms)
  182 + */
  183 + private int gop_interval_ms;
  184 +
  185 + /**
  186 + * 丢帧率
  187 + */
  188 + private float loss;
  189 +
165 public int getChannels() { 190 public int getChannels() {
166 return channels; 191 return channels;
167 } 192 }
@@ -170,28 +195,28 @@ public class OnStreamChangedHookParam extends HookParam{ @@ -170,28 +195,28 @@ public class OnStreamChangedHookParam extends HookParam{
170 this.channels = channels; 195 this.channels = channels;
171 } 196 }
172 197
173 - public int getCodecId() {  
174 - return codecId; 198 + public int getCodec_id() {
  199 + return codec_id;
175 } 200 }
176 201
177 - public void setCodecId(int codecId) {  
178 - this.codecId = codecId; 202 + public void setCodec_id(int codec_id) {
  203 + this.codec_id = codec_id;
179 } 204 }
180 205
181 - public String getCodecIdName() {  
182 - return codecIdName; 206 + public String getCodec_id_name() {
  207 + return codec_id_name;
183 } 208 }
184 209
185 - public void setCodecIdName(String codecIdName) {  
186 - this.codecIdName = codecIdName; 210 + public void setCodec_id_name(String codec_id_name) {
  211 + this.codec_id_name = codec_id_name;
187 } 212 }
188 213
189 - public int getCodecType() {  
190 - return codecType; 214 + public int getCodec_type() {
  215 + return codec_type;
191 } 216 }
192 217
193 - public void setCodecType(int codecType) {  
194 - this.codecType = codecType; 218 + public void setCodec_type(int codec_type) {
  219 + this.codec_type = codec_type;
195 } 220 }
196 221
197 public boolean isReady() { 222 public boolean isReady() {
@@ -202,27 +227,27 @@ public class OnStreamChangedHookParam extends HookParam{ @@ -202,27 +227,27 @@ public class OnStreamChangedHookParam extends HookParam{
202 this.ready = ready; 227 this.ready = ready;
203 } 228 }
204 229
205 - public int getSampleBit() {  
206 - return sampleBit; 230 + public int getSample_bit() {
  231 + return sample_bit;
207 } 232 }
208 233
209 - public void setSampleBit(int sampleBit) {  
210 - this.sampleBit = sampleBit; 234 + public void setSample_bit(int sample_bit) {
  235 + this.sample_bit = sample_bit;
211 } 236 }
212 237
213 - public int getSampleRate() {  
214 - return sampleRate; 238 + public int getSample_rate() {
  239 + return sample_rate;
215 } 240 }
216 241
217 - public void setSampleRate(int sampleRate) {  
218 - this.sampleRate = sampleRate; 242 + public void setSample_rate(int sample_rate) {
  243 + this.sample_rate = sample_rate;
219 } 244 }
220 245
221 - public int getFps() { 246 + public float getFps() {
222 return fps; 247 return fps;
223 } 248 }
224 249
225 - public void setFps(int fps) { 250 + public void setFps(float fps) {
226 this.fps = fps; 251 this.fps = fps;
227 } 252 }
228 253
@@ -241,6 +266,46 @@ public class OnStreamChangedHookParam extends HookParam{ @@ -241,6 +266,46 @@ public class OnStreamChangedHookParam extends HookParam{
241 public void setWidth(int width) { 266 public void setWidth(int width) {
242 this.width = width; 267 this.width = width;
243 } 268 }
  269 +
  270 + public int getFrames() {
  271 + return frames;
  272 + }
  273 +
  274 + public void setFrames(int frames) {
  275 + this.frames = frames;
  276 + }
  277 +
  278 + public int getKey_frames() {
  279 + return key_frames;
  280 + }
  281 +
  282 + public void setKey_frames(int key_frames) {
  283 + this.key_frames = key_frames;
  284 + }
  285 +
  286 + public int getGop_size() {
  287 + return gop_size;
  288 + }
  289 +
  290 + public void setGop_size(int gop_size) {
  291 + this.gop_size = gop_size;
  292 + }
  293 +
  294 + public int getGop_interval_ms() {
  295 + return gop_interval_ms;
  296 + }
  297 +
  298 + public void setGop_interval_ms(int gop_interval_ms) {
  299 + this.gop_interval_ms = gop_interval_ms;
  300 + }
  301 +
  302 + public float getLoss() {
  303 + return loss;
  304 + }
  305 +
  306 + public void setLoss(float loss) {
  307 + this.loss = loss;
  308 + }
244 } 309 }
245 310
246 public static class OriginSock{ 311 public static class OriginSock{