40 public : |
40 public : |
41 AudioDevice(DeviceManager *s, const QByteArray &deviceId); |
41 AudioDevice(DeviceManager *s, const QByteArray &deviceId); |
42 int id; |
42 int id; |
43 QByteArray gstId; |
43 QByteArray gstId; |
44 QByteArray description; |
44 QByteArray description; |
|
45 QString icon; |
45 }; |
46 }; |
46 |
47 |
47 class DeviceManager : public QObject { |
48 class DeviceManager : public QObject { |
48 Q_OBJECT |
49 Q_OBJECT |
49 public: |
50 public: |
50 DeviceManager(Backend *parent); |
51 DeviceManager(Backend *parent); |
51 virtual ~DeviceManager(); |
52 virtual ~DeviceManager(); |
52 const QList<AudioDevice> audioOutputDevices() const; |
53 const QList<AudioDevice> audioOutputDevices() const; |
53 GstPad *requestPad(int device) const; |
54 GstPad *requestPad(int device) const; |
|
55 int allocateDeviceId(); |
54 int deviceId(const QByteArray &gstId) const; |
56 int deviceId(const QByteArray &gstId) const; |
55 QByteArray deviceDescription(int id) const; |
57 const QByteArray gstId(int id); |
|
58 AudioDevice* audioDevice(int id); |
56 GstElement *createGNOMEAudioSink(Category category); |
59 GstElement *createGNOMEAudioSink(Category category); |
57 GstElement *createAudioSink(Category category = NoCategory); |
60 GstElement *createAudioSink(Category category = NoCategory); |
58 AbstractRenderer *createVideoRenderer(VideoWidget *parent); |
61 AbstractRenderer *createVideoRenderer(VideoWidget *parent); |
59 |
62 |
60 signals: |
63 signals: |
66 |
69 |
67 private: |
70 private: |
68 bool canOpenDevice(GstElement *element) const; |
71 bool canOpenDevice(GstElement *element) const; |
69 Backend *m_backend; |
72 Backend *m_backend; |
70 QList <AudioDevice> m_audioDeviceList; |
73 QList <AudioDevice> m_audioDeviceList; |
|
74 int m_audioDeviceCounter; |
71 QTimer m_devicePollTimer; |
75 QTimer m_devicePollTimer; |
72 QByteArray m_audioSink; |
76 QByteArray m_audioSink; |
73 QByteArray m_videoSinkWidget; |
77 QByteArray m_videoSinkWidget; |
74 }; |
78 }; |
75 } |
79 } |