[FFmpeg-devel] [PATCH] RTP depacketizer for AMR

Ronald S. Bultje rsbultje
Wed Jan 27 20:59:16 CET 2010


Hi Martin,

On Wed, Jan 27, 2010 at 2:55 PM, Martin Storsj? <martin at martin.st> wrote:
> On Wed, 27 Jan 2010, Ronald S. Bultje wrote:
>> On Wed, Jan 27, 2010 at 7:50 AM, Martin Storsj? <martin at martin.st> wrote:
>> > +static int amr_parse_sdp_line(AVFormatContext *s, int st_index,
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PayloadContext *data, const char *line)
>> [..]
>> > + ? ?if (av_strstart(line, "fmtp:", &p)) {
>> [..]
>> > + ? ? ? ?while (*p && *p == ' ') p++; /* strip spaces */
>> > + ? ? ? ?while (*p && *p != ' ') p++; /* eat protocol identifier */
>> > + ? ? ? ?while (*p && *p == ' ') p++; /* strip trailing spaces */
>> > +
>> > + ? ? ? ?while (rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(value))) {
>> > + ? ? ? ? ? ?if (!strcmp(attr, "octet-align"))
>> > + ? ? ? ? ? ? ? ?octet_align = atoi(value);
>> > + ? ? ? ? ? ?else if (!strcmp(attr, "crc"))
>> > + ? ? ? ? ? ? ? ?crc = atoi(value);
>> > + ? ? ? ? ? ?else if (!strcmp(attr, "interleaving"))
>> > + ? ? ? ? ? ? ? ?interleaving = atoi(value);
>> > + ? ? ? ? ? ?else if (!strcmp(attr, "channels"))
>> > + ? ? ? ? ? ? ? ?channels = atoi(value);
>> > + ? ? ? ?}
>>
>> Can you document what format it's looking for here?
>
> Do you mean what the fmtp line looks like? It's something like this:
>
> a=fmtp:97 octet-align=1; interleaving=0; channels=1
>
> That is, normal semicolon & space separated key/value pairs, as most fmtp
> lines, since it uses the generic parser routine, too.
>
> If this was what you meant, I'll add a comment about it.

Yes please, thanks.

Ronald



More information about the ffmpeg-devel mailing list