Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
b93e5794
Commit
b93e5794
authored
Apr 10, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v4l2: inline ProcessVideoFrame(), no functional changes
parent
3432a593
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
28 deletions
+4
-28
modules/access/v4l2/video.c
modules/access/v4l2/video.c
+4
-28
No files found.
modules/access/v4l2/video.c
View file @
b93e5794
...
@@ -438,8 +438,6 @@ vlc_module_end ()
...
@@ -438,8 +438,6 @@ vlc_module_end ()
* Access: local prototypes
* Access: local prototypes
*****************************************************************************/
*****************************************************************************/
static
block_t
*
ProcessVideoFrame
(
vlc_object_t
*
p_demux
,
uint8_t
*
p_frame
,
size_t
);
/**
/**
* Parses a V4L2 MRL into VLC object variables.
* Parses a V4L2 MRL into VLC object variables.
*/
*/
...
@@ -1008,10 +1006,11 @@ block_t* GrabVideo (vlc_object_t *demux, demux_sys_t *sys)
...
@@ -1008,10 +1006,11 @@ block_t* GrabVideo (vlc_object_t *demux, demux_sys_t *sys)
return
NULL
;
return
NULL
;
}
}
block_t
*
block
=
ProcessVideoFrame
(
demux
,
sys
->
p_buffers
[
buf
.
index
].
start
,
/* Copy frame */
buf
.
bytesused
);
block_t
*
block
=
block_Alloc
(
buf
.
bytesused
);
if
(
block
==
NULL
)
if
(
unlikely
(
block
==
NULL
)
)
return
NULL
;
return
NULL
;
memcpy
(
block
->
p_buffer
,
sys
->
p_buffers
[
buf
.
index
].
start
,
buf
.
bytesused
);
/* Unlock */
/* Unlock */
if
(
v4l2_ioctl
(
sys
->
i_fd
,
VIDIOC_QBUF
,
&
buf
)
<
0
)
if
(
v4l2_ioctl
(
sys
->
i_fd
,
VIDIOC_QBUF
,
&
buf
)
<
0
)
...
@@ -1023,29 +1022,6 @@ block_t* GrabVideo (vlc_object_t *demux, demux_sys_t *sys)
...
@@ -1023,29 +1022,6 @@ block_t* GrabVideo (vlc_object_t *demux, demux_sys_t *sys)
return
block
;
return
block
;
}
}
/*****************************************************************************
* ProcessVideoFrame: Helper function to take a buffer and copy it into
* a new block
*****************************************************************************/
static
block_t
*
ProcessVideoFrame
(
vlc_object_t
*
p_demux
,
uint8_t
*
p_frame
,
size_t
i_size
)
{
block_t
*
p_block
;
if
(
!
p_frame
)
return
NULL
;
/* New block */
if
(
!
(
p_block
=
block_New
(
p_demux
,
i_size
)
)
)
{
msg_Warn
(
p_demux
,
"Cannot get new block"
);
return
NULL
;
}
/* Copy frame */
memcpy
(
p_block
->
p_buffer
,
p_frame
,
i_size
);
return
p_block
;
}
/*****************************************************************************
/*****************************************************************************
* Helper function to initalise video IO using the mmap method
* Helper function to initalise video IO using the mmap method
*****************************************************************************/
*****************************************************************************/
...
...
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