示例#1
0
文件: format.c 项目: 26mansi/FFmpeg
void av_register_output_format(AVOutputFormat *format)
{
    AVOutputFormat **p = last_oformat;

    format->next = NULL;
    while(*p || avpriv_atomic_ptr_cas((void * volatile *)p, NULL, format))
        p = &(*p)->next;
    last_oformat = &format->next;
}
示例#2
0
文件: device.c 项目: dulton/bvlive
int bv_device_register(BVDevice * dev)
{
	BVDevice **p = last_dev;
	dev->next = NULL;
	while (*p || avpriv_atomic_ptr_cas((void *volatile *) p, NULL, dev))
		p = &(*p)->next;
	last_iformat = &dev->next;

}
示例#3
0
文件: format.c 项目: bas-t/mythtv
void av_register_output_format(AVOutputFormat *format)
{
    AVOutputFormat **p = last_oformat;

    // Note, format could be added after the first 2 checks but that implies that *p is no longer NULL
    while(p != &format->next && !format->next && avpriv_atomic_ptr_cas((void * volatile *)p, NULL, format))
        p = &(*p)->next;

    if (!format->next)
        last_oformat = &format->next;
}
示例#4
0
int avfilter_register(AVFilter *filter)
{
    AVFilter **f = last_filter;

    /* the filter must select generic or internal exclusively */
    av_assert0((filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE) != AVFILTER_FLAG_SUPPORT_TIMELINE);

    filter->next = NULL;

    while(*f || avpriv_atomic_ptr_cas((void * volatile *)f, NULL, filter))
        f = &(*f)->next;
    last_filter = &filter->next;

    return 0;
}
示例#5
0
int avfilter_register(AVFilter *filter)
{
    AVFilter **f = &first_filter;
    int i;

    /* the filter must select generic or internal exclusively */
    av_assert0((filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE) != AVFILTER_FLAG_SUPPORT_TIMELINE);

    for(i=0; filter->inputs && filter->inputs[i].name; i++) {
        const AVFilterPad *input = &filter->inputs[i];
        av_assert0(     !input->filter_frame
                    || (!input->start_frame && !input->end_frame));
    }

    filter->next = NULL;

    while(avpriv_atomic_ptr_cas((void * volatile *)f, NULL, filter))
        f = &(*f)->next;

    return 0;
}
示例#6
0
void av_register_bitstream_filter(AVBitStreamFilter *bsf)
{
  do {
    bsf->next = first_bitstream_filter;
  } while(bsf->next != avpriv_atomic_ptr_cas((void * volatile *)&first_bitstream_filter, bsf->next, bsf));
}
示例#7
0
文件: parser.c 项目: AndreDing/FFmpeg
void av_register_codec_parser(AVCodecParser *parser)
{
    do {
        parser->next = av_first_parser;
    } while (parser->next != avpriv_atomic_ptr_cas((void * volatile *)&av_first_parser, parser->next, parser));
}