| OLD | NEW |
| 1 /* | 1 /* |
| 2 * RTP output format | 2 * RTP output format |
| 3 * Copyright (c) 2002 Fabrice Bellard | 3 * Copyright (c) 2002 Fabrice Bellard |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 case CODEC_ID_MPEG1VIDEO: | 124 case CODEC_ID_MPEG1VIDEO: |
| 125 case CODEC_ID_MPEG2VIDEO: | 125 case CODEC_ID_MPEG2VIDEO: |
| 126 break; | 126 break; |
| 127 case CODEC_ID_MPEG2TS: | 127 case CODEC_ID_MPEG2TS: |
| 128 n = s->max_payload_size / TS_PACKET_SIZE; | 128 n = s->max_payload_size / TS_PACKET_SIZE; |
| 129 if (n < 1) | 129 if (n < 1) |
| 130 n = 1; | 130 n = 1; |
| 131 s->max_payload_size = n * TS_PACKET_SIZE; | 131 s->max_payload_size = n * TS_PACKET_SIZE; |
| 132 s->buf_ptr = s->buf; | 132 s->buf_ptr = s->buf; |
| 133 break; | 133 break; |
| 134 case CODEC_ID_H264: |
| 135 /* check for H.264 MP4 syntax */ |
| 136 if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) { |
| 137 s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1; |
| 138 } |
| 139 break; |
| 134 case CODEC_ID_AMR_NB: | 140 case CODEC_ID_AMR_NB: |
| 135 case CODEC_ID_AMR_WB: | 141 case CODEC_ID_AMR_WB: |
| 136 if (!s->max_frames_per_packet) | 142 if (!s->max_frames_per_packet) |
| 137 s->max_frames_per_packet = 12; | 143 s->max_frames_per_packet = 12; |
| 138 if (st->codec->codec_id == CODEC_ID_AMR_NB) | 144 if (st->codec->codec_id == CODEC_ID_AMR_NB) |
| 139 n = 31; | 145 n = 31; |
| 140 else | 146 else |
| 141 n = 61; | 147 n = 61; |
| 142 /* max_header_toc_size + the largest AMR payload must fit */ | 148 /* max_header_toc_size + the largest AMR payload must fit */ |
| 143 if (1 + s->max_frames_per_packet + n > s->max_payload_size) { | 149 if (1 + s->max_frames_per_packet + n > s->max_payload_size) { |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 NULL_IF_CONFIG_SMALL("RTP output format"), | 417 NULL_IF_CONFIG_SMALL("RTP output format"), |
| 412 NULL, | 418 NULL, |
| 413 NULL, | 419 NULL, |
| 414 sizeof(RTPMuxContext), | 420 sizeof(RTPMuxContext), |
| 415 CODEC_ID_PCM_MULAW, | 421 CODEC_ID_PCM_MULAW, |
| 416 CODEC_ID_NONE, | 422 CODEC_ID_NONE, |
| 417 rtp_write_header, | 423 rtp_write_header, |
| 418 rtp_write_packet, | 424 rtp_write_packet, |
| 419 rtp_write_trailer, | 425 rtp_write_trailer, |
| 420 }; | 426 }; |
| OLD | NEW |