46 #define BUFFER_DURATION 0
66 int data_size,
int index_pos)
71 unsigned char *data_offset_ptr, *start_ptr;
72 const char *desc, *mimetype;
73 int nb_packets, packet_total_size, packet_max_size,
size, packet_avg_size, i;
89 packet_total_size = 0;
109 packet_avg_size = packet_total_size / nb_packets;
132 if(tag) size += strlen(tag->
value);
147 desc =
"The Audio Stream";
148 mimetype =
"audio/x-pn-realaudio";
149 codec_data_size = 73;
151 desc =
"The Video Stream";
152 mimetype =
"video/x-pn-realvideo";
153 codec_data_size = 34;
157 size = 10 + 9 * 4 + strlen(desc) + strlen(mimetype) + codec_data_size;
196 switch(sample_rate) {
216 if (coded_frame_size == 557)
268 data_pos = s->
buf_ptr - start_ptr;
270 data_offset_ptr[0] = data_pos >> 24;
271 data_offset_ptr[1] = data_pos >> 16;
272 data_offset_ptr[2] = data_pos >> 8;
273 data_offset_ptr[3] = data_pos;
286 int length,
int key_frame)
313 av_log(s,
AV_LOG_ERROR,
"At most 2 streams are currently supported for muxing in RM\n");
372 for(i=0;i<
size;i+=2) {
419 avio_wb16(pb, 0x4000 + packet_number * 126);
441 int data_size, index_pos, i;
447 data_size = index_pos - rm->
data_pos;
472 .mime_type =
"application/vnd.rn-realmedia",
473 .extensions =
"rm,ra",