Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
b2f30144
Commit
b2f30144
authored
Dec 11, 2012
by
Rafaël Carré
Browse files
decklink: simplify callback
parent
3ca4c541
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/access/decklink.cpp
View file @
b2f30144
...
...
@@ -182,8 +182,6 @@ private:
HRESULT
DeckLinkCaptureDelegate
::
VideoInputFrameArrived
(
IDeckLinkVideoInputFrame
*
videoFrame
,
IDeckLinkAudioInputPacket
*
audioFrame
)
{
demux_sys_t
*
sys
=
demux_
->
p_sys
;
block_t
*
video_frame
=
NULL
;
block_t
*
audio_frame
=
NULL
;
if
(
videoFrame
)
{
...
...
@@ -198,11 +196,9 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
const
int
stride
=
videoFrame
->
GetRowBytes
();
const
int
bpp
=
2
;
video_frame
=
block_New
(
demux_
,
width
*
height
*
bpp
);
block_t
*
video_frame
=
block_New
(
demux_
,
width
*
height
*
bpp
);
if
(
!
video_frame
)
{
msg_Err
(
demux_
,
"Could not allocate memory for video frame"
);
}
return
S_OK
;
void
*
frame_bytes
;
videoFrame
->
GetBytes
(
&
frame_bytes
);
...
...
@@ -231,14 +227,9 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
{
const
int
bytes
=
audioFrame
->
GetSampleFrameCount
()
*
sizeof
(
int16_t
)
*
sys
->
channels
;
audio_frame
=
block_New
(
demux_
,
bytes
);
block_t
*
audio_frame
=
block_New
(
demux_
,
bytes
);
if
(
!
audio_frame
)
{
msg_Err
(
demux_
,
"Could not allocate memory for audio frame"
);
if
(
video_frame
)
block_Release
(
video_frame
);
return
S_OK
;
}
void
*
frame_bytes
;
audioFrame
->
GetBytes
(
&
frame_bytes
);
...
...
Write
Preview
Supports
Markdown
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