static int h264_dec_get_output_fmt(MSFilter *f, MSPinFormat *fmt) { VTH264DecCtx *ctx = (VTH264DecCtx *)f->data; if(fmt->pin != 0) { ms_error("VideoToolboxEncoder: error while getting format of pin #%d: pin not supported", fmt->pin); return -1; } ms_filter_lock(f); fmt->fmt = ms_factory_get_video_format(f->factory, "YUV420P", ctx->vsize, 0.0f, NULL); ms_filter_unlock(f); return 0; }
static int dec_get_outfmt(MSFilter *f, void *data){ DecData *s = (DecData *)f->data; ((MSPinFormat*)data)->fmt=ms_factory_get_video_format(f->factory,"YUV420P",ms_video_size_make(s->vsize.width,s->vsize.height),0,NULL); return 0; }