Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2f21294

Browse files
authored
Merge pull request#280 from avTranscoder/support_ffmpeg_3_1
PixelProperties: replace deprecated flags
2 parents6b535b3 +5311d7c commit2f21294

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎src/AvTranscoder/properties/PixelProperties.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ EComponentType PixelProperties::getColorComponents() const
101101
{
102102
return eComponentGray;
103103
}
104-
elseif(_pixelDesc->flags &PIX_FMT_PAL || _pixelDesc->flags &PIX_FMT_RGB)
104+
elseif(_pixelDesc->flags &AV_PIX_FMT_FLAG_PAL || _pixelDesc->flags &AV_PIX_FMT_FLAG_RGB)
105105
{
106106
return eComponentRgb;
107107
}
@@ -154,7 +154,7 @@ bool PixelProperties::isBigEndian() const
154154
{
155155
if(!_pixelDesc)
156156
throwstd::runtime_error("unable to find pixel description.");
157-
return (_pixelDesc->flags &PIX_FMT_BE) ==PIX_FMT_BE;
157+
return (_pixelDesc->flags &AV_PIX_FMT_FLAG_BE) ==AV_PIX_FMT_FLAG_BE;
158158
}
159159

160160
boolPixelProperties::hasAlpha()const
@@ -163,7 +163,7 @@ bool PixelProperties::hasAlpha() const
163163
throwstd::runtime_error("unable to find pixel description.");
164164

165165
#if LIBAVCODEC_VERSION_MAJOR > 53
166-
return (_pixelDesc->flags &PIX_FMT_ALPHA) ==PIX_FMT_ALPHA;
166+
return (_pixelDesc->flags &AV_PIX_FMT_FLAG_ALPHA) ==AV_PIX_FMT_FLAG_ALPHA;
167167
#else
168168
returnfalse;
169169
#endif
@@ -173,35 +173,35 @@ bool PixelProperties::isPlanar() const
173173
{
174174
if(!_pixelDesc)
175175
throwstd::runtime_error("unable to find pixel description.");
176-
return (_pixelDesc->flags &PIX_FMT_PLANAR) ==PIX_FMT_PLANAR;
176+
return (_pixelDesc->flags &AV_PIX_FMT_FLAG_PLANAR) ==AV_PIX_FMT_FLAG_PLANAR;
177177
}
178178

179179
boolPixelProperties::isIndexedColors()const
180180
{
181181
if(!_pixelDesc)
182182
throwstd::runtime_error("unable to find pixel description.");
183-
return (_pixelDesc->flags &PIX_FMT_PAL) ==PIX_FMT_PAL;
183+
return (_pixelDesc->flags &AV_PIX_FMT_FLAG_PAL) ==AV_PIX_FMT_FLAG_PAL;
184184
}
185185

186186
boolPixelProperties::isBitWisePacked()const
187187
{
188188
if(!_pixelDesc)
189189
throwstd::runtime_error("unable to find pixel description.");
190-
return (_pixelDesc->flags &PIX_FMT_BITSTREAM) ==PIX_FMT_BITSTREAM;
190+
return (_pixelDesc->flags &AV_PIX_FMT_FLAG_BITSTREAM) ==AV_PIX_FMT_FLAG_BITSTREAM;
191191
}
192192

193193
boolPixelProperties::isHardwareAccelerated()const
194194
{
195195
if(!_pixelDesc)
196196
throwstd::runtime_error("unable to find pixel description.");
197-
return (_pixelDesc->flags &PIX_FMT_HWACCEL) ==PIX_FMT_HWACCEL;
197+
return (_pixelDesc->flags &AV_PIX_FMT_FLAG_HWACCEL) ==AV_PIX_FMT_FLAG_HWACCEL;
198198
}
199199

200200
boolPixelProperties::isRgbPixelData()const
201201
{
202202
if(!_pixelDesc)
203203
throwstd::runtime_error("unable to find pixel description.");
204-
return (_pixelDesc->flags &PIX_FMT_RGB) ==PIX_FMT_RGB;
204+
return (_pixelDesc->flags &AV_PIX_FMT_FLAG_RGB) ==AV_PIX_FMT_FLAG_RGB;
205205
}
206206

207207
boolPixelProperties::isPseudoPaletted()const
@@ -210,7 +210,7 @@ bool PixelProperties::isPseudoPaletted() const
210210
throwstd::runtime_error("unable to find pixel description.");
211211

212212
#if LIBAVCODEC_VERSION_MAJOR > 53
213-
return (_pixelDesc->flags &PIX_FMT_PSEUDOPAL) ==PIX_FMT_PSEUDOPAL;
213+
return (_pixelDesc->flags &AV_PIX_FMT_FLAG_PSEUDOPAL) ==AV_PIX_FMT_FLAG_PSEUDOPAL;
214214
#else
215215
returnfalse;
216216
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp