I can switch audio tracks at the view in movies (mkv, avi) when use these changes.
*** lib/gdi/xineLib.h 2012-03-27 20:51:17.000000000 +0500 --- lib/gdi/xineLib.h.patch 2012-03-27 20:50:32.000000000 +0500 *************** *** 70,75 **** --- 70,78 ---- int VideoGeriT(pts_t Sar); void SeekTo(long long value); /////////////////////// + int getNumberOfTracksAudio(); + void selectAudioStream(int value); + int getCurrentTrackAudio(); Signal1<void, struct iTSMPEGDecoder::videoEvent> m_event; *** lib/gdi/xineLib.cpp 2012-03-27 20:51:26.000000000 +0500 --- lib/gdi/xineLib.cpp.patch 2012-03-27 20:53:17.000000000 +0500 *************** *** 289,294 **** --- 289,318 ---- } } + int cXineLib::getNumberOfTracksAudio() { + int ret = xine_get_stream_info(this->stream, XINE_STREAM_INFO_MAX_AUDIO_CHANNEL); + return ret; + } + + void cXineLib::selectAudioStream(int value) { + xine_set_param(this->stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL, value); + } + + int cXineLib::getCurrentTrackAudio() { + if (getNumberOfTracksAudio()) { + int ret=xine_get_param(this->stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL); + return ret; + } + return 0; + } + void cXineLib::setPrebuffer(int prebuffer) { xine_set_param(stream, XINE_PARAM_METRONOM_PREBUFFER, prebuffer); } *** lib/service/servicemp3.cpp 2012-03-27 20:44:08.000000000 +0500 --- lib/service/servicemp3.cpp.patch 2012-03-27 20:49:04.000000000 +0500 *************** *** 744,755 **** int eServiceMP3::getNumberOfTracks() { ! return 0; } int eServiceMP3::getCurrentTrack() { ! return 0; } RESULT eServiceMP3::selectTrack(unsigned int i) --- 744,766 ---- int eServiceMP3::getNumberOfTracks() { ! cXineLib *xineLib = cXineLib::getInstance(); ! int ret=xineLib->getNumberOfTracksAudio(); ! // printf("Number of tracks - %d\n", ret); ! if (ret) { ! return ret; ! } ! return 0; } int eServiceMP3::getCurrentTrack() { ! cXineLib *xineLib = cXineLib::getInstance(); ! int ret = xineLib->getCurrentTrackAudio(); ! // printf("Current track audio - %d\n", ret); ! ! return ret; ! // return 0; } RESULT eServiceMP3::selectTrack(unsigned int i) *************** *** 763,769 **** int ret = selectAudioStream(i); if (!ret) { /* flush */ ! seekTo(ppos); } return ret; --- 774,780 ---- int ret = selectAudioStream(i); if (!ret) { /* flush */ ! // seekTo(ppos); } return ret; *************** *** 771,777 **** int eServiceMP3::selectAudioStream(int i) { ! return 0; } int eServiceMP3::getCurrentChannel() --- 782,792 ---- int eServiceMP3::selectAudioStream(int i) { ! cXineLib *xineLib = cXineLib::getInstance(); ! xineLib->selectAudioStream(i); ! ! // return 0; ! return i; } int eServiceMP3::getCurrentChannel()
and probably still need to add in function
void cXineLib::FilmVideo(char *mrl)
in file lib/gdi/xineLib.cpp
xine_set_param(this->stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL, -1); videoPlayed = true; }
I hope that as you will be able to help
Regards, Raider05.