mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-18 21:10:10 +01:00
rtpenc: Expose the ssrc as an avoption
This allows the caller to set it, and allows the caller to query what it was set to. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
static const AVOption options[] = {
|
static const AVOption options[] = {
|
||||||
FF_RTP_FLAG_OPTS(RTPMuxContext, flags)
|
FF_RTP_FLAG_OPTS(RTPMuxContext, flags)
|
||||||
{ "payload_type", "Specify RTP payload type", offsetof(RTPMuxContext, payload_type), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, 127, AV_OPT_FLAG_ENCODING_PARAM },
|
{ "payload_type", "Specify RTP payload type", offsetof(RTPMuxContext, payload_type), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, 127, AV_OPT_FLAG_ENCODING_PARAM },
|
||||||
|
{ "ssrc", "Stream identifier", offsetof(RTPMuxContext, ssrc), AV_OPT_TYPE_INT, { 0 }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -101,6 +102,7 @@ static int rtp_write_header(AVFormatContext *s1)
|
|||||||
s->base_timestamp = av_get_random_seed();
|
s->base_timestamp = av_get_random_seed();
|
||||||
s->timestamp = s->base_timestamp;
|
s->timestamp = s->base_timestamp;
|
||||||
s->cur_timestamp = 0;
|
s->cur_timestamp = 0;
|
||||||
|
if (!s->ssrc)
|
||||||
s->ssrc = av_get_random_seed();
|
s->ssrc = av_get_random_seed();
|
||||||
s->first_packet = 1;
|
s->first_packet = 1;
|
||||||
s->first_rtcp_ntp_time = ff_ntp_time();
|
s->first_rtcp_ntp_time = ff_ntp_time();
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#define LIBAVFORMAT_VERSION_MAJOR 54
|
#define LIBAVFORMAT_VERSION_MAJOR 54
|
||||||
#define LIBAVFORMAT_VERSION_MINOR 3
|
#define LIBAVFORMAT_VERSION_MINOR 3
|
||||||
#define LIBAVFORMAT_VERSION_MICRO 0
|
#define LIBAVFORMAT_VERSION_MICRO 1
|
||||||
|
|
||||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||||
LIBAVFORMAT_VERSION_MINOR, \
|
LIBAVFORMAT_VERSION_MINOR, \
|
||||||
|
|||||||
Reference in New Issue
Block a user