mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-19 09:41:07 +02:00
Merge remote-tracking branch 'ReneVolution/dash' into dash
This commit is contained in:
commit
2f54340454
|
@ -264,18 +264,22 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
|
|||
" minBufferTime=\"PT%uiS\"\n" \
|
||||
" timeShiftBufferDepth=\"PT0H0M0.00S\"\n" \
|
||||
" suggestedPresentationDelay=\"PT%uiS\"\n" \
|
||||
" profiles=\"urn:mpeg:dash:profile:isoff-live:2011\">\n" \
|
||||
" profiles=\"urn:hbbtv:dash:profile:isoff-live:2012," \
|
||||
"urn:mpeg:dash:profile:isoff-live:2011\"\n" \
|
||||
" xmlns:xsi=\"http://www.w3.org/2011/XMLSchema-instance\"\n" \
|
||||
" xsi:schemaLocation=\"urn:mpeg:DASH:schema:MPD:2011 DASH-MPD.xsd\">\n" \
|
||||
" <Period start=\"PT0S\" id=\"dash\">\n"
|
||||
|
||||
|
||||
#define NGX_RTMP_DASH_MANIFEST_VIDEO \
|
||||
" <AdaptationSet\n" \
|
||||
" id=\"1\"\n" \
|
||||
" segmentAlignment=\"true\"\n" \
|
||||
" maxWidth=\"%ui\"\n" \
|
||||
" maxHeight=\"%ui\"\n" \
|
||||
" maxFrameRate=\"%ui\">\n" \
|
||||
" <Representation\n" \
|
||||
" id=\"video\"\n" \
|
||||
" id=\"%V_H264\"\n" \
|
||||
" mimeType=\"video/mp4\"\n" \
|
||||
" codecs=\"avc1.42c028\"\n" \
|
||||
" width=\"%ui\"\n" \
|
||||
|
@ -305,13 +309,14 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
|
|||
|
||||
#define NGX_RTMP_DASH_MANIFEST_AUDIO \
|
||||
" <AdaptationSet\n" \
|
||||
" id=\"2\"\n" \
|
||||
" segmentAlignment=\"true\">\n" \
|
||||
" <AudioChannelConfiguration\n" \
|
||||
" schemeIdUri=\"urn:mpeg:dash:" \
|
||||
"23003:3:audio_channel_configuration:2011\"\n" \
|
||||
" value=\"1\"/>\n" \
|
||||
" <Representation\n" \
|
||||
" id=\"audio\"\n" \
|
||||
" id=\"%V_AAC\"\n" \
|
||||
" mimeType=\"audio/mp4\"\n" \
|
||||
" codecs=\"mp4a.%s\"\n" \
|
||||
" audioSamplingRate=\"%ui\"\n" \
|
||||
|
@ -381,6 +386,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
|
|||
codec_ctx->width,
|
||||
codec_ctx->height,
|
||||
codec_ctx->frame_rate,
|
||||
&ctx->name,
|
||||
codec_ctx->width,
|
||||
codec_ctx->height,
|
||||
codec_ctx->frame_rate,
|
||||
|
@ -400,7 +406,8 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
|
|||
}
|
||||
|
||||
if (ctx->has_audio) {
|
||||
p = ngx_slprintf(buffer, last, NGX_RTMP_DASH_MANIFEST_AUDIO,
|
||||
p = ngx_slprintf(buffer, last, NGX_RTMP_DASH_MANIFEST_AUDIO,
|
||||
&ctx->name,
|
||||
codec_ctx->audio_codec_id == NGX_RTMP_AUDIO_AAC ?
|
||||
"40.2" : "6b",
|
||||
codec_ctx->sample_rate,
|
||||
|
@ -1184,7 +1191,7 @@ ngx_rtmp_dash_video(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
|
|||
if (htype != 1) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
p = (u_char *) &delay;
|
||||
|
||||
p[0] = in->buf->pos[4];
|
||||
|
|
Loading…
Reference in a new issue