Permalink
Browse files

Eliminate ConstFilterInfo_. There is no constructor which means we ne…

…ed to rely on a gcc c++ extension for initialization.

Technically this extension has been incorporated into c++11 but it makes existing non-gcc compilers like icpc unhappy.
  • Loading branch information...
1 parent 05edfd9 commit 6a64891e8d23fd867748bb277c9c80fabc694189 @daniel-kristjansson daniel-kristjansson committed Jun 14, 2012
@@ -312,7 +312,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &newAdjustFilter,
@@ -140,7 +140,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &new_filter,
@@ -300,7 +300,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &new_filter,
@@ -471,7 +471,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &NewDenoise3DFilter,
@@ -226,7 +226,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &FieldorderDeintFilter,
@@ -95,7 +95,7 @@ static FmtConv Fmt_List_ARGB32[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &new_force_yv12,
@@ -273,7 +273,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &GreedyHDeintFilter,
@@ -76,7 +76,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &new_filter,
@@ -249,7 +249,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &NewIvtcFilter,
@@ -661,7 +661,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &NewKernelDeintFilter,
@@ -375,7 +375,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &new_filter,
@@ -94,7 +94,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &new_filter,
@@ -133,7 +133,7 @@ FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &new_filter,
@@ -587,7 +587,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &new_filter,
@@ -720,7 +720,7 @@ static FmtConv FmtList[] =
FMT_NULL
};
-ConstFilterInfo filter_table[] =
+const FilterInfo filter_table[] =
{
{
filter_init: &YadifDeintFilter,
@@ -735,7 +735,8 @@ ConstFilterInfo filter_table[] =
descript: "combines data from several fields to deinterlace with less motion blur",
formats: FmtList,
libname: NULL
- },FILT_NULL
+ },
+ FILT_NULL
};
/* vim: set expandtab tabstop=4 shiftwidth=4: */
@@ -32,15 +32,6 @@ typedef struct FilterInfo_
char *libname;
} FilterInfo;
-typedef struct ConstFilterInfo_
-{
- const init_filter filter_init;
- const char *name;
- const char *descript;
- const FmtConv *formats;
- const char *libname;
-} ConstFilterInfo;
-
struct VideoFilter_
{
int (*filter)(struct VideoFilter_ *, VideoFrame *, int);
@@ -142,8 +142,8 @@ bool FilterManager::LoadFilterLib(const QString &path)
dlhandles[path] = dlhandle;
}
- const ConstFilterInfo *filtInfo = (const ConstFilterInfo*)
- dlsym(dlhandle, "filter_table");
+ const FilterInfo *filtInfo =
+ (const FilterInfo*) dlsym(dlhandle, "filter_table");
if (!filtInfo)
{
@@ -522,8 +522,8 @@ VideoFilter * FilterManager::LoadFilter(const FilterInfo *FiltInfo,
return NULL;
}
- const ConstFilterInfo *filtInfo
- = (const ConstFilterInfo*)dlsym(handle, "filter_table");
+ const FilterInfo *filtInfo =
+ (const FilterInfo*) dlsym(handle, "filter_table");
if (!filtInfo || !filtInfo->filter_init)
{

0 comments on commit 6a64891

Please sign in to comment.