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
d270debb
Commit
d270debb
authored
Dec 11, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decklink: Remove unused result variable
parent
2f6a0414
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
29 deletions
+14
-29
modules/access/decklink.cpp
modules/access/decklink.cpp
+14
-29
No files found.
modules/access/decklink.cpp
View file @
d270debb
...
@@ -360,8 +360,6 @@ static int Open(vlc_object_t *p_this)
...
@@ -360,8 +360,6 @@ static int Open(vlc_object_t *p_this)
goto
finish
;
goto
finish
;
}
}
HRESULT
result
;
card_index
=
var_InheritInteger
(
demux
,
"decklink-card-index"
);
card_index
=
var_InheritInteger
(
demux
,
"decklink-card-index"
);
if
(
card_index
<
0
)
if
(
card_index
<
0
)
{
{
...
@@ -369,25 +367,19 @@ static int Open(vlc_object_t *p_this)
...
@@ -369,25 +367,19 @@ static int Open(vlc_object_t *p_this)
goto
finish
;
goto
finish
;
}
}
for
(
int
i
=
0
;
i
<=
card_index
;
++
i
)
for
(
int
i
=
0
;
i
<=
card_index
;
i
++
)
{
{
if
(
sys
->
card
)
if
(
sys
->
card
)
sys
->
card
->
Release
();
sys
->
card
->
Release
();
result
=
decklink_iterator
->
Next
(
&
sys
->
card
);
if
(
decklink_iterator
->
Next
(
&
sys
->
card
)
!=
S_OK
)
if
(
result
!=
S_OK
)
break
;
}
if
(
result
!=
S_OK
)
{
{
msg_Err
(
demux
,
"DeckLink PCI card %d not found"
,
card_index
);
msg_Err
(
demux
,
"DeckLink PCI card %d not found"
,
card_index
);
goto
finish
;
goto
finish
;
}
}
}
const
char
*
model_name
;
const
char
*
model_name
;
result
=
sys
->
card
->
GetModelName
(
&
model_name
);
if
(
sys
->
card
->
GetModelName
(
&
model_name
)
!=
S_OK
)
if
(
result
!=
S_OK
)
{
{
msg_Err
(
demux
,
"Could not get model name"
);
msg_Err
(
demux
,
"Could not get model name"
);
goto
finish
;
goto
finish
;
...
@@ -412,8 +404,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -412,8 +404,7 @@ static int Open(vlc_object_t *p_this)
goto
finish
;
goto
finish
;
/* Get the list of display modes. */
/* Get the list of display modes. */
result
=
sys
->
input
->
GetDisplayModeIterator
(
&
display_iterator
);
if
(
sys
->
input
->
GetDisplayModeIterator
(
&
display_iterator
)
!=
S_OK
)
if
(
result
!=
S_OK
)
{
{
msg_Err
(
demux
,
"Failed to enumerate display modes"
);
msg_Err
(
demux
,
"Failed to enumerate display modes"
);
goto
finish
;
goto
finish
;
...
@@ -442,8 +433,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -442,8 +433,7 @@ static int Open(vlc_object_t *p_this)
for
(;;)
for
(;;)
{
{
IDeckLinkDisplayMode
*
display_mode
;
IDeckLinkDisplayMode
*
display_mode
;
result
=
display_iterator
->
Next
(
&
display_mode
);
if
((
display_iterator
->
Next
(
&
display_mode
)
!=
S_OK
)
||
!
display_mode
)
if
(
result
!=
S_OK
||
!
display_mode
)
break
;
break
;
char
sz_mode_id_text
[
5
]
=
{
0
};
char
sz_mode_id_text
[
5
]
=
{
0
};
...
@@ -451,8 +441,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -451,8 +441,7 @@ static int Open(vlc_object_t *p_this)
memcpy
(
sz_mode_id_text
,
&
mode_id
,
sizeof
(
mode_id
));
memcpy
(
sz_mode_id_text
,
&
mode_id
,
sizeof
(
mode_id
));
const
char
*
mode_name
;
const
char
*
mode_name
;
result
=
display_mode
->
GetName
(
&
mode_name
);
if
(
display_mode
->
GetName
(
&
mode_name
)
!=
S_OK
)
if
(
result
!=
S_OK
)
{
{
msg_Err
(
demux
,
"Failed to get display mode name"
);
msg_Err
(
demux
,
"Failed to get display mode name"
);
display_mode
->
Release
();
display_mode
->
Release
();
...
@@ -460,8 +449,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -460,8 +449,7 @@ static int Open(vlc_object_t *p_this)
}
}
BMDTimeValue
frame_duration
,
time_scale
;
BMDTimeValue
frame_duration
,
time_scale
;
result
=
display_mode
->
GetFrameRate
(
&
frame_duration
,
&
time_scale
);
if
(
display_mode
->
GetFrameRate
(
&
frame_duration
,
&
time_scale
)
!=
S_OK
)
if
(
result
!=
S_OK
)
{
{
msg_Err
(
demux
,
"Failed to get frame rate"
);
msg_Err
(
demux
,
"Failed to get frame rate"
);
display_mode
->
Release
();
display_mode
->
Release
();
...
@@ -517,8 +505,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -517,8 +505,7 @@ static int Open(vlc_object_t *p_this)
goto
finish
;
goto
finish
;
}
}
result
=
sys
->
input
->
EnableVideoInput
(
htonl
(
wanted_mode_id
),
bmdFormat8BitYUV
,
0
);
if
(
sys
->
input
->
EnableVideoInput
(
htonl
(
wanted_mode_id
),
bmdFormat8BitYUV
,
0
)
!=
S_OK
)
if
(
result
!=
S_OK
)
{
{
msg_Err
(
demux
,
"Failed to enable video input"
);
msg_Err
(
demux
,
"Failed to enable video input"
);
goto
finish
;
goto
finish
;
...
@@ -529,8 +516,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -529,8 +516,7 @@ static int Open(vlc_object_t *p_this)
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
)
{
{
result
=
sys
->
input
->
EnableAudioInput
(
rate
,
bmdAudioSampleType16bitInteger
,
sys
->
channels
);
if
(
sys
->
input
->
EnableAudioInput
(
rate
,
bmdAudioSampleType16bitInteger
,
sys
->
channels
)
!=
S_OK
)
if
(
result
!=
S_OK
)
{
{
msg_Err
(
demux
,
"Failed to enable audio input"
);
msg_Err
(
demux
,
"Failed to enable audio input"
);
goto
finish
;
goto
finish
;
...
@@ -540,8 +526,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -540,8 +526,7 @@ static int Open(vlc_object_t *p_this)
sys
->
delegate
=
new
DeckLinkCaptureDelegate
(
demux
);
sys
->
delegate
=
new
DeckLinkCaptureDelegate
(
demux
);
sys
->
input
->
SetCallback
(
sys
->
delegate
);
sys
->
input
->
SetCallback
(
sys
->
delegate
);
result
=
sys
->
input
->
StartStreams
();
if
(
sys
->
input
->
StartStreams
()
!=
S_OK
)
if
(
result
!=
S_OK
)
{
{
msg_Err
(
demux
,
"Could not start streaming from SDI card. This could be caused "
msg_Err
(
demux
,
"Could not start streaming from SDI card. This could be caused "
"by invalid video mode or flags, access denied, or card already in use."
);
"by invalid video mode or flags, access denied, or card already in use."
);
...
...
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