Merge pull request #4149 from popcornmix/report_licence
authorjmarshallnz <jcmarsha@gmail.com>
Tue, 4 Feb 2014 20:18:49 +0000 (12:18 -0800)
committerjmarshallnz <jcmarsha@gmail.com>
Tue, 4 Feb 2014 20:18:49 +0000 (12:18 -0800)
[rbp] Report in log if MPEG2 and VC1 licences are enabled

system/settings/rbp.xml
xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp
xbmc/cores/AudioEngine/Sinks/AESinkPi.h
xbmc/cores/omxplayer/OMXPlayer.cpp
xbmc/cores/omxplayer/OMXVideo.cpp

index 857a562..b5d5b7b 100644 (file)
           <control type="toggle" />
         </setting>
       </group>
+      <group id="3">
+        <setting id="audiooutput.truehdpassthrough">
+          <visible>false</visible>
+        </setting>
+        <setting id="audiooutput.dtshdpassthrough">
+          <visible>false</visible>
+        </setting>
+      </group>
     </category>
   </section>
 </settings>
index 76e0fa8..fc6a964 100644 (file)
@@ -961,6 +961,7 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
     AEAudioFormat outputFormat;
     if (m_mode == MODE_RAW)
     {
+      inputFormat.m_frames = m_sinkFormat.m_frames;
       outputFormat = inputFormat;
       sinkInputFormat = m_sinkFormat;
     }
@@ -2034,6 +2035,8 @@ void CActiveAE::LoadSettings()
   m_settings.guisoundmode = CSettings::Get().GetInt("audiooutput.guisoundmode");
 
   m_settings.passthrough = m_settings.config == AE_CONFIG_FIXED ? false : CSettings::Get().GetBool("audiooutput.passthrough");
+  if (!m_sink.HasPassthroughDevice())
+    m_settings.passthrough = false;
   m_settings.ac3passthrough = CSettings::Get().GetBool("audiooutput.ac3passthrough");
   m_settings.ac3transcode = CSettings::Get().GetBool("audiooutput.ac3transcode");
   m_settings.eac3passthrough = CSettings::Get().GetBool("audiooutput.eac3passthrough");
index 1b7d67f..99989b3 100644 (file)
@@ -118,7 +118,7 @@ void CActiveAEStream::InitRemapper()
       for(unsigned int j=0; j<m_format.m_channelLayout.Count(); j++)
       {
         idx = m_remapper->GetAVChannelIndex(m_format.m_channelLayout[j], avLayout);
-        if (idx == i)
+        if (idx == (int)i)
         {
           ffmpegLayout += m_format.m_channelLayout[j];
           break;
@@ -134,7 +134,7 @@ void CActiveAEStream::InitRemapper()
       for(unsigned int j=0; j<m_format.m_channelLayout.Count(); j++)
       {
         idx = m_remapper->GetAVChannelIndex(m_format.m_channelLayout[j], avLayout);
-        if (idx == i)
+        if (idx == (int)i)
         {
           remapLayout += ffmpegLayout[j];
           break;
index d8e28ae..54c8ac8 100644 (file)
@@ -66,6 +66,19 @@ void CAESinkPi::SetAudioDest()
 
 bool CAESinkPi::Initialize(AEAudioFormat &format, std::string &device)
 {
+  char response[80];
+  /* if we are raw need to let gpu know */
+  if (AE_IS_RAW(format.m_dataFormat))
+  {
+    vc_gencmd(response, sizeof response, "hdmi_stream_channels 1");
+    m_passthrough = true;
+  }
+  else
+  {
+    vc_gencmd(response, sizeof response, "hdmi_stream_channels 0");
+    m_passthrough = false;
+  }
+
   m_initDevice = device;
   m_initFormat = format;
   // setup for a 50ms sink feed from SoftAE
index e56f3aa..4cca143 100644 (file)
@@ -60,6 +60,7 @@ private:
   uint32_t             m_submitted;
   OMX_AUDIO_PARAM_PCMMODETYPE m_pcm_input;
   COMXCoreComponent    m_omx_render;
+  bool                 m_passthrough;
 };
 
 #endif
index 244024e..58f32d1 100644 (file)
@@ -234,6 +234,10 @@ static bool PredicateAudioPriority(const OMXSelectionStream& lh, const OMXSelect
   PREDICATE_RETURN(lh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream
                  , rh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream);
 
+  // TrueHD never has enough cpu to decode on Pi, so prefer to avoid that
+  PREDICATE_RETURN(lh.codec != "truehd"
+                 , rh.codec != "truehd");
+
   if(!StringUtils::EqualsNoCase(CSettings::Get().GetString("locale.audiolanguage"), "original"))
   {
     CStdString audio_language = g_langInfo.GetAudioLanguage();
@@ -2161,7 +2165,7 @@ void COMXPlayer::CheckAutoSceneSkip()
   || m_CurrentVideo.dts == DVD_NOPTS_VALUE)
     return;
 
-  const int64_t clock = DVD_TIME_TO_MSEC(min(m_CurrentAudio.dts, m_CurrentVideo.dts) + m_offset_pts);
+  const int64_t clock = GetTime();
 
   CEdl::Cut cut;
   if(!m_Edl.InCut(clock, &cut))
index 006cede..e0ea992 100644 (file)
@@ -361,9 +361,6 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE de
   m_submitted_eos = false;
   m_failed_eos    = false;
 
-  if(!m_decoded_width || !m_decoded_height)
-    return false;
-
   if(hints.extrasize > 0 && hints.extradata != NULL)
   {
     m_extrasize = hints.extrasize;