Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
1e48de3d
Commit
1e48de3d
authored
May 27, 2013
by
Rafaël Carré
Committed by
Rémi Denis-Courmont
Jun 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg_GetFormat: deindent
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
c4255556
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
33 deletions
+35
-33
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+35
-33
No files found.
modules/codec/avcodec/video.c
View file @
1e48de3d
...
@@ -1114,46 +1114,48 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
...
@@ -1114,46 +1114,48 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
p_dec
->
fmt_in
.
i_level
=
p_context
->
level
;
p_dec
->
fmt_in
.
i_level
=
p_context
->
level
;
p_va
=
vlc_va_New
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
,
&
p_dec
->
fmt_in
);
p_va
=
vlc_va_New
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
,
&
p_dec
->
fmt_in
);
if
(
p_va
!=
NULL
)
if
(
p_va
==
NULL
)
goto
end
;
/* Try too look for a supported hw acceleration */
for
(
size_t
i
=
0
;
pi_fmt
[
i
]
!=
PIX_FMT_NONE
;
i
++
)
{
{
/* Try too look for a supported hw acceleration */
const
char
*
name
=
av_get_pix_fmt_name
(
pi_fmt
[
i
]);
for
(
size_t
i
=
0
;
pi_fmt
[
i
]
!=
PIX_FMT_NONE
;
i
++
)
msg_Dbg
(
p_dec
,
"Available decoder output format %d (%s)"
,
{
pi_fmt
[
i
],
name
?
name
:
"unknown"
);
const
char
*
name
=
av_get_pix_fmt_name
(
pi_fmt
[
i
]);
if
(
p_va
->
pix_fmt
!=
pi_fmt
[
i
]
)
msg_Dbg
(
p_dec
,
"Available decoder output format %d (%s)"
,
continue
;
pi_fmt
[
i
],
name
?
name
:
"unknown"
);
if
(
p_va
->
pix_fmt
!=
pi_fmt
[
i
]
)
continue
;
/* We try to call vlc_va_Setup when possible to detect errors when
* possible (later is too late) */
if
(
p_context
->
width
>
0
&&
p_context
->
height
>
0
&&
vlc_va_Setup
(
p_va
,
&
p_context
->
hwaccel_context
,
&
p_dec
->
fmt_out
.
video
.
i_chroma
,
p_context
->
width
,
p_context
->
height
)
)
{
msg_Err
(
p_dec
,
"acceleration setup failure"
);
break
;
}
if
(
p_va
->
description
)
/* We try to call vlc_va_Setup when possible to detect errors when
msg_Info
(
p_dec
,
"Using %s for hardware decoding."
,
* possible (later is too late) */
p_va
->
description
);
if
(
p_context
->
width
>
0
&&
p_context
->
height
>
0
&&
vlc_va_Setup
(
p_va
,
&
p_context
->
hwaccel_context
,
/* FIXME this will disable direct rendering
&
p_dec
->
fmt_out
.
video
.
i_chroma
,
* even if a new pixel format is renegotiated
p_context
->
width
,
p_context
->
height
)
)
*/
{
p_sys
->
b_direct_rendering
=
false
;
msg_Err
(
p_dec
,
"acceleration setup failure"
);
p_sys
->
p_va
=
p_va
;
break
;
p_context
->
draw_horiz_band
=
NULL
;
return
pi_fmt
[
i
];
}
}
msg_Err
(
p_dec
,
"acceleration not available"
);
if
(
p_va
->
description
)
vlc_va_Delete
(
p_va
);
msg_Info
(
p_dec
,
"Using %s for hardware decoding."
,
p_va
->
description
);
/* FIXME this will disable direct rendering
* even if a new pixel format is renegotiated
*/
p_sys
->
b_direct_rendering
=
false
;
p_sys
->
p_va
=
p_va
;
p_context
->
draw_horiz_band
=
NULL
;
return
pi_fmt
[
i
];
}
}
msg_Err
(
p_dec
,
"acceleration not available"
);
vlc_va_Delete
(
p_va
);
p_sys
->
p_va
=
NULL
;
p_sys
->
p_va
=
NULL
;
end:
/* Fallback to default behaviour */
/* Fallback to default behaviour */
return
avcodec_default_get_format
(
p_context
,
pi_fmt
);
return
avcodec_default_get_format
(
p_context
,
pi_fmt
);
}
}
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