95 const char *challenge)
97 int ch_len = strlen (challenge), i;
98 unsigned char zres[16],
99 buf[64] = { 0xa1, 0xe9, 0x14, 0x9d, 0x0e, 0x6b, 0x3b, 0x59 };
100 #define XOR_TABLE_SIZE 37
102 0x05, 0x18, 0x74, 0xd0, 0x0d, 0x09, 0x02, 0x53,
103 0xc0, 0x01, 0x05, 0x05, 0x67, 0x03, 0x19, 0x70,
104 0x08, 0x27, 0x66, 0x10, 0x10, 0x72, 0x08, 0x09,
105 0x63, 0x11, 0x03, 0x71, 0x08, 0x08, 0x70, 0x02,
106 0x10, 0x57, 0x05, 0x18, 0x54 };
111 else if (ch_len > 56)
113 memcpy(buf + 8, challenge, ch_len);
117 buf[8 + i] ^= xor_table[i];
123 strcpy (response + 32,
"01d0a8e3");
126 for (i = 0; i < 8; i++)
127 chksum[i] = response[i * 4];
155 NULL, NULL, NULL, NULL);
157 if (tag ==
MKTAG(
'M',
'L',
'T',
'I')) {
162 if (rule_nr < 0 || rule_nr >= num)
191 int *pset_id,
int *pseq_no,
int *pstream_id,
192 int *pis_keyframe, uint32_t *ptimestamp)
195 int consumed = 0, set_id, seq_no, stream_id,
is_keyframe,
196 len_included, need_reliable;
200 while (len >= 5 && buf[1] == 0xFF ) {
203 if (!(buf[0] & 0x80))
280 if (stream_id == 0x1f)
283 if (pset_id) *pset_id = set_id;
284 if (pseq_no) *pseq_no = seq_no;
285 if (pstream_id) *pstream_id = stream_id;
287 if (ptimestamp) *ptimestamp = timestamp;
307 &seq, flags, *timestamp);
313 memcpy (rdt->
buffer, buf + pos, len - pos);
315 NULL, NULL, NULL, NULL);
329 pkt->
pts = *timestamp;
351 pkt, ×tamp, NULL, 0, 0, flags);
357 rv =
ff_rdt_parse_header(buf, len, &set_id, &seq_no, &stream_id, &is_keyframe, ×tamp);
378 pkt, ×tamp, buf, len, 0, flags);
385 int stream_nr,
int rule_nr)
387 av_strlcatf(cmd, size,
"stream=%d;rule=%d,stream=%d;rule=%d",
388 stream_nr, rule_nr * 2, stream_nr, rule_nr * 2 + 1);
391 static unsigned char *
394 unsigned char *target;
400 *target_len = len * 3 / 4;
413 const char *p = line;
417 }
else if (
av_strstart(p,
"StartTime:integer;", &p))
419 else if (
av_strstart(p,
"ASMRuleBook:string;", &p)) {
425 if (first == -1) first =
n;
428 count *
sizeof(*rdt->
rmst))) < 0) {
449 if (sscanf(p,
" %*1[Aa]verage%*1[Bb]andwidth=%d", &st->
codec->
bit_rate) == 1)
451 if (!(p = strchr(p,
',')) || p > end)
464 st->
id = orig_st->
id;
476 int n_rules = 0, odd = 0;
495 if (!(end = strchr(p,
';')))
497 if (!odd && end != p) {
516 const char *p = line;
543 for (i = 0; i < rdt->
nb_rmst; i++)
555 #define RDT_HANDLER(n, s, t) \
556 static RTPDynamicProtocolHandler rdt_ ## n ## _handler = { \
559 .codec_id = AV_CODEC_ID_NONE, \
560 .parse_sdp_a_line = rdt_parse_sdp_line, \
561 .alloc = rdt_new_context, \
562 .free = rdt_free_context, \
563 .parse_packet = rdt_parse_packet \