* 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
for( int y = 0; y < i_height; ++y )
{
const uint8_t *src = (const uint8_t *)frame_bytes + i_stride * y;
for( int y = 0; y < i_height; ++y )
{
const uint8_t *src = (const uint8_t *)frame_bytes + i_stride * y;
memcpy( dst, src, i_width * i_bpp );
}
BMDTimeValue stream_time, frame_duration;
videoFrame->GetStreamTime( &stream_time, &frame_duration, CLOCK_FREQ );
p_video_frame->i_flags = BLOCK_FLAG_TYPE_I | p_sys->i_dominance_flags;
memcpy( dst, src, i_width * i_bpp );
}
BMDTimeValue stream_time, frame_duration;
videoFrame->GetStreamTime( &stream_time, &frame_duration, CLOCK_FREQ );
p_video_frame->i_flags = BLOCK_FLAG_TYPE_I | p_sys->i_dominance_flags;
if( p_sys->p_card->QueryInterface( IID_IDeckLinkInput, (void**)&p_sys->p_input) != S_OK )
{
msg_Err( p_demux, "Card has no inputs" );
if( p_sys->p_card->QueryInterface( IID_IDeckLinkInput, (void**)&p_sys->p_input) != S_OK )
{
msg_Err( p_demux, "Card has no inputs" );
if( p_sys->p_card->QueryInterface( IID_IDeckLinkConfiguration, (void**)&p_config) != S_OK )
{
msg_Err( p_demux, "Failed to get configuration interface" );
if( p_sys->p_card->QueryInterface( IID_IDeckLinkConfiguration, (void**)&p_config) != S_OK )
{
msg_Err( p_demux, "Failed to get configuration interface" );
{
msg_Err( p_demux, "Invalid --decklink-video-connection specified; choose one of " \
"sdi, hdmi, opticalsdi, component, composite, or svideo." );
{
msg_Err( p_demux, "Invalid --decklink-video-connection specified; choose one of " \
"sdi, hdmi, opticalsdi, component, composite, or svideo." );
{
msg_Err( p_demux, "Invalid --decklink-audio-connection specified; choose one of " \
"embedded, aesebu, or analog." );
{
msg_Err( p_demux, "Invalid --decklink-audio-connection specified; choose one of " \
"embedded, aesebu, or analog." );
goto finish;
}
psz_display_mode = var_InheritString( p_demux, "decklink-mode" );
if( !psz_display_mode || strlen( psz_display_mode ) == 0 || strlen( psz_display_mode ) > 4 ) {
msg_Err( p_demux, "Missing or invalid --decklink-mode string" );
goto finish;
}
psz_display_mode = var_InheritString( p_demux, "decklink-mode" );
if( !psz_display_mode || strlen( psz_display_mode ) == 0 || strlen( psz_display_mode ) > 4 ) {
msg_Err( p_demux, "Missing or invalid --decklink-mode string" );
{
msg_Err( p_demux, "Failed to get display mode name" );
p_display_mode->Release();
{
msg_Err( p_demux, "Failed to get display mode name" );
p_display_mode->Release();
{
msg_Err( p_demux, "Failed to get frame rate" );
p_display_mode->Release();
{
msg_Err( p_demux, "Failed to get frame rate" );
p_display_mode->Release();
msg_Err( p_demux, "Unknown video mode specified. " \
"Run VLC with -v --verbose-objects=-all,+decklink " \
"to get a list of supported modes." );
msg_Err( p_demux, "Unknown video mode specified. " \
"Run VLC with -v --verbose-objects=-all,+decklink " \
"to get a list of supported modes." );
{
msg_Err( p_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." );
{
msg_Err( p_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." );
/* Update default_pts to a suitable value for access */
var_Create( p_demux, "decklink-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
/* Update default_pts to a suitable value for access */
var_Create( p_demux, "decklink-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );