Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-03-23 21:19:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f69fa7273be175360b9a5affc747444a14da2f74
f69fa727
1 parent
1cb29928
fix #302, remove the thread unsafe code, no static.
显示空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
13 行增加
和
13 行删除
trunk/src/app/srs_app_hds.cpp
trunk/src/core/srs_core.hpp
trunk/src/kernel/srs_kernel_flv.cpp
trunk/src/kernel/srs_kernel_mp3.cpp
trunk/src/kernel/srs_kernel_ts.cpp
trunk/src/libs/srs_librtmp.cpp
trunk/src/protocol/srs_rtmp_sdk.cpp
trunk/src/app/srs_app_hds.cpp
查看文件 @
f69fa72
...
...
@@ -146,7 +146,7 @@ public:
data
.
append
(
serialFlv
(
msg
));
}
static
char
box_header
[
8
];
char
box_header
[
8
];
SrsStream
ss
;
ss
.
initialize
(
box_header
,
8
);
ss
.
write_4bytes
(
8
+
data
.
size
());
...
...
trunk/src/core/srs_core.hpp
查看文件 @
f69fa72
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 14
6
#define VERSION_REVISION 14
7
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
trunk/src/kernel/srs_kernel_flv.cpp
查看文件 @
f69fa72
...
...
@@ -74,7 +74,7 @@ int SrsFlvEncoder::write_header()
int
ret
=
ERROR_SUCCESS
;
// 9bytes header and 4bytes first previous-tag-size
static
char
flv_header
[]
=
{
char
flv_header
[]
=
{
'F'
,
'L'
,
'V'
,
// Signatures "FLV"
(
char
)
0x01
,
// File version (for example, 0x01 for FLV version 1)
(
char
)
0x00
,
// 4, audio; 1, video; 5 audio+video.
...
...
@@ -118,7 +118,7 @@ int SrsFlvEncoder::write_metadata(char type, char* data, int size)
srs_assert
(
data
);
// 11 bytes tag header
static
char
tag_header
[]
=
{
char
tag_header
[]
=
{
(
char
)
type
,
// TagType UB [5], 18 = script data
(
char
)
0x00
,
(
char
)
0x00
,
(
char
)
0x00
,
// DataSize UI24 Length of the message.
(
char
)
0x00
,
(
char
)
0x00
,
(
char
)
0x00
,
// Timestamp UI24 Time in milliseconds at which the data in this tag applies.
...
...
@@ -149,7 +149,7 @@ int SrsFlvEncoder::write_audio(int64_t timestamp, char* data, int size)
timestamp
&=
0x7fffffff
;
// 11bytes tag header
static
char
tag_header
[]
=
{
char
tag_header
[]
=
{
(
char
)
SrsCodecFlvTagAudio
,
// TagType UB [5], 8 = audio
(
char
)
0x00
,
(
char
)
0x00
,
(
char
)
0x00
,
// DataSize UI24 Length of the message.
(
char
)
0x00
,
(
char
)
0x00
,
(
char
)
0x00
,
// Timestamp UI24 Time in milliseconds at which the data in this tag applies.
...
...
@@ -183,7 +183,7 @@ int SrsFlvEncoder::write_video(int64_t timestamp, char* data, int size)
timestamp
&=
0x7fffffff
;
// 11bytes tag header
static
char
tag_header
[]
=
{
char
tag_header
[]
=
{
(
char
)
SrsCodecFlvTagVideo
,
// TagType UB [5], 9 = video
(
char
)
0x00
,
(
char
)
0x00
,
(
char
)
0x00
,
// DataSize UI24 Length of the message.
(
char
)
0x00
,
(
char
)
0x00
,
(
char
)
0x00
,
// Timestamp UI24 Time in milliseconds at which the data in this tag applies.
...
...
@@ -231,7 +231,7 @@ int SrsFlvEncoder::write_tag(char* header, int header_size, char* tag, int tag_s
}
// PreviousTagSizeN UI32 Size of last tag, including its header, in bytes.
static
char
pre_size
[
SRS_FLV_PREVIOUS_TAG_SIZE
];
char
pre_size
[
SRS_FLV_PREVIOUS_TAG_SIZE
];
if
((
ret
=
tag_stream
->
initialize
(
pre_size
,
SRS_FLV_PREVIOUS_TAG_SIZE
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
...
...
@@ -426,7 +426,7 @@ int SrsFlvVodStreamDecoder::read_sequence_header_summary(int64_t* pstart, int* p
// and must be a sequence video and audio.
// 11bytes tag header
static
char
tag_header
[]
=
{
char
tag_header
[]
=
{
(
char
)
0x00
,
// TagType UB [5], 9 = video, 8 = audio, 18 = script data
(
char
)
0x00
,
(
char
)
0x00
,
(
char
)
0x00
,
// DataSize UI24 Length of the message.
(
char
)
0x00
,
(
char
)
0x00
,
(
char
)
0x00
,
// Timestamp UI24 Time in milliseconds at which the data in this tag applies.
...
...
trunk/src/kernel/srs_kernel_mp3.cpp
查看文件 @
f69fa72
...
...
@@ -68,7 +68,7 @@ int SrsMp3Encoder::initialize(SrsFileWriter* fs)
int
SrsMp3Encoder
::
write_header
()
{
static
char
id3
[]
=
{
char
id3
[]
=
{
(
char
)
0x49
,
(
char
)
0x44
,
(
char
)
0x33
,
// ID3
(
char
)
0x03
,
(
char
)
0x00
,
// version
(
char
)
0x00
,
// flags
...
...
trunk/src/kernel/srs_kernel_ts.cpp
查看文件 @
f69fa72
...
...
@@ -2772,7 +2772,7 @@ int SrsTsCache::do_cache_aac(SrsAvcAacCodec* codec, SrsCodecSample* sample)
// 6.2 Audio Data Transport Stream, ADTS
// in aac-iso-13818-7.pdf, page 26.
// fixed 7bytes header
static
u_int8_t
adts_header
[
7
]
=
{
0xff
,
0xf9
,
0x00
,
0x00
,
0x00
,
0x0f
,
0xfc
};
u_int8_t
adts_header
[
7
]
=
{
0xff
,
0xf9
,
0x00
,
0x00
,
0x00
,
0x0f
,
0xfc
};
/*
// adts_fixed_header
// 2B, 16bits
...
...
@@ -2824,7 +2824,7 @@ int SrsTsCache::do_cache_avc(SrsAvcAacCodec* codec, SrsCodecSample* sample)
int
ret
=
ERROR_SUCCESS
;
// for type1/5/6, insert aud packet.
static
u_int8_t
aud_nal
[]
=
{
0x00
,
0x00
,
0x00
,
0x01
,
0x09
,
0xf0
};
u_int8_t
aud_nal
[]
=
{
0x00
,
0x00
,
0x00
,
0x01
,
0x09
,
0xf0
};
bool
sps_pps_sent
=
false
;
bool
aud_sent
=
false
;
...
...
trunk/src/libs/srs_librtmp.cpp
查看文件 @
f69fa72
...
...
@@ -2340,7 +2340,7 @@ int srs_human_print_rtmp_packet(char type, u_int32_t timestamp, char* data, int
const
char
*
srs_human_format_time
()
{
struct
timeval
tv
;
static
char
buf
[
23
];
char
buf
[
23
];
memset
(
buf
,
0
,
sizeof
(
buf
));
...
...
trunk/src/protocol/srs_rtmp_sdk.cpp
查看文件 @
f69fa72
...
...
@@ -260,7 +260,7 @@ int SrsHandshakeBytes::create_c0c1()
srs_random_generate
(
c0c1
,
1537
);
// plain text required.
static
SrsStream
stream
;
SrsStream
stream
;
if
((
ret
=
stream
.
initialize
(
c0c1
,
9
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
...
...
请
注册
或
登录
后发表评论