2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Moved audio to media/media_audio and divided to several modules.

Basic video playback with sound support in mediaview added.
This commit is contained in:
John Preston
2016-07-05 20:44:02 +03:00
parent 98fe307cbf
commit 616d08255c
31 changed files with 1684 additions and 878 deletions

View File

@@ -1241,10 +1241,12 @@ public:
AudioMsgId() {
}
AudioMsgId(DocumentData *audio, const FullMsgId &msgId) : _audio(audio), _contextId(msgId) {
setType();
setTypeFromAudio();
}
AudioMsgId(DocumentData *audio, ChannelId channelId, MsgId msgId) : _audio(audio), _contextId(channelId, msgId) {
setType();
setTypeFromAudio();
}
AudioMsgId(Type type) : _type(type) {
}
Type type() const {
@@ -1262,7 +1264,7 @@ public:
}
private:
void setType() {
void setTypeFromAudio() {
if (_audio->voice()) {
_type = Type::Voice;
} else if (_audio->song()) {