Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maalepaaler
qstream
Commits
264f7d22
Commit
264f7d22
authored
Mar 25, 2015
by
Olav Kvittem
Browse files
crude format change, rtmp module perl defined cleanup
parent
173179d4
Changes
2
Show whitespace changes
Inline
Side-by-side
qstream
View file @
264f7d22
...
...
@@ -755,7 +755,7 @@ sub eat_stream {
my $tx0;
if (($fid, $seq, $src, $dst, $tx, $rx, $size)=
/ID=(\d+)\s+SEQ=(\d+)\s+SRC=([\d.:]+)\s+DST=([\d.:]+)\s+Tx=([\d.,]+)\s+Rx=([\d.,]+)\s+SIZE=(\d+)/){
/ID=(\d+)\s+SEQ=(\d+)\s+SRC=([\d.:]+)\s+DST=([\d.:]+)\s+Tx=([\d.,]+)\s+Rx=([\d.,]+)\s+
.*
SIZE=(\d+)/){
$flow_key="$src->$dst";
$flow_pkts{$flow_key}++;
...
...
rtmp/client.pm
View file @
264f7d22
...
...
@@ -948,7 +948,7 @@ sub get_rtmp_timer
my
$output
;
my
(
$sec
,
$microsec
)
=
gettimeofday
;
my
$now_time
=
$sec
.
substr
(
$microsec
,
0
,
3
);
our
@rtmp_timer_start
unless
defined
@rtmp_timer_start
;
our
@rtmp_timer_start
unless
@rtmp_timer_start
;
if
(
defined
$rtmp_timer_start
[
$chunk_id
])
{
my
$rtmp_timestamp
=
$now_time
-
$rtmp_timer_start
[
$chunk_id
];
...
...
@@ -981,7 +981,7 @@ sub reset_rtmp_timer
my
(
$sec
,
$microsec
)
=
gettimeofday
;
my
$now_time
=
$sec
.
substr
(
$microsec
,
0
,
3
);
our
@rtmp_timer_start
unless
defined
@rtmp_timer_start
;
our
@rtmp_timer_start
unless
@rtmp_timer_start
;
$rtmp_timer_start
[
$chunk_id
]
=
$now_time
;
return
1
;
}
...
...
@@ -995,7 +995,7 @@ sub set_rtmp_chunk_msg_length
my
(
$chunk_id
,
$chunk_message_length
)
=
@_
;
return
unless
$chunk_id
=~
/^[1-9][\d]*$/
and
$chunk_message_length
=~
/^[0-9][\d]*$/
;
our
@rtmp_msg_length
unless
defined
@rtmp_msg_length
;
our
@rtmp_msg_length
unless
@rtmp_msg_length
;
$rtmp_msg_length
[
$chunk_id
]
=
$chunk_message_length
;
return
1
;
}
...
...
@@ -1009,7 +1009,7 @@ sub get_rtmp_chunk_msg_length
{
my
(
$chunk_id
)
=
@_
;
return
unless
$chunk_id
=~
/^[1-9][\d]*$/
;
print
'
get msg length before set.
'
unless
defined
@rtmp_msg_length
;
print
'
get msg length before set.
'
unless
@rtmp_msg_length
;
return
$rtmp_msg_length
[
$chunk_id
];
}
...
...
@@ -1021,7 +1021,7 @@ sub set_rtmp_chunk_msg_type_id
{
my
(
$chunk_id
,
$chunk_message_type_id
)
=
@_
;
return
unless
$chunk_id
and
$chunk_message_type_id
=~
/^[1-9][\d]*$/
;
our
@rtmp_msg_type_id
unless
defined
@rtmp_msg_type_id
;
our
@rtmp_msg_type_id
unless
@rtmp_msg_type_id
;
$rtmp_msg_type_id
[
$chunk_id
]
=
$chunk_message_type_id
;
return
1
;
}
...
...
@@ -1034,7 +1034,7 @@ sub get_rtmp_chunk_msg_type_id
{
my
(
$chunk_id
)
=
@_
;
return
unless
$chunk_id
=~
/^[1-9][\d]*$/
;
print
'
get msg type id before set.
'
unless
defined
@rtmp_msg_type_id
;
print
'
get msg type id before set.
'
unless
@rtmp_msg_type_id
;
return
$rtmp_msg_type_id
[
$chunk_id
];
}
...
...
@@ -1047,7 +1047,7 @@ sub set_rtmp_chunk_msg_stream_id
my
(
$chunk_id
,
$chunk_message_stream_id
)
=
@_
;
return
unless
$chunk_id
=~
/^[1-9][\d]*$/
and
$chunk_message_stream_id
=~
/^[1-9][\d]*$/
;
our
@rtmp_msg_stream_id
unless
defined
@rtmp_msg_stream_id
;
our
@rtmp_msg_stream_id
unless
@rtmp_msg_stream_id
;
$rtmp_msg_stream_id
[
$chunk_id
]
=
$chunk_message_stream_id
;
return
1
;
}
...
...
@@ -1060,7 +1060,7 @@ sub get_rtmp_chunk_msg_stream_id
{
my
(
$chunk_id
)
=
@_
;
return
unless
$chunk_id
=~
/^[1-9][\d]*$/
;
print
'
get msg stream id before set.
'
unless
defined
@rtmp_msg_stream_id
;
print
'
get msg stream id before set.
'
unless
@rtmp_msg_stream_id
;
return
$rtmp_msg_stream_id
[
$chunk_id
];
}
...
...
@@ -1102,7 +1102,7 @@ sub get_rtmp_client_chunk_size
sub
reset_rtmp_msg
{
print
"
reset rtmp msg before set it.
\n
"
unless
defined
@rtmp_msg
;
print
"
reset rtmp msg before set it.
\n
"
unless
@rtmp_msg
;
my
(
$chunk_id
)
=
@_
;
$rtmp_msg
[
$chunk_id
]
=
'';
}
...
...
@@ -1114,7 +1114,7 @@ sub reset_rtmp_msg
sub
put_rtmp_msg
{
my
(
$chunk_id
,
$string
)
=
@_
;
our
@rtmp_msg
unless
defined
@rtmp_msg
;
our
@rtmp_msg
unless
@rtmp_msg
;
$rtmp_msg
[
$chunk_id
]
.=
$string
;
}
...
...
@@ -1124,7 +1124,7 @@ sub put_rtmp_msg
sub
get_rtmp_msg
{
print
"
get rtmp msg before set it.
\n
"
unless
defined
@rtmp_msg
;
print
"
get rtmp msg before set it.
\n
"
unless
@rtmp_msg
;
my
(
$chunk_id
)
=
@_
;
return
$rtmp_msg
[
$chunk_id
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment