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
8 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
011ac4f6a9eb341490d998c16695dfb889806754
011ac4f6
1 parent
3f3e98e9
for #738, add mp4 demuxer to librtmp
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
36 行增加
和
0 行删除
trunk/src/libs/srs_librtmp.cpp
trunk/src/libs/srs_librtmp.hpp
trunk/src/libs/srs_librtmp.cpp
查看文件 @
011ac4f
...
...
@@ -1544,6 +1544,31 @@ srs_bool srs_h264_startswith_annexb(char* h264_raw_data, int h264_raw_size, int*
return
srs_avc_startswith_annexb
(
&
stream
,
pnb_start_code
);
}
struct
Mp4Context
{
SrsFileReader
reader
;
};
srs_mp4_t
srs_mp4_open_read
(
const
char
*
file
)
{
int
ret
=
ERROR_SUCCESS
;
Mp4Context
*
mp4
=
new
Mp4Context
();
if
((
ret
=
mp4
->
reader
.
open
(
file
))
!=
ERROR_SUCCESS
)
{
srs_freep
(
mp4
);
return
NULL
;
}
return
mp4
;
}
void
srs_mp4_close
(
srs_mp4_t
mp4
)
{
Mp4Context
*
context
=
(
Mp4Context
*
)
mp4
;
srs_freep
(
context
);
}
struct
FlvContext
{
...
...
trunk/src/libs/srs_librtmp.hpp
查看文件 @
011ac4f
...
...
@@ -501,6 +501,17 @@ extern srs_bool srs_h264_startswith_annexb(
char
*
h264_raw_data
,
int
h264_raw_size
,
int
*
pnb_start_code
);
/*************************************************************
*************************************************************
* MP4 muxer and demuxer.
* @example /trunk/research/librtmp/srs_ingest_mp4.c
*************************************************************
*************************************************************/
typedef
void
*
srs_mp4_t
;
/* Open mp4 file for muxer(write) or demuxer(read). */
extern
srs_mp4_t
srs_mp4_open_read
(
const
char
*
file
);
extern
void
srs_mp4_close
(
srs_mp4_t
mp4
);
/*************************************************************
**************************************************************
...
...
请
注册
或
登录
后发表评论