[FFmpeg-devel] [PATCH] RTMPE support

Howard Chu hyc
Mon Mar 29 00:36:44 CEST 2010


Stefano Sabatini wrote:
> On date Saturday 2010-03-27 00:13:26 -0700, Howard Chu encoded:
>> Howard Chu wrote:
>> +static int64_t rtmp_seek(URLContext * s, int stream_index,
>> +                         int64_t timestamp, int flags)
>> +{
>> +    RTMP *r = s->priv_data;
>> +
>> +    if (flags&  AVSEEK_FLAG_BYTE)
>> +        return AVERROR(ENOTSUP);
>
> As I'm now an expert of error codes, I can say this is not very
> correct:
> http://www.opengroup.org/onlinepubs/000095399/functions/xsh_chap02_03.html
> [ENOTSUP]
>      Not supported. The implementation does not support this feature of the Realtime Option Group.
>
> Please use AVERROR_NOTSUPP instead (but there is still discussion
> about the real meaning of that error code).

By the way, please update the doc in avio.h, it still says to use ENOTSUP:

/**
  * Seek to a given timestamp relative to some component stream.
  * Only meaningful if using a network streaming protocol (e.g. MMS.).
  * @param stream_index The stream index that the timestamp is relative to.
  *        If stream_index is (-1) the timestamp should be in AV_TIME_BASE
  *        units from the beginning of the presentation.
  *        If a stream_index >= 0 is used and the protocol does not support
  *        seeking based on component streams, the call will fail with ENOTSUP.
  * @param timestamp timestamp in AVStream.time_base units
  *        or if there is no stream specified then in AV_TIME_BASE units.
  * @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE
  *        and AVSEEK_FLAG_ANY. The protocol may silently ignore
  *        AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will
  *        fail with ENOTSUP if used and not supported.
  * @return >= 0 on success
  * @see AVInputFormat::read_seek
  */
int64_t av_url_read_seek(URLContext *h, int stream_index,
                          int64_t timestamp, int flags);

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/



More information about the ffmpeg-devel mailing list