-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrtmpplayer.cpp
More file actions
603 lines (565 loc) · 26.6 KB
/
Copy pathrtmpplayer.cpp
File metadata and controls
603 lines (565 loc) · 26.6 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
#include "rtmpplayer.h"
extern "C" {
#ifndef _WINSOCK2API_
#define _WINSOCK2API_
#ifdef _WIN32
#include <winsock2.h>
//#include <ws2tcpip.h>
#endif
#ifdef _MSC_VER
#define strcasecmp stricmp
#define strncasecmp strnicmp
#define vsnprintf _vsnprintf
#endif
#define GetSockError() WSAGetLastError()
#define SetSockError(e) WSASetLastError(e)
#define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e)
#define EWOULDBLOCK WSAETIMEDOUT /* we don't use nonblocking, but we do use timeouts */
#define sleep(n) Sleep(n*1000)
#define msleep(n) Sleep(n)
#define SET_RCVTIMEO(tv,s) int tv = s*1000
#else /* !_WIN32 */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/times.h>
#include <sys/time.h>
#include <netdb.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#define GetSockError() errno
#define SetSockError(e) errno = e
#undef closesocket
#define closesocket(s) close(s)
#define msleep(n) usleep(n*1000)
#define SET_RCVTIMEO(tv,s) struct timeval tv = {s,0}
#endif
}
RTMPPlayer::RTMPPlayer()
:RTMPBase(RTMP_BASE_TYPE_PLAY)
{
}
RTMPPlayer::~RTMPPlayer()
{
Stop();
}
void RTMPPlayer::Loop()
{
AVPlayTime *play_time = AVPlayTime::GetInstance();
//此处可以优化
RTMPPacket packet = {0};
int64_t cur_time = TimesUtil::GetTimeMillisecond();
int64_t pre_time = cur_time;
static FILE *rtmp_dump_h264 = NULL;
uint8_t *nalu_buf = (uint8_t *)malloc(1*1024*1024);
int total_slice_size = 0;
int total_slice_offset = 0;
while (!request_exit_thread_)
{
//短线重连
if(!IsConnect())
{
LOG(INFO)<<"短线重连 re connect";
if(!Connect(url_)) //重连失败
{
LOG(INFO)<<"短线重连 reConnect fail "<<url_.c_str();
msleep(10);
continue;
}
}
cur_time = TimesUtil::GetTimeMillisecond();
int64_t t = cur_time - pre_time;
pre_time = cur_time;
//msg
if(!RTMP_ReadPacket(rtmp_, &packet)) {
LOG(ERROR)<<"RTMP_ReadPacket failed";
continue;
}
int64_t diff = TimesUtil::GetTimeMillisecond() - cur_time;
// if(t>10 || diff>10)
// LogInfo("cur-pre t:%ld, ReadPacket:%ld", t, diff);
if (RTMPPacket_IsReady(&packet)) // 检测是不是整个包组好了
{
if (!packet.m_nBodySize)
continue;
diff = TimesUtil::GetTimeMillisecond() - cur_time;
{
// if(diff>10)
// {
// bool keyframe =false;
// if (packet.m_packetType == RTMP_PACKET_TYPE_VIDEO)
// {
// keyframe = 0x17 == packet.m_body[0] ? true : false;
// }
// // LogInfo("RTMPPacket_IsReady:%ld, keyframe:%d, type:%u,size:%u",
// // diff, keyframe, packet.m_packetType,
// // packet.m_nBodySize);
// }
}
uint8_t nalu_header_4bytes[4] = { 0x00, 0x00, 0x00, 0x01 };
uint8_t nalu_header_3bytes[3] = { 0x00, 0x00, 0x01 };
// Process packet, eg: set chunk size, set bw, ...
// RTMP_ClientPacket(m_pRtmp, &packet);
// LogInfo("RTMPPacket_m_packetType:%d\n", packet.m_packetType);
if (packet.m_packetType == RTMP_PACKET_TYPE_VIDEO)
{
// 解析完数据再发送给解码器
// 判断起始字节, 检测是不是spec config, 还原出sps pps等
// 重组帧
bool keyframe = 0x17 == packet.m_body[0] ? true : false;
bool sequence = 0x00 == packet.m_body[1];
{
if(keyframe)
{
// LogWarn("keyframe=%s, sequence=%s, size:%d", keyframe ? "true" : "false",
// sequence ? "true" : "false",
// packet.m_nBodySize);
}
}
// SPS/PPS sequence
if (keyframe && sequence)
{
LOG(INFO)<<"%s:%s:k:%d:t:%u"
<< play_time->getRtmpTag()
<<play_time->getAvcFrameTag()
<<keyframe
<<play_time->getCurrenTime();
is_got_video_sequence_ = true;
uint32_t offset = 10;
//sps
{
uint32_t sps_num = packet.m_body[offset++] & 0x1f;
if(sps_num>0)
{
sps_vector_.clear(); // 先清空原来的缓存
}
for (int i = 0; i < sps_num; i++)
{
uint8_t ch0 = packet.m_body[offset];
uint8_t ch1 = packet.m_body[offset + 1];
uint32_t sps_len = ((ch0 << 8) | ch1);
offset += 2;
// Write sps data
std::string sps;
sps.append(nalu_header_4bytes, nalu_header_4bytes + 4); // 存储 start code
sps.append(packet.m_body + offset, packet.m_body + offset + sps_len);
sps_vector_.push_back(sps);
offset += sps_len;
}
}
//pps
{
uint32_t pps_num = packet.m_body[offset++] & 0x1f;
if(pps_num > 0)
{
pps_vector_.clear(); // 先清空原来的缓存
}
for (int i = 0; i < pps_num; i++)
{
uint8_t ch0 = packet.m_body[offset];
uint8_t ch1 = packet.m_body[offset + 1];
uint32_t pps_len = ((ch0 << 8) | ch1);
offset += 2;
// Write pps data
std::string pps;
pps.append(nalu_header_4bytes, nalu_header_4bytes + 4); // 存储 start code
pps.append(packet.m_body + offset, packet.m_body + offset + pps_len);
pps_vector_.push_back(pps);
offset += pps_len;
}
}
// 封装成avpacket
{
AVPacket sps_pkt = { 0 };
sps_pkt.size = sps_vector_[0].size();
sps_pkt.data = (uint8_t *)av_malloc(sps_pkt.size);
if(av_packet_from_data(&sps_pkt, sps_pkt.data, sps_pkt.size) == 0) {
memcpy(sps_pkt.data, (uint8_t *)sps_vector_[0].c_str(), sps_vector_[0].size());
if(!rtmp_dump_h264) {
rtmp_dump_h264 = fopen("rtmp.h264","wb+");
}
fwrite(sps_pkt.data, sps_pkt.size, 1, rtmp_dump_h264);
fflush(rtmp_dump_h264);
video_packet_callable_object_(&sps_pkt); // 发送包
} else {
LOG(ERROR)<<"av_packet_from_data sps_pkt failed";
}
AVPacket pps_pkt= { 0 };
pps_pkt.size = pps_vector_[0].size();
pps_pkt.data = (uint8_t *)av_malloc(pps_pkt.size);
if(av_packet_from_data(&pps_pkt, pps_pkt.data, pps_pkt.size) == 0) {
memcpy(pps_pkt.data, (uint8_t *)pps_vector_[0].c_str(), pps_vector_[0].size());
if(!rtmp_dump_h264) {
rtmp_dump_h264 = fopen("rtmp.h264","wb+");
}
fwrite(pps_pkt.data, pps_pkt.size, 1, rtmp_dump_h264);
fflush(rtmp_dump_h264);
video_packet_callable_object_(&pps_pkt); // 发送包
} else {
LOG(ERROR)<<"av_packet_from_data pps_pkt failed";
}
}
firt_entry = true;
}
else
{//raw video
//debug
{
if(keyframe && !is_got_video_iframe_) {
is_got_video_iframe_ = true;
LOG(INFO)<<"%s:%s:k:%d:t:%u"
<< play_time->getRtmpTag()
<<play_time->getAvcFrameTag()
<<keyframe
<<play_time->getCurrenTime();
}
if(got_video_frames_++ < PRINT_MAX_FRAMES) {
// 打印前PRINT_MAX_FRAMES帧的时间信息,包括i帧
LOG(INFO)<<"%s:%s:k:%d:t:%u"
<< play_time->getRtmpTag()
<<play_time->getAvcFrameTag()
<<keyframe
<<play_time->getCurrenTime();
}
}
uint32_t duration = video_frame_duration_;
// 计算pts
{
if(video_pre_pts_ == -1){
video_pre_pts_= packet.m_nTimeStamp;
if(!packet.m_hasAbsTimestamp) {
LOG(ERROR)<<"no init video pts";
}
}
else {
if(packet.m_hasAbsTimestamp) {
video_pre_pts_= packet.m_nTimeStamp;
}
else {
duration = packet.m_nTimeStamp;
video_pre_pts_ += packet.m_nTimeStamp;
}
}
}
//LogDebug("vpts:%u, t:%u", video_pre_pts_, packet.m_nTimeStamp);
uint32_t offset = 5; // 起始解析偏移量
total_slice_size = 0; // 总切片大小
total_slice_offset = 0; // 总切片偏移
int first_slice = 1; // 标记是否为第一个切片
//组合chunk startcode + nalu + startcode nalubody
while(offset < packet.m_nBodySize)
{
uint8_t ch0 = packet.m_body[offset];
uint8_t ch1 = packet.m_body[offset + 1];
uint8_t ch2 = packet.m_body[offset + 2];
uint8_t ch3 = packet.m_body[offset + 3];
// 提取数据长度(大端序)
uint32_t data_len = ((ch0 << 24) | (ch1 << 16) | (ch2 << 8) | ch3);
// 替换数据长度为NALU头
memcpy(&packet.m_body[offset], nalu_header_4bytes, 4);
offset += 4; // 跳过data_len占用的4字节
// 提取NALU类型 FIT
uint8_t nalu_type = 0x1f & packet.m_body[offset];
// LogInfo("nalu_type:%d", nalu_type);
//statcode + nalu
{
if(first_slice) {
first_slice = 0;
// 第一个切片使用4字节头
memcpy(&nalu_buf[total_slice_offset], nalu_header_4bytes, 4);
total_slice_offset += 4;
} else {
// 后续切片使用3字节头
memcpy(&nalu_buf[total_slice_offset], nalu_header_3bytes, 3);
total_slice_offset += 3;
}
}
// 拷贝实际NALU数据 statcode + nalu +startccode + 0x00 00 00 01 + srcdata
memcpy(&nalu_buf[total_slice_offset], &packet.m_body[offset], data_len);
offset += data_len; // 跳过data_len
total_slice_offset += data_len;
first_slice = 0;
}
//AVPacket构建
{
AVPacket nalu_pkt = {0};
nalu_pkt.size = total_slice_offset;
if(keyframe) {
nalu_pkt.size += (sps_vector_[0].size() + pps_vector_[0].size());
}
nalu_pkt.data = (uint8_t *)av_malloc(nalu_pkt.size);
if(av_packet_from_data(&nalu_pkt, nalu_pkt.data, nalu_pkt.size) == 0) {
// memcpy(&nalu_pkt.data[0], nalu_header_4bytes, 4);
if(keyframe) {
// 先拷贝 sps
memcpy(nalu_pkt.data, (uint8_t *)sps_vector_[0].c_str(), sps_vector_[0].size());
// pps
memcpy(nalu_pkt.data + sps_vector_[0].size(), (uint8_t *)pps_vector_[0].c_str(), pps_vector_[0].size());
// i帧
memcpy(nalu_pkt.data+ sps_vector_[0].size()+ pps_vector_[0].size(),
(uint8_t *)nalu_buf, total_slice_offset);
}else {
memcpy(nalu_pkt.data, (uint8_t *)nalu_buf, total_slice_offset);
}
nalu_pkt.duration = duration;
nalu_pkt.dts = video_pre_pts_;
if(keyframe)
nalu_pkt.flags = AV_PKT_FLAG_KEY;
// LogInfo("rtmp vdts:%ld", nalu_pkt.dts);
if(!rtmp_dump_h264) {
rtmp_dump_h264 = fopen("rtmp.h264","wb+");
}
fwrite(nalu_pkt.data, nalu_pkt.size, 1, rtmp_dump_h264);
fflush(rtmp_dump_h264);
video_packet_callable_object_(&nalu_pkt); // 发送包
} else {
//LOG(ERROR)<<"av_packet_from_data nalu_pkt failed";
}
}
}
}
else if (packet.m_packetType == RTMP_PACKET_TYPE_AUDIO)
{
static int64_t s_is_pre_ready = TimesUtil::GetTimeMillisecond();
cur_time = TimesUtil::GetTimeMillisecond();
// LogInfo("aud ready t:%ld", cur_time - s_is_pre_ready);
s_is_pre_ready = cur_time;
bool sequence = (0x00 == packet.m_body[1]);
// LogInfo("sequence=%s\n", sequence ? "true" : "false");
uint8_t format = 0, samplerate = 0, sampledepth = 0, type = 0;
uint8_t frame_length_flag = 0, depend_on_core_coder = 0, extension_flag = 0;
// AAC sequence
if (sequence)
{
LOG(INFO)<<"%s:%s:k:%d:t:%u"<< play_time->getRtmpTag()
<<play_time->getAvcFrameTag()
<<play_time->getCurrenTime();
format = (packet.m_body[0] & 0xf0) >> 4;
samplerate = (packet.m_body[0] & 0x0c) >> 2;
sampledepth = (packet.m_body[0] & 0x02) >> 1;
type = packet.m_body[0] & 0x01;
// sequence = packet.m_body[1];
// AAC(AudioSpecificConfig)
if (format == 10) { // AAC格式
uint8_t ch0 = packet.m_body[2];
uint8_t ch1 = packet.m_body[3];
uint16_t config = ((ch0 << 8) | ch1);
profile_ = (config & 0xF800) >> 11;
sample_frequency_index_ = (config & 0x0780) >> 7;
// sample_frequency_index_ = 5;
channels_ = (config & 0x78) >> 3;
frame_length_flag = (config & 0x04) >> 2;
depend_on_core_coder = (config & 0x02) >> 1;
extension_flag = config & 0x01;
}
// Speex(Fix data here, so no need to parse...)
else if (format == 11) { // MP3格式
// 16 KHz, mono, 16bit/sample
type = 0;
sampledepth = 1;
samplerate = 4;
}
audio_sample_rate = RTMPBase::GetSampleRateByFreqIdx(sample_frequency_index_);
AudioSpecMsg *aud_spec_msg = new AudioSpecMsg(profile_,
channels_,
audio_sample_rate);
audio_info_callback_(RTMP_BODY_AUD_SPEC, aud_spec_msg, false);
}
// Audio frames
else
{
if(got_audio_frames_++ < PRINT_MAX_FRAMES) {
// 打印前PRINT_MAX_FRAMES帧的时间信息,包括i帧
LOG(INFO)<<"%s:%s:k:%d:t:%u"<< play_time->getRtmpTag()
<<play_time->getAvcFrameTag()
<<play_time->getCurrenTime();
}
uint32_t duration = audio_frame_duration_;
if(audio_pre_pts_ == -1){
audio_pre_pts_= packet.m_nTimeStamp;
if(!packet.m_hasAbsTimestamp) {
LOG(INFO)<<"no init video pts";
}
}
else {
if(packet.m_hasAbsTimestamp)
audio_pre_pts_= packet.m_nTimeStamp;
else {
duration = packet.m_nTimeStamp;
audio_pre_pts_ += packet.m_nTimeStamp;
}
}
//LogDebug("apts:%u, t:%u", audio_pre_pts_, packet.m_nTimeStamp);
// ADTS(7 bytes) + AAC data
uint32_t data_len = packet.m_nBodySize - 2 + 7;
uint8_t adts[7];
adts[0] = 0xff;
adts[1] = 0xf9;
adts[2] = ((profile_ - 1) << 6) | (sample_frequency_index_ << 2) | (channels_ >> 2);
adts[3] = ((channels_ & 3) << 6) + (data_len >> 11);
adts[4] = (data_len & 0x7FF) >> 3;
adts[5] = ((data_len & 7) << 5) + 0x1F;
adts[6] = 0xfc;
AVPacket aac_pkt = {0};
aac_pkt.size = data_len;
aac_pkt.data = (uint8_t *)av_malloc(aac_pkt.size);
if(av_packet_from_data(&aac_pkt, aac_pkt.data, aac_pkt.size) == 0) {
// 带 adts header
memcpy(&aac_pkt.data[0], adts, 7);
memcpy(&aac_pkt.data[7], packet.m_body + 2, packet.m_nBodySize - 2);
aac_pkt.duration = duration;
aac_pkt.dts = audio_pre_pts_;
//LogDebug("rtmp adts:%ld", aac_pkt.dts);
// aac_pkt.pts = audio_pre_pts_;
audio_packet_callable_object_(&aac_pkt); // 发送包
static FILE *rtmp_dump_aac = NULL;
if(!rtmp_dump_aac) {
rtmp_dump_aac = fopen("rtmp.aac","wb+");
}
fwrite(aac_pkt.data, aac_pkt.size, 1, rtmp_dump_aac);
fflush(rtmp_dump_aac);
} else {
//LOG(ERROR)<<"av_packet_from_data aac_pkt failed";
}
}
// LogInfo("aud finish t:%ld\n", TimesUtil::GetTimeMillisecond() - cur_time);
}
else if (packet.m_packetType == RTMP_PACKET_TYPE_INFO)
{
// LogInfo("onReadVideoAndAudioInfo ");
is_got_metadta_ = true;
parseScriptTag(packet);
if(video_width > 0 && video_height>0)
{
FLVMetadataMsg *metadata = new FLVMetadataMsg();
metadata->width = video_width;//720;
metadata->height = video_height;//480;
video_info_callback_(RTMP_BODY_METADATA, metadata, false);
}
}
else
{
LOG(INFO)<<"can't handle it ";
RTMP_ClientPacket(rtmp_, &packet);
}
// RTMP_ClientPacket(m_pRtmp, &packet);
RTMPPacket_Free(&packet);
memset(&packet,0,sizeof(RTMPPacket));
}
else
{
// LogError("RTMPPacket no Ready");
continue;
}
}
free(nalu_buf);
LOG(INFO)<<"thread exit";
}
void RTMPPlayer::parseScriptTag(RTMPPacket &packet)
{
LOG(INFO)<<"begin parse info"<<packet.m_nBodySize;
AMFObject obj;
AVal val;
AMFObjectProperty * property;
AMFObject subObject;
if (AMF_Decode(&obj, packet.m_body, packet.m_nBodySize, FALSE) < 0)
{
LOG(INFO)<< "error decoding invoke packet";
}
AMF_Dump(&obj);
LOG(INFO)<<" amf obj "<<obj.o_num;
for (int n = 0; n < obj.o_num; n++)
{
property = AMF_GetProp(&obj, NULL, n);
if (property != NULL)
{
if (property->p_type == AMF_OBJECT)
{
AMFProp_GetObject(property, &subObject);
for (int m = 0; m < subObject.o_num; m++)
{
property = AMF_GetProp(&subObject, NULL, m);
LOG(INFO)<<"val ="<<property->p_name.av_val;
if (property != NULL)
{
if (property->p_type == AMF_OBJECT)
{
}
else if (property->p_type == AMF_BOOLEAN)
{
int bVal = AMFProp_GetBoolean(property);
if (strncasecmp("stereo", property->p_name.av_val, property->p_name.av_len) == 0)
{
audio_channel = bVal > 0 ? 2 : 1;
LOG(INFO)<<"parse channel %d",audio_channel;
}
}
else if (property->p_type == AMF_NUMBER)
{
double dVal = AMFProp_GetNumber(property);
if (strncasecmp("width", property->p_name.av_val, property->p_name.av_len) == 0)
{
video_width = (int)dVal;
LOG(INFO)<<"parse widht ",video_width;
}
else if (strcasecmp("height", property->p_name.av_val) == 0)
{
video_height = (int)dVal;
LOG(INFO)<<"parse Height ",video_height;
}
else if (strcasecmp("framerate", property->p_name.av_val) == 0)
{
video_frame_rate = (int)dVal;
LOG(INFO)<<"parse frame_rate "<<video_frame_rate;
if(video_frame_rate >0) {
video_frame_duration_ = 1000/video_frame_rate;
}
}
else if (strcasecmp("videocodecid", property->p_name.av_val) == 0)
{
video_codec_id = (int)dVal;
LOG(INFO)<<"parse video_codec_id"<<video_codec_id;
}
else if (strcasecmp("audiosamplerate", property->p_name.av_val) == 0)
{
audio_sample_rate = (int)dVal;
audio_sample_rate = 32000;
LOG(INFO)<<"parse audiosamplerate "<<audio_sample_rate;
}
else if (strcasecmp("audiodatarate", property->p_name.av_val) == 0)
{
audio_bit_rate = (int)dVal;
LOG(INFO)<<"parse audiodatarate "<<audio_bit_rate;
}
else if (strcasecmp("audiosamplesize", property->p_name.av_val) == 0)
{
audio_sample_size = (int)dVal;
LOG(INFO)<<"parse audiosamplesize "<<audio_sample_size;
}
else if (strcasecmp("audiocodecid", property->p_name.av_val) == 0)
{
audio_codec_id = (int)dVal;
LOG(INFO)<<"parse audiocodecid "<<audio_codec_id;
}
else if (strcasecmp("filesize", property->p_name.av_val) == 0)
{
file_size = (int)dVal;
LOG(INFO)<<"parse filesize "<<file_size;
}
}
else if (property->p_type == AMF_STRING)
{
AMFProp_GetString(property, &val);
}
}
}
}
else
{
AMFProp_GetString(property, &val);
LOG(INFO)<<"val = "<<val.av_val;
}
}
}
}