1 /*****************************************************************************
2 * VLC backend for the Phonon library *
3 * Copyright (C) 2007-2008 Tanguy Krotoff <tkrotoff@gmail.com> *
4 * Copyright (C) 2008 Lukas Durfina <lukas.durfina@gmail.com> *
5 * Copyright (C) 2009 Fathi Boudra <fabo@kde.org> *
7 * This program is free software; you can redistribute it and/or *
8 * modify it under the terms of the GNU Lesser General Public *
9 * License as published by the Free Software Foundation; either *
10 * version 3 of the License, or (at your option) any later version. *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15 * Lesser General Public License for more details. *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with this package; if not, write to the Free Software *
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
20 *****************************************************************************/
22 #ifndef PHONON_VLC_MEDIACONTROLLER_H
23 #define PHONON_VLC_MEDIACONTROLLER_H
25 #include <phonon/addoninterface.h>
26 #include <phonon/objectdescription.h>
33 * Interface for AddonInterface.
35 * This class cannot inherit from QObject has MediaObject already inherit from QObject.
36 * This is a Qt limitation: there is no possibility to inherit virtual Qobject :/
37 * See http://doc.trolltech.com/qq/qq15-academic.html
38 * Phonon implementation got the same problem.
40 * @see VLCMediaController
44 class MediaController : public AddonInterface
49 virtual ~MediaController();
51 bool hasInterface(Interface iface) const;
53 QVariant interfaceCall(Interface iface, int i_command, const QList<QVariant> & arguments = QList<QVariant>());
55 // MediaController signals
56 virtual void availableSubtitlesChanged() = 0;
57 virtual void availableAudioChannelsChanged() = 0;
59 // virtual void availableChaptersChanged() = 0;
60 // virtual void availableTitlesChanged() = 0;
61 virtual void availableChaptersChanged(int) = 0;
62 virtual void availableTitlesChanged(int) = 0;
64 virtual void availableAnglesChanged(int i_available_angles) = 0;
65 virtual void angleChanged(int i_angle_number) = 0;
66 virtual void chapterChanged(int i_chapter_number) = 0;
67 virtual void titleChanged(int i_title_number) = 0;
72 virtual void setCurrentAudioChannel(const Phonon::AudioChannelDescription & audioChannel) = 0;
73 virtual QList<Phonon::AudioChannelDescription> availableAudioChannels() const = 0;
74 virtual Phonon::AudioChannelDescription currentAudioChannel() const = 0;
77 virtual void setCurrentSubtitle(const Phonon::SubtitleDescription & subtitle) = 0;
78 virtual QList<Phonon::SubtitleDescription> availableSubtitles() const = 0;
79 virtual Phonon::SubtitleDescription currentSubtitle() const = 0;
82 virtual void setCurrentAngle(int i_angle_number) = 0;
83 virtual int availableAngles() const = 0;
84 virtual int currentAngle() const = 0;
87 // virtual void setCurrentChapter( const Phonon::ChapterDescription & chapter ) = 0;
88 // virtual QList<Phonon::ChapterDescription> availableChapters() const = 0;
89 // virtual Phonon::ChapterDescription currentChapter() const = 0;
90 virtual void setCurrentChapter(int chapterNumber) = 0;
91 virtual int availableChapters() const = 0;
92 virtual int currentChapter() const = 0;
95 // virtual void setCurrentTitle( const Phonon::TitleDescription & title ) = 0;
96 // virtual QList<Phonon::TitleDescription> availableTitles() const = 0;
97 // virtual Phonon::TitleDescription currentTitle() const = 0;
98 virtual void setCurrentTitle(int titleNumber) = 0;
99 virtual int availableTitles() const = 0;
100 virtual int currentTitle() const = 0;
102 virtual void setAutoplayTitles(bool b_autoplay) = 0;
103 virtual bool autoplayTitles() const = 0;
106 * Clear all (i.e availableSubtitles, availableChapters...).
108 * This is used each time we restart the video.
110 virtual void clearMediaController();
112 Phonon::AudioChannelDescription current_audio_channel;
113 QList<Phonon::AudioChannelDescription> available_audio_channels;
115 Phonon::SubtitleDescription current_subtitle;
116 QList<Phonon::SubtitleDescription> available_subtitles;
118 // Phonon::ChapterDescription current_chapter;
119 // QList<Phonon::ChapterDescription> available_chapters;
121 int available_chapters;
123 // Phonon::TitleDescription current_title;
124 // QList<Phonon::TitleDescription> available_titles;
126 int available_titles;
129 int i_available_angles;
131 bool b_autoplay_titles;
137 } // Namespace Phonon::VLC
139 #endif // PHONON_VLC_MEDIACONTROLLER_H