[FFmpeg-devel] [PATCH] avcodec/qsv: export session management functionality

nablet developer sdk at nablet.com
Mon Apr 11 14:30:42 CEST 2016


>> 
>> diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
>> index 4c8e6b0..81d1f0c 100644
>> --- a/libavcodec/qsv.c
>> +++ b/libavcodec/qsv.c
>> @@ -18,14 +18,19 @@
>>  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>>  */
>> 
>> -#include <mfx/mfxvideo.h>
>> -#include <mfx/mfxplugin.h>
>> -
>> #include <stdio.h>
>> #include <string.h>
>> 
>> #include "libavutil/avstring.h"
>> #include "libavutil/error.h"
>> +#include "libavutil/log.h"
>> +
>> +#include "qsv.h"
>> +
>> +#if CONFIG_QSV
> 
> conditional compilation belongs in the Makefile


the idea here is to provide API functions for QuickSync initialisation/de-initializtion stuff.
as I understand, ffmpeg API functions must be always present, regardless if QuickSync is available or not.
if QuickSync is not available, then "dummy" functions are provides that do nothing and just return an error.
so, do I right understand that correct approach for it is providing two files : one with actual implementation (qsv.c), and another with dummy implementation (e.g. qsv_dummy.c), and select one of them in makefile?


More information about the ffmpeg-devel mailing list