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
2b679297
Commit
2b679297
authored
Aug 28, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dshow: support for devices of the same name (UNTESTED !), closes #519
parent
5f94d9ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
modules/access/dshow/dshow.cpp
modules/access/dshow/dshow.cpp
+29
-3
No files found.
modules/access/dshow/dshow.cpp
View file @
2b679297
...
...
@@ -1055,6 +1055,7 @@ FindCaptureDevice( vlc_object_t *p_this, string *p_devicename,
IMoniker
*
p_moniker
=
NULL
;
ULONG
i_fetched
;
HRESULT
hr
;
list
<
string
>
devicelist
;
/* Create the system device enumerator */
ICreateDevEnum
*
p_dev_enum
=
NULL
;
...
...
@@ -1118,9 +1119,29 @@ FindCaptureDevice( vlc_object_t *p_this, string *p_devicename,
SysFreeString
(
var
.
bstrVal
);
p_buf
[
i_convert
]
=
'\0'
;
if
(
p_listdevices
)
p_listdevices
->
push_back
(
p_buf
);
if
(
p_devicename
&&
*
p_devicename
==
string
(
p_buf
)
)
string
devname
=
string
(
p_buf
);
int
dup
=
0
;
/* find out if this name is already used by a previously found device */
list
<
string
>::
const_iterator
iter
=
devicelist
.
begin
();
list
<
string
>::
const_iterator
end
=
devicelist
.
end
();
while
(
iter
!=
end
)
{
if
(
0
==
(
*
iter
).
compare
(
0
,
devname
.
size
(),
devname
)
)
++
dup
;
++
iter
;
}
if
(
dup
)
{
/* we have a duplicate device name, append a sequence number to name
to provive a unique list back to the user */
char
seq
[
16
];
sprintf
(
seq
,
" #%d"
,
dup
);
devname
.
append
(
seq
);
}
devicelist
.
push_back
(
devname
);
if
(
p_devicename
&&
*
p_devicename
==
devname
)
{
/* Bind Moniker to a filter object */
hr
=
p_moniker
->
BindToObject
(
0
,
0
,
IID_IBaseFilter
,
...
...
@@ -1144,6 +1165,11 @@ FindCaptureDevice( vlc_object_t *p_this, string *p_devicename,
}
p_class_enum
->
Release
();
if
(
p_listdevices
)
{
devicelist
.
sort
();
*
p_listdevices
=
devicelist
;
}
return
NULL
;
}
...
...
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