|
|
|
@ -263,7 +263,7 @@ static int write_manifest(AVFormatContext *s, int final) |
|
|
|
|
if (s->streams[i]->codecpar->codec_type != AVMEDIA_TYPE_VIDEO) |
|
|
|
|
continue; |
|
|
|
|
last = i; |
|
|
|
|
avio_printf(out, "<QualityLevel Index=\"%d\" Bitrate=\"%"PRId64"\" FourCC=\"%s\" MaxWidth=\"%d\" MaxHeight=\"%d\" CodecPrivateData=\"%s\" />\n", index, (int64_t)s->streams[i]->codecpar->bit_rate, os->fourcc, s->streams[i]->codecpar->width, s->streams[i]->codecpar->height, os->private_str); |
|
|
|
|
avio_printf(out, "<QualityLevel Index=\"%d\" Bitrate=\"%"PRId64"\" FourCC=\"%s\" MaxWidth=\"%d\" MaxHeight=\"%d\" CodecPrivateData=\"%s\" />\n", index, s->streams[i]->codecpar->bit_rate, os->fourcc, s->streams[i]->codecpar->width, s->streams[i]->codecpar->height, os->private_str); |
|
|
|
|
index++; |
|
|
|
|
} |
|
|
|
|
output_chunk_list(&c->streams[last], out, final, c->lookahead_count, c->window_size); |
|
|
|
@ -277,7 +277,7 @@ static int write_manifest(AVFormatContext *s, int final) |
|
|
|
|
if (s->streams[i]->codecpar->codec_type != AVMEDIA_TYPE_AUDIO) |
|
|
|
|
continue; |
|
|
|
|
last = i; |
|
|
|
|
avio_printf(out, "<QualityLevel Index=\"%d\" Bitrate=\"%"PRId64"\" FourCC=\"%s\" SamplingRate=\"%d\" Channels=\"%d\" BitsPerSample=\"16\" PacketSize=\"%d\" AudioTag=\"%d\" CodecPrivateData=\"%s\" />\n", index, (int64_t)s->streams[i]->codecpar->bit_rate, os->fourcc, s->streams[i]->codecpar->sample_rate, s->streams[i]->codecpar->channels, os->packet_size, os->audio_tag, os->private_str); |
|
|
|
|
avio_printf(out, "<QualityLevel Index=\"%d\" Bitrate=\"%"PRId64"\" FourCC=\"%s\" SamplingRate=\"%d\" Channels=\"%d\" BitsPerSample=\"16\" PacketSize=\"%d\" AudioTag=\"%d\" CodecPrivateData=\"%s\" />\n", index, s->streams[i]->codecpar->bit_rate, os->fourcc, s->streams[i]->codecpar->sample_rate, s->streams[i]->codecpar->channels, os->packet_size, os->audio_tag, os->private_str); |
|
|
|
|
index++; |
|
|
|
|
} |
|
|
|
|
output_chunk_list(&c->streams[last], out, final, c->lookahead_count, c->window_size); |
|
|
|
@ -324,7 +324,7 @@ static int ism_write_header(AVFormatContext *s) |
|
|
|
|
ret = AVERROR(EINVAL); |
|
|
|
|
goto fail; |
|
|
|
|
} |
|
|
|
|
snprintf(os->dirname, sizeof(os->dirname), "%s/QualityLevels(%"PRId64")", s->filename, (int64_t)s->streams[i]->codecpar->bit_rate); |
|
|
|
|
snprintf(os->dirname, sizeof(os->dirname), "%s/QualityLevels(%"PRId64")", s->filename, s->streams[i]->codecpar->bit_rate); |
|
|
|
|
if (mkdir(os->dirname, 0777) == -1 && errno != EEXIST) { |
|
|
|
|
ret = AVERROR(errno); |
|
|
|
|
av_log(s, AV_LOG_ERROR, "mkdir failed\n"); |
|
|
|
|