mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avformat/utils: Move ff_stream_encode_params_copy() to mux_utils.c
Only used by muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
08c14e67bb
commit
20ca491664
@ -781,15 +781,6 @@ enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags);
|
|||||||
*/
|
*/
|
||||||
int ff_generate_avci_extradata(AVStream *st);
|
int ff_generate_avci_extradata(AVStream *st);
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy encoding parameters from source to destination stream
|
|
||||||
*
|
|
||||||
* @param dst pointer to destination AVStream
|
|
||||||
* @param src pointer to source AVStream
|
|
||||||
* @return >=0 on success, AVERROR code on error
|
|
||||||
*/
|
|
||||||
int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy side data from source to destination stream
|
* Copy side data from source to destination stream
|
||||||
*
|
*
|
||||||
|
@ -113,6 +113,15 @@ int ff_format_shift_data(AVFormatContext *s, int64_t read_start, int shift_size)
|
|||||||
*/
|
*/
|
||||||
int ff_format_output_open(AVFormatContext *s, const char *url, AVDictionary **options);
|
int ff_format_output_open(AVFormatContext *s, const char *url, AVDictionary **options);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy encoding parameters from source to destination stream
|
||||||
|
*
|
||||||
|
* @param dst pointer to destination AVStream
|
||||||
|
* @param src pointer to source AVStream
|
||||||
|
* @return >=0 on success, AVERROR code on error
|
||||||
|
*/
|
||||||
|
int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse creation_time in AVFormatContext metadata if exists and warn if the
|
* Parse creation_time in AVFormatContext metadata if exists and warn if the
|
||||||
* parsing fails.
|
* parsing fails.
|
||||||
|
@ -121,6 +121,34 @@ int ff_format_output_open(AVFormatContext *s, const char *url, AVDictionary **op
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
dst->id = src->id;
|
||||||
|
dst->time_base = src->time_base;
|
||||||
|
dst->nb_frames = src->nb_frames;
|
||||||
|
dst->disposition = src->disposition;
|
||||||
|
dst->sample_aspect_ratio = src->sample_aspect_ratio;
|
||||||
|
dst->avg_frame_rate = src->avg_frame_rate;
|
||||||
|
dst->r_frame_rate = src->r_frame_rate;
|
||||||
|
|
||||||
|
av_dict_free(&dst->metadata);
|
||||||
|
ret = av_dict_copy(&dst->metadata, src->metadata, 0);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = avcodec_parameters_copy(dst->codecpar, src->codecpar);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = ff_stream_side_data_copy(dst, src);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int ff_parse_creation_time_metadata(AVFormatContext *s, int64_t *timestamp, int return_seconds)
|
int ff_parse_creation_time_metadata(AVFormatContext *s, int64_t *timestamp, int return_seconds)
|
||||||
{
|
{
|
||||||
AVDictionaryEntry *entry;
|
AVDictionaryEntry *entry;
|
||||||
|
@ -553,34 +553,6 @@ int av_read_pause(AVFormatContext *s)
|
|||||||
return AVERROR(ENOSYS);
|
return AVERROR(ENOSYS);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
dst->id = src->id;
|
|
||||||
dst->time_base = src->time_base;
|
|
||||||
dst->nb_frames = src->nb_frames;
|
|
||||||
dst->disposition = src->disposition;
|
|
||||||
dst->sample_aspect_ratio = src->sample_aspect_ratio;
|
|
||||||
dst->avg_frame_rate = src->avg_frame_rate;
|
|
||||||
dst->r_frame_rate = src->r_frame_rate;
|
|
||||||
|
|
||||||
av_dict_free(&dst->metadata);
|
|
||||||
ret = av_dict_copy(&dst->metadata, src->metadata, 0);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = avcodec_parameters_copy(dst->codecpar, src->codecpar);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = ff_stream_side_data_copy(dst, src);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ff_stream_side_data_copy(AVStream *dst, const AVStream *src)
|
int ff_stream_side_data_copy(AVStream *dst, const AVStream *src)
|
||||||
{
|
{
|
||||||
/* Free existing side data*/
|
/* Free existing side data*/
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "avio.h"
|
#include "avio.h"
|
||||||
#include "avio_internal.h"
|
#include "avio_internal.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
#include "mux.h"
|
||||||
|
|
||||||
#include "libavutil/log.h"
|
#include "libavutil/log.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user