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");
369 for(i=0;i<
size;i+=2) {
416 avio_wb16(pb, 0x4000 + packet_number * 126);
438 int data_size, index_pos, i;
444 data_size = index_pos - rm->
data_pos;
469 .mime_type =
"application/vnd.rn-realmedia",
470 .extensions =
"rm,ra",