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
cdedc9a6
Commit
cdedc9a6
authored
20 years ago
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/access/dshow/dshow.cpp: show tuner properties for MEDIATYPE_Stream as well.
parent
610e4533
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
54 deletions
+73
-54
modules/access/dshow/dshow.cpp
modules/access/dshow/dshow.cpp
+73
-54
No files found.
modules/access/dshow/dshow.cpp
View file @
cdedc9a6
...
...
@@ -378,7 +378,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
if
(
b_access_demux
)
{
/* Let the access (only) take care of that */
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
}
...
...
@@ -392,6 +392,15 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
/* Let the access (only) take care of that */
return
VLC_EGENERIC
;
}
var_Get
(
p_this
,
"dshow-tuner"
,
&
val
);
if
(
val
.
b_bool
)
{
/* FIXME: we do MEDIATYPE_Stream here so we don't do
* it twice. */
ShowTunerProperties
(
p_this
,
p_sys
->
p_capture_graph_builder2
,
p_stream
->
p_device_filter
,
0
);
}
}
}
...
...
@@ -597,7 +606,6 @@ static void CommonClose( vlc_object_t *p_this, access_sys_t *p_sys )
/* Uninitialize OLE/COM */
CoUninitialize
();
/* Remove filters from graph */
for
(
int
i
=
0
;
i
<
p_sys
->
i_streams
;
i
++
)
delete
p_sys
->
pp_streams
[
i
];
if
(
p_sys
->
i_streams
)
free
(
p_sys
->
pp_streams
);
...
...
@@ -952,16 +960,17 @@ static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
p_device_filter
,
b_audio
);
}
ConfigTuner
(
p_this
,
p_sys
->
p_capture_graph_builder2
,
p_device_filter
);
var_Get
(
p_this
,
"dshow-tuner"
,
&
val
);
if
(
val
.
b_bool
)
if
(
val
.
b_bool
&&
dshow_stream
.
mt
.
majortype
!=
MEDIATYPE_Stream
)
{
/* FIXME: we do MEDIATYPE_Stream later so we don't do it twice. */
ShowTunerProperties
(
p_this
,
p_sys
->
p_capture_graph_builder2
,
p_device_filter
,
b_audio
);
}
ConfigTuner
(
p_this
,
p_sys
->
p_capture_graph_builder2
,
p_device_filter
);
dshow_stream
.
mt
=
p_capture_filter
->
CustomGetPin
()
->
CustomGetMediaType
();
...
...
@@ -1662,7 +1671,7 @@ static void ShowPropertyPage( IUnknown *obj )
}
static
void
ShowDeviceProperties
(
vlc_object_t
*
p_this
,
ICaptureGraphBuilder2
*
p_
capture_
graph
,
ICaptureGraphBuilder2
*
p_graph
,
IBaseFilter
*
p_device_filter
,
vlc_bool_t
b_audio
)
{
...
...
@@ -1677,16 +1686,15 @@ static void ShowDeviceProperties( vlc_object_t *p_this,
/*
* Audio capture pin
*/
if
(
p_
capture_
graph
&&
b_audio
)
if
(
p_graph
&&
b_audio
)
{
IAMStreamConfig
*
p_SC
;
msg_Dbg
(
p_this
,
"Showing WDM Audio Configuration Pages"
);
hr
=
p_capture_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Audio
,
p_device_filter
,
IID_IAMStreamConfig
,
(
void
**
)
&
p_SC
);
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Audio
,
p_device_filter
,
IID_IAMStreamConfig
,
(
void
**
)
&
p_SC
);
if
(
SUCCEEDED
(
hr
)
)
{
ShowPropertyPage
(
p_SC
);
...
...
@@ -1697,7 +1705,7 @@ static void ShowDeviceProperties( vlc_object_t *p_this,
* TV Audio filter
*/
IAMTVAudio
*
p_TVA
;
HRESULT
hr
=
p_
capture_
graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
HRESULT
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Audio
,
p_device_filter
,
IID_IAMTVAudio
,
(
void
**
)
&
p_TVA
);
if
(
SUCCEEDED
(
hr
)
)
...
...
@@ -1710,24 +1718,27 @@ static void ShowDeviceProperties( vlc_object_t *p_this,
/*
* Video capture pin
*/
if
(
p_
capture_
graph
&&
!
b_audio
)
if
(
p_graph
&&
!
b_audio
)
{
IAMStreamConfig
*
p_SC
;
msg_Dbg
(
p_this
,
"Showing WDM Video Configuration Pages"
);
hr
=
p_capture_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Interleaved
,
p_device_filter
,
IID_IAMStreamConfig
,
(
void
**
)
&
p_SC
);
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Interleaved
,
p_device_filter
,
IID_IAMStreamConfig
,
(
void
**
)
&
p_SC
);
if
(
FAILED
(
hr
)
)
{
hr
=
p_capture_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Video
,
p_device_filter
,
IID_IAMStreamConfig
,
(
void
**
)
&
p_SC
);
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Video
,
p_device_filter
,
IID_IAMStreamConfig
,
(
void
**
)
&
p_SC
);
}
if
(
FAILED
(
hr
)
)
{
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Stream
,
p_device_filter
,
IID_IAMStreamConfig
,
(
void
**
)
&
p_SC
);
}
if
(
SUCCEEDED
(
hr
)
)
...
...
@@ -1739,39 +1750,41 @@ static void ShowDeviceProperties( vlc_object_t *p_this,
}
static
void
ShowTunerProperties
(
vlc_object_t
*
p_this
,
ICaptureGraphBuilder2
*
p_
capture_
graph
,
ICaptureGraphBuilder2
*
p_graph
,
IBaseFilter
*
p_device_filter
,
vlc_bool_t
b_audio
)
{
HRESULT
hr
;
msg_Dbg
(
p_this
,
"Configuring Tuner Properties"
);
if
(
p_capture_graph
&&
!
b_audio
)
if
(
!
p_graph
||
b_audio
)
return
;
IAMTVTuner
*
p_TV
;
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Interleaved
,
p_device_filter
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
if
(
FAILED
(
hr
)
)
{
IAMTVTuner
*
p_TV
;
hr
=
p_capture_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Interleaved
,
p_device_filter
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
if
(
FAILED
(
hr
)
)
{
hr
=
p_capture_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Video
,
p_device_filter
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
}
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Video
,
p_device_filter
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
}
if
(
SUCCEEDED
(
hr
)
)
{
ShowPropertyPage
(
p_TV
);
p_TV
->
Release
();
}
if
(
FAILED
(
hr
)
)
{
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Stream
,
p_device_filter
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
}
if
(
SUCCEEDED
(
hr
)
)
{
ShowPropertyPage
(
p_TV
);
p_TV
->
Release
();
}
}
static
void
ConfigTuner
(
vlc_object_t
*
p_this
,
ICaptureGraphBuilder2
*
p_capture_graph
,
static
void
ConfigTuner
(
vlc_object_t
*
p_this
,
ICaptureGraphBuilder2
*
p_graph
,
IBaseFilter
*
p_device_filter
)
{
int
i_channel
,
i_country
,
i_input
;
...
...
@@ -1779,7 +1792,7 @@ static void ConfigTuner( vlc_object_t *p_this,
IAMTVTuner
*
p_TV
;
HRESULT
hr
;
if
(
!
p_
capture_
graph
)
return
;
if
(
!
p_graph
)
return
;
i_channel
=
var_GetInteger
(
p_this
,
"dshow-tuner-channel"
);
i_country
=
var_GetInteger
(
p_this
,
"dshow-tuner-country"
);
...
...
@@ -1790,15 +1803,21 @@ static void ConfigTuner( vlc_object_t *p_this,
msg_Dbg
(
p_this
,
"tuner config: channel %i, country %i, input type %i"
,
i_channel
,
i_country
,
i_input
);
hr
=
p_capture_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Interleaved
,
p_device_filter
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Interleaved
,
p_device_filter
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
if
(
FAILED
(
hr
)
)
{
hr
=
p_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Video
,
p_device_filter
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
}
if
(
FAILED
(
hr
)
)
{
hr
=
p_
capture_graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Video
,
p_device_filt
er
,
IID_IAMTVTuner
,
(
void
**
)
&
p_TV
);
hr
=
p_
graph
->
FindInterface
(
&
PIN_CATEGORY_CAPTURE
,
&
MEDIATYPE_Stream
,
p_device_filter
,
IID_IAMTVTun
er
,
(
void
**
)
&
p_TV
);
}
if
(
FAILED
(
hr
)
)
...
...
This diff is collapsed.
Click to expand it.
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