/*****************************************************************************
* decklink.cpp: BlackMagic DeckLink SDI input module
*****************************************************************************
/*****************************************************************************
* decklink.cpp: BlackMagic DeckLink SDI input module
*****************************************************************************
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
- virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents, IDeckLinkDisplayMode*, BMDDetectedVideoInputFormatFlags);
+ virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents, IDeckLinkDisplayMode*, BMDDetectedVideoInputFormatFlags)
+ {
+ msg_Dbg( p_demux_, "Video input format changed" );
+ return S_OK;
+ }
+
HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame* videoFrame, IDeckLinkAudioInputPacket* audioFrame)
{
demux_sys_t *p_sys = p_demux_->p_sys;
HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame* videoFrame, IDeckLinkAudioInputPacket* audioFrame)
{
demux_sys_t *p_sys = p_demux_->p_sys;
- p_sys->i_width = p_display_mode->GetWidth();
- p_sys->i_height = p_display_mode->GetHeight();
- p_sys->i_fps_num = time_scale;
- p_sys->i_fps_den = frame_duration;
+ i_width = p_display_mode->GetWidth();
+ i_height = p_display_mode->GetHeight();
+ i_fps_num = time_scale;
+ i_fps_den = frame_duration;
- result = p_sys->p_input->EnableAudioInput( p_sys->i_rate, bmdAudioSampleType16bitInteger, p_sys->i_channels );
+ result = p_sys->p_input->EnableAudioInput( i_rate, bmdAudioSampleType16bitInteger, p_sys->i_channels );
/* Declare elementary streams */
es_format_t video_fmt;
es_format_Init( &video_fmt, VIDEO_ES, VLC_CODEC_UYVY );
/* Declare elementary streams */
es_format_t video_fmt;
es_format_Init( &video_fmt, VIDEO_ES, VLC_CODEC_UYVY );
video_fmt.i_bitrate = video_fmt.video.i_width * video_fmt.video.i_height * video_fmt.video.i_frame_rate * 2 * 8;
psz_aspect = var_CreateGetNonEmptyString( p_demux, "decklink-aspect-ratio" );
video_fmt.i_bitrate = video_fmt.video.i_width * video_fmt.video.i_height * video_fmt.video.i_frame_rate * 2 * 8;
psz_aspect = var_CreateGetNonEmptyString( p_demux, "decklink-aspect-ratio" );
es_format_t audio_fmt;
es_format_Init( &audio_fmt, AUDIO_ES, VLC_CODEC_S16N );
audio_fmt.audio.i_channels = p_sys->i_channels;
es_format_t audio_fmt;
es_format_Init( &audio_fmt, AUDIO_ES, VLC_CODEC_S16N );
audio_fmt.audio.i_channels = p_sys->i_channels;
audio_fmt.audio.i_bitspersample = 16;
audio_fmt.audio.i_blockalign = audio_fmt.audio.i_channels * audio_fmt.audio.i_bitspersample / 8;
audio_fmt.i_bitrate = audio_fmt.audio.i_channels * audio_fmt.audio.i_rate * audio_fmt.audio.i_bitspersample;
audio_fmt.audio.i_bitspersample = 16;
audio_fmt.audio.i_blockalign = audio_fmt.audio.i_channels * audio_fmt.audio.i_bitspersample / 8;
audio_fmt.i_bitrate = audio_fmt.audio.i_channels * audio_fmt.audio.i_rate * audio_fmt.audio.i_bitspersample;