Rework formats

Use a POD for the format body. This allows us to more easily build
and copy the formats.
Remove obsolete code to make video and audio formats.
Use SpaVideo/AudioInfo to keep track of formats. Make functions to parse
the format into the structures.
Update plugins
This commit is contained in:
Wim Taymans 2017-02-24 09:28:18 +01:00
parent 7fc73953cd
commit 16b62de53a
34 changed files with 1096 additions and 1579 deletions

View file

@ -141,11 +141,11 @@ drawing_data_init (DrawingData *dd,
SpaVideoTestSrc *this,
char* data)
{
SpaFormatVideo *format = &this->current_format;
SpaVideoInfo *format = &this->current_format;
SpaRectangle *size = &format->info.raw.size;
if (format->format.media_type != SPA_MEDIA_TYPE_VIDEO ||
format->format.media_subtype != SPA_MEDIA_SUBTYPE_RAW)
if ((format->media_type != SPA_MEDIA_TYPE_VIDEO) ||
(format->media_subtype != SPA_MEDIA_SUBTYPE_RAW))
return SPA_RESULT_NOT_IMPLEMENTED;
switch (format->info.raw.format) {