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
fd905df9
Commit
fd905df9
authored
Feb 24, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SDI decklink output: Do not set input options
parent
c6d2ba70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
39 deletions
+3
-39
modules/video_output/decklink.cpp
modules/video_output/decklink.cpp
+3
-39
No files found.
modules/video_output/decklink.cpp
View file @
fd905df9
...
@@ -123,14 +123,6 @@ static const char *const ppsz_videoconns_text[] = {
...
@@ -123,14 +123,6 @@ static const char *const ppsz_videoconns_text[] = {
N_
(
"SDI"
),
N_
(
"HDMI"
),
N_
(
"Optical SDI"
),
N_
(
"Component"
),
N_
(
"Composite"
),
N_
(
"S-video"
)
N_
(
"SDI"
),
N_
(
"HDMI"
),
N_
(
"Optical SDI"
),
N_
(
"Component"
),
N_
(
"Composite"
),
N_
(
"S-video"
)
};
};
static
const
char
*
const
ppsz_audioconns
[]
=
{
"embedded"
,
"aesebu"
,
"analog"
};
static
const
char
*
const
ppsz_audioconns_text
[]
=
{
N_
(
"Embedded"
),
N_
(
"AES/EBU"
),
N_
(
"Analog"
)
};
struct
vout_display_sys_t
struct
vout_display_sys_t
{
{
picture_pool_t
*
pool
;
picture_pool_t
*
pool
;
...
@@ -154,7 +146,6 @@ struct decklink_sys_t
...
@@ -154,7 +146,6 @@ struct decklink_sys_t
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
vlc_cond_t
cond
;
vlc_cond_t
cond
;
uint8_t
users
;
uint8_t
users
;
BMDAudioConnection
aconn
;
//int i_channels;
//int i_channels;
int
i_rate
;
int
i_rate
;
...
@@ -216,9 +207,7 @@ vlc_module_begin()
...
@@ -216,9 +207,7 @@ vlc_module_begin()
set_capability
(
"audio output"
,
0
)
set_capability
(
"audio output"
,
0
)
set_callbacks
(
OpenAudio
,
CloseAudio
)
set_callbacks
(
OpenAudio
,
CloseAudio
)
set_section
(
N_
(
"Decklink Audio Options"
),
NULL
)
set_section
(
N_
(
"Decklink Audio Options"
),
NULL
)
add_string
(
AUDIO_CFG_PREFIX
"audio-connection"
,
"embedded"
,
add_obsolete_string
(
"audio-connection"
)
AUDIO_CONNECTION_TEXT
,
AUDIO_CONNECTION_LONGTEXT
,
true
)
change_string_list
(
ppsz_audioconns
,
ppsz_audioconns_text
)
add_integer
(
AUDIO_CFG_PREFIX
"audio-rate"
,
48000
,
add_integer
(
AUDIO_CFG_PREFIX
"audio-rate"
,
48000
,
RATE_TEXT
,
RATE_LONGTEXT
,
true
)
RATE_TEXT
,
RATE_LONGTEXT
,
true
)
add_integer
(
AUDIO_CFG_PREFIX
"audio-channels"
,
2
,
add_integer
(
AUDIO_CFG_PREFIX
"audio-channels"
,
2
,
...
@@ -243,7 +232,7 @@ static struct decklink_sys_t *GetDLSys(vlc_object_t *obj)
...
@@ -243,7 +232,7 @@ static struct decklink_sys_t *GetDLSys(vlc_object_t *obj)
sys
->
p_output
=
NULL
;
sys
->
p_output
=
NULL
;
sys
->
offset
=
0
;
sys
->
offset
=
0
;
sys
->
users
=
0
;
sys
->
users
=
0
;
sys
->
aconn
=
0
;
sys
->
i_rate
=
-
1
;
vlc_mutex_init
(
&
sys
->
lock
);
vlc_mutex_init
(
&
sys
->
lock
);
vlc_cond_init
(
&
sys
->
cond
);
vlc_cond_init
(
&
sys
->
cond
);
var_Create
(
libvlc
,
"decklink-sys"
,
VLC_VAR_ADDRESS
);
var_Create
(
libvlc
,
"decklink-sys"
,
VLC_VAR_ADDRESS
);
...
@@ -282,25 +271,6 @@ static void ReleaseDLSys(vlc_object_t *obj)
...
@@ -282,25 +271,6 @@ static void ReleaseDLSys(vlc_object_t *obj)
vlc_mutex_unlock
(
&
sys_lock
);
vlc_mutex_unlock
(
&
sys_lock
);
}
}
// Connection mode
static
BMDAudioConnection
getAConn
(
audio_output_t
*
aout
)
{
BMDAudioConnection
conn
=
bmdAudioConnectionEmbedded
;
char
*
psz
=
var_InheritString
(
aout
,
AUDIO_CFG_PREFIX
"audio-connection"
);
if
(
!
psz
)
return
conn
;
if
(
!
strcmp
(
psz
,
"embedded"
))
conn
=
bmdAudioConnectionEmbedded
;
else
if
(
!
strcmp
(
psz
,
"aesebu"
))
conn
=
bmdAudioConnectionAESEBU
;
else
if
(
!
strcmp
(
psz
,
"analog"
))
conn
=
bmdAudioConnectionAnalog
;
free
(
psz
);
return
conn
;
}
static
BMDVideoConnection
getVConn
(
vout_display_t
*
vd
)
static
BMDVideoConnection
getVConn
(
vout_display_t
*
vd
)
{
{
BMDVideoConnection
conn
=
bmdVideoConnectionSDI
;
BMDVideoConnection
conn
=
bmdVideoConnectionSDI
;
...
@@ -353,7 +323,7 @@ static struct decklink_sys_t *OpenDecklink(vout_display_t *vd)
...
@@ -353,7 +323,7 @@ static struct decklink_sys_t *OpenDecklink(vout_display_t *vd)
decklink_sys
->
users
++
;
decklink_sys
->
users
++
;
/* wait until aout is ready */
/* wait until aout is ready */
while
(
decklink_sys
->
aconn
==
0
)
while
(
decklink_sys
->
i_rate
==
-
1
)
vlc_cond_wait
(
&
decklink_sys
->
cond
,
&
decklink_sys
->
lock
);
vlc_cond_wait
(
&
decklink_sys
->
cond
,
&
decklink_sys
->
lock
);
int
i_card_index
=
var_InheritInteger
(
vd
,
CFG_PREFIX
"card-index"
);
int
i_card_index
=
var_InheritInteger
(
vd
,
CFG_PREFIX
"card-index"
);
...
@@ -483,10 +453,6 @@ static struct decklink_sys_t *OpenDecklink(vout_display_t *vd)
...
@@ -483,10 +453,6 @@ static struct decklink_sys_t *OpenDecklink(vout_display_t *vd)
goto
error
;
goto
error
;
}
}
result
=
p_config
->
SetInt
(
bmdDeckLinkConfigAudioInputConnection
,
decklink_sys
->
aconn
);
CHECK
(
"Could not set audio connection"
);
if
(
/*decklink_sys->i_channels > 0 &&*/
decklink_sys
->
i_rate
>
0
)
if
(
/*decklink_sys->i_channels > 0 &&*/
decklink_sys
->
i_rate
>
0
)
{
{
result
=
decklink_sys
->
p_output
->
EnableAudioOutput
(
result
=
decklink_sys
->
p_output
->
EnableAudioOutput
(
...
@@ -892,7 +858,6 @@ static int OpenAudio(vlc_object_t *p_this)
...
@@ -892,7 +858,6 @@ static int OpenAudio(vlc_object_t *p_this)
struct
decklink_sys_t
*
decklink_sys
=
GetDLSys
(
VLC_OBJECT
(
aout
));
struct
decklink_sys_t
*
decklink_sys
=
GetDLSys
(
VLC_OBJECT
(
aout
));
vlc_mutex_lock
(
&
decklink_sys
->
lock
);
vlc_mutex_lock
(
&
decklink_sys
->
lock
);
decklink_sys
->
aconn
=
getAConn
(
aout
);
//decklink_sys->i_channels = var_InheritInteger(vd, AUDIO_CFG_PREFIX "audio-channels");
//decklink_sys->i_channels = var_InheritInteger(vd, AUDIO_CFG_PREFIX "audio-channels");
decklink_sys
->
i_rate
=
var_InheritInteger
(
aout
,
AUDIO_CFG_PREFIX
"audio-rate"
);
decklink_sys
->
i_rate
=
var_InheritInteger
(
aout
,
AUDIO_CFG_PREFIX
"audio-rate"
);
decklink_sys
->
users
++
;
decklink_sys
->
users
++
;
...
@@ -916,7 +881,6 @@ static void CloseAudio(vlc_object_t *p_this)
...
@@ -916,7 +881,6 @@ static void CloseAudio(vlc_object_t *p_this)
{
{
struct
decklink_sys_t
*
decklink_sys
=
GetDLSys
(
p_this
);
struct
decklink_sys_t
*
decklink_sys
=
GetDLSys
(
p_this
);
vlc_mutex_lock
(
&
decklink_sys
->
lock
);
vlc_mutex_lock
(
&
decklink_sys
->
lock
);
decklink_sys
->
aconn
=
0
;
vlc_mutex_unlock
(
&
decklink_sys
->
lock
);
vlc_mutex_unlock
(
&
decklink_sys
->
lock
);
ReleaseDLSys
(
p_this
);
ReleaseDLSys
(
p_this
);
}
}
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