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
c6aba4ba
Commit
c6aba4ba
authored
Dec 04, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc1394: factorize.
parent
803dda8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
modules/access/dc1394.c
modules/access/dc1394.c
+9
-9
No files found.
modules/access/dc1394.c
View file @
c6aba4ba
...
@@ -122,21 +122,20 @@ static int process_options( demux_t *p_demux);
...
@@ -122,21 +122,20 @@ static int process_options( demux_t *p_demux);
static
int
FindCamera
(
demux_sys_t
*
sys
,
demux_t
*
p_demux
)
static
int
FindCamera
(
demux_sys_t
*
sys
,
demux_t
*
p_demux
)
{
{
dc1394camera_list_t
*
list
;
dc1394camera_list_t
*
list
;
int
i_ret
=
VLC_EGENERIC
;
msg_Dbg
(
p_demux
,
"Scanning for ieee1394 ports ..."
);
msg_Dbg
(
p_demux
,
"Scanning for ieee1394 ports ..."
);
if
(
dc1394_camera_enumerate
(
sys
->
p_dccontext
,
&
list
)
!=
DC1394_SUCCESS
)
if
(
dc1394_camera_enumerate
(
sys
->
p_dccontext
,
&
list
)
!=
DC1394_SUCCESS
)
{
{
msg_Err
(
p_demux
,
"Can not ennumerate cameras"
);
msg_Err
(
p_demux
,
"Can not ennumerate cameras"
);
dc1394_camera_free_list
(
list
);
goto
end
;
return
VLC_EGENERIC
;
}
}
if
(
list
->
num
==
0
)
if
(
list
->
num
==
0
)
{
{
msg_Err
(
p_demux
,
"Can not find cameras"
);
msg_Err
(
p_demux
,
"Can not find cameras"
);
dc1394_camera_free_list
(
list
);
goto
end
;
return
VLC_EGENERIC
;
}
}
sys
->
num_cameras
=
list
->
num
;
sys
->
num_cameras
=
list
->
num
;
...
@@ -159,16 +158,14 @@ static int FindCamera( demux_sys_t *sys, demux_t *p_demux )
...
@@ -159,16 +158,14 @@ static int FindCamera( demux_sys_t *sys, demux_t *p_demux )
{
{
msg_Err
(
p_demux
,
"Can't find camera with uid : 0x%llx."
,
msg_Err
(
p_demux
,
"Can't find camera with uid : 0x%llx."
,
sys
->
selected_uid
);
sys
->
selected_uid
);
dc1394_camera_free_list
(
list
);
goto
end
;
return
VLC_EGENERIC
;
}
}
}
}
else
if
(
sys
->
selected_camera
>=
(
int
)
list
->
num
)
else
if
(
sys
->
selected_camera
>=
(
int
)
list
->
num
)
{
{
msg_Err
(
p_demux
,
"There are not this many cameras. (%d/%d)"
,
msg_Err
(
p_demux
,
"There are not this many cameras. (%d/%d)"
,
sys
->
selected_camera
,
sys
->
num_cameras
);
sys
->
selected_camera
,
sys
->
num_cameras
);
dc1394_camera_free_list
(
list
);
goto
end
;
return
VLC_EGENERIC
;
}
}
else
if
(
sys
->
selected_camera
>=
0
)
else
if
(
sys
->
selected_camera
>=
0
)
{
{
...
@@ -181,8 +178,11 @@ static int FindCamera( demux_sys_t *sys, demux_t *p_demux )
...
@@ -181,8 +178,11 @@ static int FindCamera( demux_sys_t *sys, demux_t *p_demux )
list
->
ids
[
0
].
guid
);
list
->
ids
[
0
].
guid
);
}
}
i_ret
=
VLC_SUCCESS
;
end:
dc1394_camera_free_list
(
list
);
dc1394_camera_free_list
(
list
);
return
VLC_SUCCESS
;
return
i_ret
;
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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