Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ca23d349
Commit
ca23d349
authored
Mar 23, 2017
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws/tests/pixdesc_query: save every pix fmts in a list
This will be required for the next commit.
parent
e4334971
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
pixdesc_query.c
libswscale/tests/pixdesc_query.c
+15
-4
No files found.
libswscale/tests/pixdesc_query.c
View file @
ca23d349
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
#include "libavutil/mem.h"
#include "libswscale/swscale_internal.h"
#include "libswscale/swscale_internal.h"
static
const
struct
{
static
const
struct
{
...
@@ -45,17 +46,27 @@ static const struct {
...
@@ -45,17 +46,27 @@ static const struct {
int
main
(
void
)
int
main
(
void
)
{
{
int
i
;
int
i
,
j
;
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
query_tab
);
i
++
)
{
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
query_tab
);
i
++
)
{
const
char
**
pix_fmts
=
NULL
;
int
nb_pix_fmts
=
0
;
const
AVPixFmtDescriptor
*
pix_desc
=
NULL
;
const
AVPixFmtDescriptor
*
pix_desc
=
NULL
;
printf
(
"%s:
\n
"
,
query_tab
[
i
].
class
);
while
((
pix_desc
=
av_pix_fmt_desc_next
(
pix_desc
)))
{
while
((
pix_desc
=
av_pix_fmt_desc_next
(
pix_desc
)))
{
enum
AVPixelFormat
pix_fmt
=
av_pix_fmt_desc_get_id
(
pix_desc
);
enum
AVPixelFormat
pix_fmt
=
av_pix_fmt_desc_get_id
(
pix_desc
);
if
(
query_tab
[
i
].
cond
(
pix_fmt
))
if
(
query_tab
[
i
].
cond
(
pix_fmt
))
printf
(
" %s
\n
"
,
pix_desc
->
name
);
av_dynarray_add
(
&
pix_fmts
,
&
nb_pix_fmts
,
(
void
*
)
pix_desc
->
name
);
}
if
(
pix_fmts
)
{
printf
(
"%s:
\n
"
,
query_tab
[
i
].
class
);
for
(
j
=
0
;
j
<
nb_pix_fmts
;
j
++
)
printf
(
" %s
\n
"
,
pix_fmts
[
j
]);
printf
(
"
\n
"
);
free
(
pix_fmts
);
}
}
printf
(
"
\n
"
);
}
}
return
0
;
return
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment