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
01b0eaf8
Commit
01b0eaf8
authored
Jun 06, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Decklink access: set physical channels config
parent
f6c636ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
modules/access/decklink.cpp
modules/access/decklink.cpp
+16
-0
No files found.
modules/access/decklink.cpp
View file @
01b0eaf8
...
@@ -518,6 +518,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -518,6 +518,7 @@ static int Open(vlc_object_t *p_this)
int
ret
=
VLC_EGENERIC
;
int
ret
=
VLC_EGENERIC
;
int
card_index
;
int
card_index
;
int
width
=
0
,
height
,
fps_num
,
fps_den
;
int
width
=
0
,
height
,
fps_num
,
fps_den
;
int
physical_channels
=
0
;
int
rate
;
int
rate
;
unsigned
aspect_num
,
aspect_den
;
unsigned
aspect_num
,
aspect_den
;
...
@@ -650,6 +651,20 @@ static int Open(vlc_object_t *p_this)
...
@@ -650,6 +651,20 @@ static int Open(vlc_object_t *p_this)
/* Set up audio. */
/* Set up audio. */
sys
->
channels
=
var_InheritInteger
(
demux
,
"decklink-audio-channels"
);
sys
->
channels
=
var_InheritInteger
(
demux
,
"decklink-audio-channels"
);
switch
(
sys
->
channels
)
{
case
0
:
break
;
case
2
:
physical_channels
=
AOUT_CHANS_STEREO
;
break
;
case
8
:
physical_channels
=
AOUT_CHANS_7_1
;
break
;
//case 16:
default:
msg_Err
(
demux
,
"Invalid number of channels (%d), disabling audio"
,
sys
->
channels
);
sys
->
channels
=
0
;
}
rate
=
var_InheritInteger
(
demux
,
"decklink-audio-rate"
);
rate
=
var_InheritInteger
(
demux
,
"decklink-audio-rate"
);
if
(
rate
>
0
&&
sys
->
channels
>
0
)
{
if
(
rate
>
0
&&
sys
->
channels
>
0
)
{
if
(
sys
->
input
->
EnableAudioInput
(
rate
,
bmdAudioSampleType16bitInteger
,
sys
->
channels
)
!=
S_OK
)
{
if
(
sys
->
input
->
EnableAudioInput
(
rate
,
bmdAudioSampleType16bitInteger
,
sys
->
channels
)
!=
S_OK
)
{
...
@@ -692,6 +707,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -692,6 +707,7 @@ static int Open(vlc_object_t *p_this)
es_format_t
audio_fmt
;
es_format_t
audio_fmt
;
es_format_Init
(
&
audio_fmt
,
AUDIO_ES
,
VLC_CODEC_S16N
);
es_format_Init
(
&
audio_fmt
,
AUDIO_ES
,
VLC_CODEC_S16N
);
audio_fmt
.
audio
.
i_channels
=
sys
->
channels
;
audio_fmt
.
audio
.
i_channels
=
sys
->
channels
;
audio_fmt
.
audio
.
i_physical_channels
=
physical_channels
;
audio_fmt
.
audio
.
i_rate
=
rate
;
audio_fmt
.
audio
.
i_rate
=
rate
;
audio_fmt
.
audio
.
i_bitspersample
=
16
;
audio_fmt
.
audio
.
i_bitspersample
=
16
;
audio_fmt
.
audio
.
i_blockalign
=
audio_fmt
.
audio
.
i_channels
*
audio_fmt
.
audio
.
i_bitspersample
/
8
;
audio_fmt
.
audio
.
i_blockalign
=
audio_fmt
.
audio
.
i_channels
*
audio_fmt
.
audio
.
i_bitspersample
/
8
;
...
...
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