summaryrefslogtreecommitdiff
path: root/libavformat/rdt.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2008-10-04 04:11:12 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2008-10-04 04:11:12 +0000
commited0aacc76eccf2b523352f0c74107e2f6ba9cf93 (patch)
treec6d6eb117f212699a5545135927130a31e7a11e9 /libavformat/rdt.c
parentdd990075d62a981283de008b43cea0556fa81959 (diff)
Rename RTP payload contexts to PayloadContext, suggested by Luca in
"RDT/Realmedia patches #2" thread on ML. Originally committed as revision 15540 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rdt.c')
-rw-r--r--libavformat/rdt.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index c65e1d5e34..1fa36df04d 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -34,13 +34,13 @@
#include "rm.h"
#include "internal.h"
-typedef struct rdt_data {
+struct PayloadContext {
AVFormatContext *rmctx;
uint8_t *mlti_data;
unsigned int mlti_data_size;
uint32_t prev_sn, prev_ts;
char buffer[RTP_MAX_PACKET_LENGTH + FF_INPUT_BUFFER_PADDING_SIZE];
-} rdt_data;
+};
void
ff_rdt_calc_response_and_checksum(char response[41], char chksum[9],
@@ -82,7 +82,7 @@ ff_rdt_calc_response_and_checksum(char response[41], char chksum[9],
}
static int
-rdt_load_mdpr (rdt_data *rdt, AVStream *st, int rule_nr)
+rdt_load_mdpr (PayloadContext *rdt, AVStream *st, int rule_nr)
{
ByteIOContext *pb;
int size;
@@ -166,7 +166,7 @@ static int
rdt_parse_packet (RTPDemuxContext *s, AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, int flags)
{
- rdt_data *rdt = s->dynamic_protocol_context;
+ PayloadContext *rdt = s->dynamic_protocol_context;
int seq = 1, res;
ByteIOContext *pb = rdt->rmctx->pb;
RMContext *rm = rdt->rmctx->priv_data;
@@ -206,7 +206,7 @@ int
ff_rdt_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
const uint8_t *buf, int len)
{
- rdt_data *rdt = s->dynamic_protocol_context;
+ PayloadContext *rdt = s->dynamic_protocol_context;
int seq, flags = 0, rule, sn;
uint32_t timestamp;
int rv= 0;
@@ -252,7 +252,7 @@ void
ff_rdt_subscribe_rule2 (RTPDemuxContext *s, char *cmd, int size,
int stream_nr, int rule_nr)
{
- rdt_data *rdt = s->dynamic_protocol_context;
+ PayloadContext *rdt = s->dynamic_protocol_context;
rdt_load_mdpr(rdt, s->st, rule_nr * 2);
}
@@ -273,9 +273,8 @@ rdt_parse_b64buf (unsigned int *target_len, const char *p)
}
static int
-rdt_parse_sdp_line (AVStream *stream, void *d, const char *line)
+rdt_parse_sdp_line (AVStream *stream, PayloadContext *rdt, const char *line)
{
- rdt_data *rdt = d;
const char *p = line;
if (av_strstart(p, "OpaqueData:buffer;", &p)) {
@@ -286,10 +285,10 @@ rdt_parse_sdp_line (AVStream *stream, void *d, const char *line)
return 0;
}
-static void *
+static PayloadContext *
rdt_new_extradata (void)
{
- rdt_data *rdt = av_mallocz(sizeof(rdt_data));
+ PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
av_open_input_stream(&rdt->rmctx, NULL, "", &rdt_demuxer, NULL);
rdt->prev_ts = -1;
@@ -299,10 +298,8 @@ rdt_new_extradata (void)
}
static void
-rdt_free_extradata (void *d)
+rdt_free_extradata (PayloadContext *rdt)
{
- rdt_data *rdt = d;
-
if (rdt->rmctx)
av_close_input_stream(rdt->rmctx);
av_freep(&rdt->mlti_data);