1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #383, refine code to support mix correct algorithm.

This commit is contained in:
winlin 2015-04-15 16:17:52 +08:00
parent 542aab4557
commit 8fbc6526bb
6 changed files with 76 additions and 28 deletions

View file

@ -1979,6 +1979,21 @@ srs_bool srs_utils_flv_tag_is_ok(char type)
return type == SRS_RTMP_TYPE_AUDIO || type == SRS_RTMP_TYPE_VIDEO || type == SRS_RTMP_TYPE_SCRIPT;
}
srs_bool srs_utils_flv_tag_is_audio(char type)
{
return type == SRS_RTMP_TYPE_AUDIO;
}
srs_bool srs_utils_flv_tag_is_video(char type)
{
return type == SRS_RTMP_TYPE_VIDEO;
}
srs_bool srs_utils_flv_tag_is_av(char type)
{
return type == SRS_RTMP_TYPE_AUDIO || type == SRS_RTMP_TYPE_VIDEO;
}
char srs_utils_flv_video_codec_id(char* data, int size)
{
if (size < 1) {

View file

@ -661,6 +661,9 @@ extern int srs_utils_parse_timestamp(
* @return true when tag is video/audio/script-data; otherwise, false.
*/
extern srs_bool srs_utils_flv_tag_is_ok(char type);
extern srs_bool srs_utils_flv_tag_is_audio(char type);
extern srs_bool srs_utils_flv_tag_is_video(char type);
extern srs_bool srs_utils_flv_tag_is_av(char type);
/**
* get the CodecID of video tag.