Add mapper

Ger rid of static ids for interfaces and replace with something we can
register dynamically
Implement logger.
This commit is contained in:
Wim Taymans 2016-10-07 13:14:32 +02:00
parent a68e5d5124
commit fc4fd1424a
43 changed files with 997 additions and 360 deletions

View file

@ -25,40 +25,38 @@
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
SpaResult spa_ffmpeg_dec_init (SpaHandle *handle);
SpaResult spa_ffmpeg_enc_init (SpaHandle *handle);
SpaResult spa_ffmpeg_dec_init (SpaHandle *handle, const SpaDict *info, const SpaSupport *support, unsigned int n_support);
SpaResult spa_ffmpeg_enc_init (SpaHandle *handle, const SpaDict *info, const SpaSupport *support, unsigned int n_support);
static SpaResult
ffmpeg_dec_init (const SpaHandleFactory *factory,
SpaHandle *handle,
const SpaDict *info,
const SpaSupport **support,
const SpaSupport *support,
unsigned int n_support)
{
if (factory == NULL || handle == NULL)
return SPA_RESULT_INVALID_ARGUMENTS;
return spa_ffmpeg_dec_init (handle);
return spa_ffmpeg_dec_init (handle, info, support, n_support);
}
static SpaResult
ffmpeg_enc_init (const SpaHandleFactory *factory,
SpaHandle *handle,
const SpaDict *info,
const SpaSupport **support,
const SpaSupport *support,
unsigned int n_support)
{
if (factory == NULL || handle == NULL)
return SPA_RESULT_INVALID_ARGUMENTS;
return spa_ffmpeg_enc_init (handle);
return spa_ffmpeg_enc_init (handle, info, support, n_support);
}
static const SpaInterfaceInfo ffmpeg_interfaces[] =
{
{ SPA_INTERFACE_ID_NODE,
SPA_INTERFACE_ID_NODE_NAME,
SPA_INTERFACE_ID_NODE_DESCRIPTION,
{ SPA_NODE_URI,
},
};