[vlc-commits] chromecast: Pass the codec to check codec compatibility
Hugo Beauzée-Luyssen
git at videolan.org
Thu Feb 16 09:54:12 CET 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Feb 15 15:12:53 2017 +0100| [26c2732f8db45646f34ed7605756de4c99e3f197] | committer: Hugo Beauzée-Luyssen
chromecast: Pass the codec to check codec compatibility
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=26c2732f8db45646f34ed7605756de4c99e3f197
---
modules/stream_out/chromecast/cast.cpp | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 89fe911..4e71482 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -57,8 +57,8 @@ struct sout_stream_sys_t
delete p_intf;
}
- bool canDecodeVideo( const es_format_t *p_es ) const;
- bool canDecodeAudio( const es_format_t *p_es ) const;
+ bool canDecodeVideo( int i_codec ) const;
+ bool canDecodeAudio( int i_codec ) const;
sout_stream_t *p_out;
std::string sout;
@@ -196,23 +196,23 @@ static void Del(sout_stream_t *p_stream, sout_stream_id_sys_t *id)
}
-bool sout_stream_sys_t::canDecodeVideo( const es_format_t *p_es ) const
+bool sout_stream_sys_t::canDecodeVideo( int i_codec ) const
{
- if (p_es->i_codec == VLC_CODEC_H264 || p_es->i_codec == VLC_CODEC_VP8)
+ if (i_codec == VLC_CODEC_H264 || i_codec == VLC_CODEC_VP8)
return true;
return false;
}
-bool sout_stream_sys_t::canDecodeAudio( const es_format_t *p_es ) const
+bool sout_stream_sys_t::canDecodeAudio( int i_codec ) const
{
- if (p_es->i_codec == VLC_CODEC_VORBIS ||
- p_es->i_codec == VLC_CODEC_MP4A ||
- p_es->i_codec == VLC_FOURCC('h', 'a', 'a', 'c') ||
- p_es->i_codec == VLC_FOURCC('l', 'a', 'a', 'c') ||
- p_es->i_codec == VLC_FOURCC('s', 'a', 'a', 'c') ||
- p_es->i_codec == VLC_CODEC_MP3 ||
- p_es->i_codec == VLC_CODEC_A52 ||
- p_es->i_codec == VLC_CODEC_EAC3)
+ if (i_codec == VLC_CODEC_VORBIS ||
+ i_codec == VLC_CODEC_MP4A ||
+ i_codec == VLC_FOURCC('h', 'a', 'a', 'c') ||
+ i_codec == VLC_FOURCC('l', 'a', 'a', 'c') ||
+ i_codec == VLC_FOURCC('s', 'a', 'a', 'c') ||
+ i_codec == VLC_CODEC_MP3 ||
+ i_codec == VLC_CODEC_A52 ||
+ i_codec == VLC_CODEC_EAC3)
return true;
return false;
}
@@ -233,7 +233,7 @@ int sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
const es_format_t *p_es = &(*it)->fmt;
if (p_es->i_cat == AUDIO_ES)
{
- if (!canDecodeAudio( p_es ))
+ if (!canDecodeAudio( p_es->i_codec ))
{
msg_Dbg( p_stream, "can't remux audio track %d codec %4.4s", p_es->i_id, (const char*)&p_es->i_codec );
canRemux = false;
@@ -243,7 +243,7 @@ int sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
}
else if (b_has_video && p_es->i_cat == VIDEO_ES)
{
- if (!canDecodeVideo( p_es ))
+ if (!canDecodeVideo( p_es->i_codec ))
{
msg_Dbg( p_stream, "can't remux video track %d codec %4.4s", p_es->i_id, (const char*)&p_es->i_codec );
canRemux = false;
More information about the vlc-commits
mailing list