~ubuntu-branches/ubuntu/hardy/ffmpeg/hardy

« back to all changes in this revision

Viewing changes to libavformat/rtp.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-08-23 14:35:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060823143552-8fxnur5b9gesr03m
Tags: 3:0.cvs20060823-0ubuntu1
* Sync with Debian:
  + Add the epoch again

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
  {9, "G722",        CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
59
59
  {10, "L16",        CODEC_TYPE_AUDIO,   CODEC_ID_PCM_S16BE, 44100, 2},
60
60
  {11, "L16",        CODEC_TYPE_AUDIO,   CODEC_ID_PCM_S16BE, 44100, 1},
61
 
  {12, "QCELP",      CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
 
61
  {12, "QCELP",      CODEC_TYPE_AUDIO,   CODEC_ID_QCELP, 8000, 1},
62
62
  {13, "CN",         CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
63
63
  {14, "MPA",        CODEC_TYPE_AUDIO,   CODEC_ID_MP2, 90000, -1},
64
64
  {15, "G728",       CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
218
218
{
219
219
    if (AVRtpPayloadTypes[payload_type].codec_id != CODEC_ID_NONE) {
220
220
        codec->codec_type = AVRtpPayloadTypes[payload_type].codec_type;
221
 
        codec->codec_id = AVRtpPayloadTypes[payload_type].codec_type;
 
221
        codec->codec_id = AVRtpPayloadTypes[payload_type].codec_id;
222
222
        if (AVRtpPayloadTypes[payload_type].audio_channels > 0)
223
223
            codec->channels = AVRtpPayloadTypes[payload_type].audio_channels;
224
224
        if (AVRtpPayloadTypes[payload_type].clock_rate > 0)
532
532
        payload_type = RTP_PT_PRIVATE; /* private payload type */
533
533
    s->payload_type = payload_type;
534
534
 
535
 
    s->base_timestamp = random();
 
535
// following 2 FIXMies could be set based on the current time, theres normaly no info leak, as rtp will likely be transmitted immedeatly
 
536
    s->base_timestamp = 0; /* FIXME: was random(), what should this be? */
536
537
    s->timestamp = s->base_timestamp;
537
 
    s->ssrc = random();
 
538
    s->ssrc = 0; /* FIXME: was random(), what should this be? */
538
539
    s->first_packet = 1;
539
540
 
540
541
    max_packet_size = url_fget_max_packet_size(&s1->pb);
859
860
    return 0;
860
861
}
861
862
 
862
 
AVOutputFormat rtp_mux = {
 
863
AVOutputFormat rtp_muxer = {
863
864
    "rtp",
864
865
    "RTP output format",
865
866
    NULL,
871
872
    rtp_write_packet,
872
873
    rtp_write_trailer,
873
874
};
874
 
 
875
 
int rtp_init(void)
876
 
{
877
 
    av_register_output_format(&rtp_mux);
878
 
    return 0;
879
 
}