[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/runtime/phonon/xine
From:       Ian Monroe <ian.monroe () gmail ! com>
Date:       2008-03-15 22:20:27
Message-ID: 1205619627.949782.17273.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 786057 by ianmonroe:

fixing a regression caused when I added multiple-mediaobject support
now it gets the subtitle's language correctly


 M  +7 -7      xinestream.cpp  
 M  +1 -1      xinestream.h  


--- trunk/KDE/kdebase/runtime/phonon/xine/xinestream.cpp #786056:786057
@@ -1287,7 +1287,7 @@
     const int channels = subtitlesSize();
     for( int index = 0; index < channels; index++ )
     {
-        subtitles << streamDescription<SubtitleStreamDescription>( hash + index, \
SubtitleStreamType, xine_get_spu_lang ); +        subtitles << \
streamDescription<SubtitleStreamDescription>( index, hash, SubtitleStreamType, \
xine_get_spu_lang );  }
     return subtitles;
 }
@@ -1301,7 +1301,7 @@
     const int channels = audioChannelsSize();
     for( int index = 0; index < channels; index++ )
     {
-        audios << streamDescription<AudioStreamDescription>( hash + index, \
AudioStreamType, xine_get_audio_lang ); +        audios << \
streamDescription<AudioStreamDescription>( index, hash, AudioStreamType, \
xine_get_audio_lang );  }
     return audios;
 }
@@ -1333,27 +1333,27 @@
 }
 
 template<class S>
-S XineStream::streamDescription(int index, ObjectDescriptionType type, \
int(*get_xine_stream_text)(xine_stream_t *stream, int channel, char *lang)) const +S \
XineStream::streamDescription(int index, uint hash, ObjectDescriptionType type, \
int(*get_xine_stream_text)(xine_stream_t *stream, int channel, char *lang)) const  {
     QByteArray lang;
     lang.resize( 150 );
     get_xine_stream_text( m_stream, index, lang.data() );
     QHash<QByteArray, QVariant> properities;
     properities.insert( "name", QString( lang ) );
-    XineEngine::setObjectDescriptionProperities( type, index, properities );
-    return S( index, properities );
+    XineEngine::setObjectDescriptionProperities( type, index + hash, properities );
+    return S( index + hash, properities );
 }
 
 AudioStreamDescription XineStream::currentAudioStream() const
 {
     const int index = xine_get_param( m_stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL );
-    return streamDescription<AudioStreamDescription>( index + streamHash(), \
AudioStreamType, xine_get_audio_lang ); +    return \
streamDescription<AudioStreamDescription>( index, streamHash(), AudioStreamType, \
xine_get_audio_lang );  }
 
 SubtitleStreamDescription XineStream::currentSubtitleStream() const
 {
     int index = xine_get_param( m_stream, XINE_PARAM_SPU_CHANNEL );
-    return streamDescription<SubtitleStreamDescription>( index + streamHash(), \
SubtitleStreamType, xine_get_spu_lang ); +    return \
streamDescription<SubtitleStreamDescription>( index, streamHash(), \
SubtitleStreamType, xine_get_spu_lang );  }
 
 
--- trunk/KDE/kdebase/runtime/phonon/xine/xinestream.h #786056:786057
@@ -193,7 +193,7 @@
         void internalPlay();
         void setMrlInternal(const QByteArray &newMrl);
         template<class S>
-        S streamDescription(int index, ObjectDescriptionType type, \
int(*get_xine_stream_text)(xine_stream_t *stream, int channel, char *lang)) const; +  \
S streamDescription(int index, uint hash, ObjectDescriptionType type, \
int(*get_xine_stream_text)(xine_stream_t *stream, int channel, char *lang)) const;  \
uint streamHash() const;  
         xine_stream_t *m_stream;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic