Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
d620b1f9
Commit
d620b1f9
authored
Aug 27, 2019
by
Aman Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/v4l2_buffers: split out V4L2Buffer generation into helper method
Signed-off-by:
Aman Gupta
<
aman@tmm1.net
>
parent
2b21bb4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
v4l2_buffers.c
libavcodec/v4l2_buffers.c
+14
-9
No files found.
libavcodec/v4l2_buffers.c
View file @
d620b1f9
...
@@ -322,13 +322,7 @@ static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf)
...
@@ -322,13 +322,7 @@ static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf)
return
0
;
return
0
;
}
}
/******************************************************************************
static
int
v4l2_buffer_swframe_to_buf
(
const
AVFrame
*
frame
,
V4L2Buffer
*
out
)
*
* V4L2Buffer interface
*
******************************************************************************/
int
ff_v4l2_buffer_avframe_to_buf
(
const
AVFrame
*
frame
,
V4L2Buffer
*
out
)
{
{
int
i
,
ret
;
int
i
,
ret
;
struct
v4l2_format
fmt
=
out
->
context
->
format
;
struct
v4l2_format
fmt
=
out
->
context
->
format
;
...
@@ -354,8 +348,6 @@ int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out)
...
@@ -354,8 +348,6 @@ int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out)
is_planar_format
=
1
;
is_planar_format
=
1
;
}
}
v4l2_set_pts
(
out
,
frame
->
pts
);
if
(
!
is_planar_format
)
{
if
(
!
is_planar_format
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
frame
->
format
);
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
frame
->
format
);
int
planes_nb
=
0
;
int
planes_nb
=
0
;
...
@@ -387,6 +379,19 @@ int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out)
...
@@ -387,6 +379,19 @@ int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out)
return
0
;
return
0
;
}
}
/******************************************************************************
*
* V4L2Buffer interface
*
******************************************************************************/
int
ff_v4l2_buffer_avframe_to_buf
(
const
AVFrame
*
frame
,
V4L2Buffer
*
out
)
{
v4l2_set_pts
(
out
,
frame
->
pts
);
return
v4l2_buffer_swframe_to_buf
(
frame
,
out
);
}
int
ff_v4l2_buffer_buf_to_avframe
(
AVFrame
*
frame
,
V4L2Buffer
*
avbuf
)
int
ff_v4l2_buffer_buf_to_avframe
(
AVFrame
*
frame
,
V4L2Buffer
*
avbuf
)
{
{
V4L2m2mContext
*
s
=
buf_to_m2mctx
(
avbuf
);
V4L2m2mContext
*
s
=
buf_to_m2mctx
(
avbuf
);
...
...
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