From f17063a593c39bfd4ce4511b1f6774722d97e412 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 23 Apr 2008 23:26:46 +0000 Subject: [PATCH] Windows AC3, live tv banner icon w/s --- channel.cc | 24 +++++++++++++- channel.h | 5 +++ command.cc | 6 ++-- demuxer.cc | 13 ++++---- demuxer.h | 2 +- demuxeraudio.cc | 2 +- demuxeraudio.h | 2 +- demuxerts.cc | 36 +++++++++++++++++++-- demuxerts.h | 3 +- player.cc | 6 ++-- player.h | 2 +- playerlive.h | 2 +- playerliveradio.cc | 6 ++-- playerliveradio.h | 2 +- playerlivetv.cc | 21 +++++++++--- playerlivetv.h | 3 +- playerradio.cc | 2 +- threadwin.h | 5 +-- vaudioselector.cc | 21 +++++++++--- vdr.cc | 21 ++++++++++++ videowin.cc | 2 +- vvideolive.cc | 2 +- vvideolivetv.cc | 23 ++++++++++++- vvideolivetv.h | 2 ++ vvideorec.cc | 2 +- wsymbol.cc | 80 ++++++++++++++++++++++++++++++++++++++++++++-- wsymbol.h | 4 ++- 27 files changed, 254 insertions(+), 45 deletions(-) diff --git a/channel.cc b/channel.cc index 9e98ef0..d4367b5 100644 --- a/channel.cc +++ b/channel.cc @@ -31,7 +31,11 @@ Channel::Channel() index = -1; vpid = 0; + tpid = 0; numAPids = 0; + numDPids = 0; + numSPids = 0; + } Channel::~Channel() @@ -40,6 +44,8 @@ Channel::~Channel() index = -1; // just in case for(ULONG i = 0; i < numAPids; i++) delete[] apids[i].name; + for(ULONG i = 0; i < numDPids; i++) delete[] dpids[i].name; + for(ULONG i = 0; i < numSPids; i++) delete[] spids[i].name; } void Channel::loadPids() @@ -49,15 +55,31 @@ void Channel::loadPids() { for(ULONG i = 0; i < numAPids; i++) delete[] apids[i].name; apids.clear(); + for(ULONG i = 0; i < numDPids; i++) delete[] dpids[i].name; + dpids.clear(); + for(ULONG i = 0; i < numSPids; i++) delete[] spids[i].name; + spids.clear(); vpid = 0; + tpid = 0; numAPids = 0; + numDPids = 0; + numSPids = 0; } VDR::getInstance()->getChannelPids(this); // FIXME sort out this system - Log::getInstance()->log("Channel", Log::DEBUG, "C.%lu loaded, VPid=%lu, numApids=%lu", number, vpid, numAPids); + Log::getInstance()->log("Channel", Log::DEBUG, "C.%lu loaded, VPid=%lu, numApids=%lu, numDpids=%lu, numSpids=%lu TPid=%lu", + number, vpid, numAPids, numDPids, numSPids, tpid); for (ULONG i = 0; i < numAPids; i++) { Log::getInstance()->log("Channel", Log::DEBUG, "APid %lu %s", apids[i].pid, apids[i].name); } + for (ULONG i = 0; i < numDPids; i++) + { + Log::getInstance()->log("Channel", Log::DEBUG, "DPid %lu %s", dpids[i].pid, dpids[i].name); + } + for (ULONG i = 0; i < numSPids; i++) + { + Log::getInstance()->log("Channel", Log::DEBUG, "SPid %lu %s", spids[i].pid, spids[i].name); + } } diff --git a/channel.h b/channel.h index d830bb2..a813470 100644 --- a/channel.h +++ b/channel.h @@ -54,6 +54,11 @@ class Channel ULONG vpid; ULONG numAPids; APidList apids; + ULONG numDPids; + APidList dpids; + ULONG numSPids; + APidList spids; + ULONG tpid; }; #endif diff --git a/command.cc b/command.cc index e034e54..6710e94 100644 --- a/command.cc +++ b/command.cc @@ -886,14 +886,16 @@ void Command::doJustConnected(VConnect* vconnect) boxstack->update(vw); // Enter pre-keys here -// handleCommand(Remote::THREE); +// handleCommand(Remote::OK); +// handleCommand(Remote::ONE); +// handleCommand(Remote::ZERO); +// handleCommand(Remote::OK); // handleCommand(Remote::UP); // handleCommand(Remote::PLAY); // handleCommand(Remote::DOWN); // handleCommand(Remote::DOWN); // handleCommand(Remote::DOWN); // handleCommand(Remote::OK); -// handleCommand(Remote::OK); // handleCommand(Remote::RED); } } diff --git a/demuxer.cc b/demuxer.cc index 799ec70..cdf9cac 100644 --- a/demuxer.cc +++ b/demuxer.cc @@ -42,19 +42,20 @@ PESPacket::PESPacket() init(0); } -void PESPacket::init(UCHAR type) +void PESPacket::init(UCHAR type, UCHAR sub) { - length = 0; size = 6; + length = 0; + size = 6; data[3] = type; data[4] = data[5] = 0; packetType = type; - substream = 0; + substream = sub; seq_header = 1; // Unknown seq_header status } void PESPacket::truncate() { - init(packetType); + init(packetType,substream); } int PESPacket::write(UCHAR *buf, int len) @@ -341,7 +342,7 @@ void Demuxer::parsePacketDetails(PESPacket& packet) unsigned char substream_id = packet[payload_begin]; unsigned char substream_type = substream_id & 0xF0; unsigned char substream_index = substream_id & 0x1F; -pre_1_3_19_Recording: //This is for old recordings stuff +pre_1_3_19_Recording: //This is for old recordings stuff and live TV if (ispre_1_3_19) { substream_id = PESTYPE_PRIVATE_1; @@ -380,7 +381,7 @@ pre_1_3_19_Recording: //This is for old recordings stuff default: if (!ispre_1_3_19) { - ispre_1_3_19=true; //switching to compat mode + ispre_1_3_19=true; //switching to compat mode and live tv mode goto pre_1_3_19_Recording; } else diff --git a/demuxer.h b/demuxer.h index 14aa6ce..cda9853 100644 --- a/demuxer.h +++ b/demuxer.h @@ -40,7 +40,7 @@ class PESPacket { public: PESPacket(); - void init(UCHAR type); + void init(UCHAR type, UCHAR sub=0); void truncate(); int write(UCHAR* buf, int len); diff --git a/demuxeraudio.cc b/demuxeraudio.cc index 545a019..f3d8bae 100644 --- a/demuxeraudio.cc +++ b/demuxeraudio.cc @@ -164,7 +164,7 @@ void DemuxerAudio::setVID(int p_vID) { } -void DemuxerAudio::setAID(int p_aID) +void DemuxerAudio::setAID(int p_aID,int type) { } diff --git a/demuxeraudio.h b/demuxeraudio.h index 8e106b8..6a3f985 100644 --- a/demuxeraudio.h +++ b/demuxeraudio.h @@ -53,7 +53,7 @@ class DemuxerAudio : public Demuxer virtual int scan(UCHAR* buf, int len); virtual int findPTS(UCHAR* buf, int len, ULLONG* dest); virtual void setVID(int p_vID); - virtual void setAID(int p_aID); + virtual void setAID(int p_aID,int type); virtual int put(UCHAR* buf, int len); //special functions for the audioplayer diff --git a/demuxerts.cc b/demuxerts.cc index eb8431c..2b1acd2 100644 --- a/demuxerts.cc +++ b/demuxerts.cc @@ -25,6 +25,7 @@ DemuxerTS::DemuxerTS(int p_vID, int p_aID) { vID = p_vID; aID = p_aID; + atype = 0; } void DemuxerTS::flush() @@ -33,14 +34,27 @@ void DemuxerTS::flush() parsed = false; Demuxer::flush(); vPacket.init(PESTYPE_VID0); - aPacket.init(PESTYPE_AUD0); + switch (atype) { + case 1: + aPacket.init(PESTYPE_PRIVATE_1,PESTYPE_SUBSTREAM_AC30);break; + default: + case 0: + aPacket.init(PESTYPE_AUD0);break; + }; vActive = false; aActive = false; } int DemuxerTS::scan(UCHAR *buf, int len) { + switch (atype) { + case 1: + return PESTYPE_PRIVATE_1; + default: + case 0: return PESTYPE_AUD0; + }; + } void DemuxerTS::setVID(int p_vID) @@ -50,10 +64,20 @@ void DemuxerTS::setVID(int p_vID) vActive = false; } -void DemuxerTS::setAID(int p_aID) +void DemuxerTS::setAID(int p_aID, int type) { aID = p_aID; + atype = type; + switch (atype) { + case 1: + aPacket.init(PESTYPE_PRIVATE_1,PESTYPE_SUBSTREAM_AC30); + setAudioStream(PESTYPE_SUBSTREAM_AC30);break; + default: + case 0: aPacket.init(PESTYPE_AUD0); + setAudioStream(PESTYPE_AUD0); + break; + }; aActive = false; } @@ -222,7 +246,13 @@ int DemuxerTS::processTS(UCHAR* buf) } if (pid == aID) { - aPacket.init(PESTYPE_AUD0); + switch (atype) { + case 1: + aPacket.init(PESTYPE_PRIVATE_1,PESTYPE_SUBSTREAM_AC30);break; + default: + case 0: + aPacket.init(PESTYPE_AUD0);break; + }; buf += 6; datalen -= 6; } } diff --git a/demuxerts.h b/demuxerts.h index ea68e0d..e58ef7b 100644 --- a/demuxerts.h +++ b/demuxerts.h @@ -35,7 +35,7 @@ class DemuxerTS : public Demuxer int scan(UCHAR* buf, int len); int findPTS(UCHAR* buf, int len, ULLONG* dest); void setVID(int p_vID); - void setAID(int p_aID); + void setAID(int p_aID, int type); int getVID() { return vID; } int getAID() { return aID; } int put(UCHAR* buf, int len); @@ -49,6 +49,7 @@ class DemuxerTS : public Demuxer PESPacket vPacket; // Video PES packet under construction PESPacket aPacket; // Audio PES packet under construction int vID, aID; // TS IDs for video/audio + int atype; bool vActive, aActive; // Whether video/audio is actively being captured }; diff --git a/player.cc b/player.cc index 9c84610..3937d20 100644 --- a/player.cc +++ b/player.cc @@ -173,12 +173,12 @@ int Player::getCurrentAudioChannel() return ((DemuxerTS*)demuxer)->getAID(); } -void Player::setAudioChannel(int newChannel) +void Player::setAudioChannel(int newChannel, int type) { if (isRecording) demuxer->setAudioChannel(newChannel); else - ((DemuxerTS*)demuxer)->setAID(newChannel); + ((DemuxerTS*)demuxer)->setAID(newChannel,type); } // ----------------------------------- Externally called events @@ -188,7 +188,7 @@ void Player::play(ULONG Vpid, ULONG Apid) // TS mode DemuxerTS* dts = (DemuxerTS*)demuxer; dts->setVID(Vpid); - dts->setAID(Apid); + dts->setAID(Apid,0); play(); } diff --git a/player.h b/player.h index 0d1ddcc..b2e8844 100644 --- a/player.h +++ b/player.h @@ -57,7 +57,7 @@ class Player : public Thread_TYPE, public Callback void setStartFrame(ULONG frameNum); void setLengthBytes(ULLONG length); void setLengthFrames(ULONG length); - void setAudioChannel(int newChannel); + void setAudioChannel(int newChannel, int type); void play(); // Recording void play(ULONG vpid, ULONG apid); // Live TV diff --git a/playerlive.h b/playerlive.h index 4321c77..88beca2 100644 --- a/playerlive.h +++ b/playerlive.h @@ -46,7 +46,7 @@ class PlayerLive virtual void go(ULONG index)=0; virtual void setChannel(ULONG index)=0; virtual void stop()=0; - virtual void setAudioChannel(int newChannel)=0; + virtual void setAudioChannel(int newChannel,int type)=0; virtual bool* getDemuxerMpegAudioChannels()=0; virtual bool* getDemuxerAc3AudioChannels()=0; diff --git a/playerliveradio.cc b/playerliveradio.cc index f4846a7..cafd539 100644 --- a/playerliveradio.cc +++ b/playerliveradio.cc @@ -103,9 +103,9 @@ int PlayerLiveRadio::getCurrentAudioChannel() return demuxer->getAID(); } -void PlayerLiveRadio::setAudioChannel(int newChannel) +void PlayerLiveRadio::setAudioChannel(int newChannel, int type) { - return demuxer->setAID(newChannel); + return demuxer->setAID(newChannel, type); } // ----------------------------------- Externally called events @@ -357,7 +357,7 @@ void PlayerLiveRadio::threadMethod() if (chan->numAPids > 0) { - demuxer->setAID(chan->apids[0].pid); + demuxer->setAID(chan->apids[0].pid,0); logger->log("PlayerLiveRadio", Log::DEBUG, "Demuxer pids: %u %u", chan->vpid, chan->apids[0].pid); } else diff --git a/playerliveradio.h b/playerliveradio.h index 794d502..97e29fb 100644 --- a/playerliveradio.h +++ b/playerliveradio.h @@ -60,7 +60,7 @@ class PlayerLiveRadio : public PlayerLive, public Thread_TYPE, public Callback, virtual void go(ULONG index); virtual void setChannel(ULONG index); virtual void stop(); - virtual void setAudioChannel(int newChannel); + virtual void setAudioChannel(int newChannel, int type); virtual bool* getDemuxerMpegAudioChannels(); virtual bool* getDemuxerAc3AudioChannels(); diff --git a/playerlivetv.cc b/playerlivetv.cc index 2ac7f4b..9e83595 100644 --- a/playerlivetv.cc +++ b/playerlivetv.cc @@ -109,9 +109,9 @@ int PlayerLiveTV::getCurrentAudioChannel() return demuxer->getAID(); } -void PlayerLiveTV::setAudioChannel(int newChannel) +void PlayerLiveTV::setAudioChannel(int newChannel, int type) { - return demuxer->setAID(newChannel); + return demuxer->setAID(newChannel,type); } // ----------------------------------- Externally called events @@ -524,7 +524,7 @@ void PlayerLiveTV::threadMethod() demuxer->setVID(chan->vpid); if (chan->numAPids > 0) { - demuxer->setAID(chan->apids[0].pid); + demuxer->setAID(chan->apids[0].pid,0); logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer pids: %u %u", chan->vpid, chan->apids[0].pid); } else @@ -551,8 +551,19 @@ void PlayerLiveTV::threadMethod() chunkToDemuxer(); if (state == S_PREBUFFERING) - { - if (++preBufferCount == preBufferAmount) + { + ++preBufferCount; + ULONG percentDone = (ULONG)(preBufferCount / (float)preBufferAmount * 100); + + Message* m = new Message(); + m->from = this; + m->to = messageReceiver; + m->message = Message::PLAYER_EVENT; + m->parameter = PlayerLiveTV::PREBUFFERING; + m->tag = percentDone; + messageQueue->postMessageFromOuterSpace(m); + + if (preBufferCount == preBufferAmount) { switchState(S_PLAY); } diff --git a/playerlivetv.h b/playerlivetv.h index a1321a8..c06a55b 100644 --- a/playerlivetv.h +++ b/playerlivetv.h @@ -62,7 +62,7 @@ class PlayerLiveTV : public PlayerLive, public Thread_TYPE, public Callback, pub virtual void go(ULONG index); virtual void setChannel(ULONG index); virtual void stop(); - virtual void setAudioChannel(int newChannel); + virtual void setAudioChannel(int newChannel,int type); virtual bool* getDemuxerMpegAudioChannels(); virtual bool* getDemuxerAc3AudioChannels(); @@ -81,6 +81,7 @@ class PlayerLiveTV : public PlayerLive, public Thread_TYPE, public Callback, pub const static UCHAR STREAM_END = 3; const static UCHAR ASPECT43 = 4; const static UCHAR ASPECT169 = 5; + const static UCHAR PREBUFFERING = 6; protected: void threadMethod(); diff --git a/playerradio.cc b/playerradio.cc index c86771a..783276b 100644 --- a/playerradio.cc +++ b/playerradio.cc @@ -207,7 +207,7 @@ void PlayerRadio::play(ULONG Apid) { // TS mode DemuxerTS* dts = (DemuxerTS*)demuxer; - dts->setAID(Apid); + dts->setAID(Apid,0/*Radio is always mpeg?*/); play(); } diff --git a/threadwin.h b/threadwin.h index 4fb48f8..9a87fec 100644 --- a/threadwin.h +++ b/threadwin.h @@ -38,10 +38,10 @@ class ThreadWin : public Thread { protected: // Override this method in derived classes + virtual void threadMethod()=0; virtual void threadPostStopCleanup()=0; - - ThreadWin(); + ThreadWin(); ~ThreadWin(); // Methods to use from outside the thread @@ -76,3 +76,4 @@ class ThreadWin : public Thread }; #endif + diff --git a/vaudioselector.cc b/vaudioselector.cc index a12397b..857d10a 100644 --- a/vaudioselector.cc +++ b/vaudioselector.cc @@ -23,6 +23,7 @@ #include "remote.h" #include "colour.h" #include "video.h" +#include "audio.h" #include "boxstack.h" #include "i18n.h" #include "message.h" @@ -213,6 +214,17 @@ VAudioSelector::VAudioSelector(void* tparent, Channel* channel, int currentAudio ac->pestype = channel->apids[i].pid; acl.push_back(ac); } + if (Audio::getInstance()->supportsAc3()) { + for (UINT i = 0; i < channel->numDPids; i++) + { + AudioChannel* ac = new AudioChannel(); + ac->type = 1; + ac->name = new char[strlen(channel->dpids[i].name) + 1]; + strcpy(ac->name, channel->dpids[i].name); + ac->pestype = channel->dpids[i].pid; + acl.push_back(ac); + } + } int audioChannelListSize = acl.size(); @@ -283,7 +295,7 @@ int VAudioSelector::handleCommand(int command) m->from = this; m->to = parent; m->message = Message::AUDIO_CHANGE_CHANNEL; - m->parameter = ((AudioChannel*)sl.getCurrentOptionData())->pestype; + m->parameter = (((AudioChannel*)sl.getCurrentOptionData())->pestype &0xFFFF)|(((AudioChannel*)sl.getCurrentOptionData())->type &0xFF)<<16 ; Command::getInstance()->postMessageNoLock(m); return 2; @@ -300,7 +312,7 @@ int VAudioSelector::handleCommand(int command) m->from = this; m->to = parent; m->message = Message::AUDIO_CHANGE_CHANNEL; - m->parameter = ((AudioChannel*)sl.getCurrentOptionData())->pestype; + m->parameter = (((AudioChannel*)sl.getCurrentOptionData())->pestype &0xFFFF)|(((AudioChannel*)sl.getCurrentOptionData())->type &0xFF)<<16 ; Command::getInstance()->postMessageNoLock(m); return 2; @@ -319,12 +331,13 @@ void VAudioSelector::processMessage(Message* m) { sl.draw(); BoxStack::getInstance()->update(this); - if ((int)lastsel!=sl.getCurrentOption()) { + if ((int)lastsel!=sl.getCurrentOption()) + { Message* m2 = new Message(); m2->from = this; m2->to = parent; m2->message = Message::AUDIO_CHANGE_CHANNEL; - m2->parameter = (((AudioChannel*)sl.getCurrentOptionData())->pestype&0xFF)|(((AudioChannel*)sl.getCurrentOptionData())->type &0xFF)<<8 ; + m2->parameter = (((AudioChannel*)sl.getCurrentOptionData())->pestype &0xFFFF)|(((AudioChannel*)sl.getCurrentOptionData())->type &0xFF)<<16 ; Command::getInstance()->postMessageNoLock(m2); } } diff --git a/vdr.cc b/vdr.cc index ae10df1..1c1fe83 100644 --- a/vdr.cc +++ b/vdr.cc @@ -969,6 +969,27 @@ void VDR::getChannelPids(Channel* channel) channel->apids.push_back(newapid); } + channel->numDPids = vresp->extractULONG(); + + for (ULONG i = 0; i < channel->numDPids; i++) + { + apid newdpid; + newdpid.pid = vresp->extractULONG(); + newdpid.name = vresp->extractString(); + channel->dpids.push_back(newdpid); + } + + channel->numSPids = vresp->extractULONG(); + + for (ULONG i = 0; i < channel->numSPids; i++) + { + apid newspid; + newspid.pid = vresp->extractULONG(); + newspid.name = vresp->extractString(); + channel->spids.push_back(newspid); + } + channel->tpid = vresp->extractULONG(); + delete vresp; return ; diff --git a/videowin.cc b/videowin.cc index c3f8fe3..7834751 100644 --- a/videowin.cc +++ b/videowin.cc @@ -800,7 +800,7 @@ int VideoWin::dsInitVideoFilter() return 1; } #endif - return 1; + return 1; } int VideoWin::setAudioStreamType(UCHAR type) diff --git a/vvideolive.cc b/vvideolive.cc index d7c754c..a353034 100644 --- a/vvideolive.cc +++ b/vvideolive.cc @@ -312,7 +312,7 @@ void VVideoLive::processMessage(Message* m) else if (m->message == Message::AUDIO_CHANGE_CHANNEL) { Log::getInstance()->log("VVideoLive", Log::DEBUG, "Received change audio channel to %i", m->parameter); - ((Player*)player)->setAudioChannel(m->parameter); + ((Player*)player)->setAudioChannel(m->parameter&0xFFFF,(m->parameter&0xFF0000)>>16); } else if (m->message == Message::PLAYER_EVENT) { diff --git a/vvideolivetv.cc b/vvideolivetv.cc index f1bbcbf..8a939e3 100644 --- a/vvideolivetv.cc +++ b/vvideolivetv.cc @@ -206,6 +206,11 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V summaryBlackLine.setSize(summary.getWidth(), 4); summary.add(&summaryBlackLine); + sAspectRatio.setPosition(osd.getWidth() - 90, clock.getY2()+4); + sAspectRatio.nextColour = Colour::YELLOW; + sAspectRatio.setVisible(false); + osd.add(&sAspectRatio); + // FIXME painful Region r1 = summary.getRegionR(); Region r2 = osd.getRegionR(); @@ -831,7 +836,7 @@ void VVideoLiveTV::processMessage(Message* m) else if (m->message == Message::AUDIO_CHANGE_CHANNEL) { Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Received change audio channel to %i", m->parameter); - player->setAudioChannel(m->parameter); + player->setAudioChannel((m->parameter & 0xFFFF),(m->parameter & 0xFF0000)>>16); } else if (m->message == Message::PLAYER_EVENT) { @@ -869,6 +874,12 @@ void VVideoLiveTV::processMessage(Message* m) wss.draw(); BoxStack::getInstance()->update(this, &wssRegion); } + + sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT43; + sAspectRatio.setVisible(true); + osd.draw(); + BoxStack::getInstance()->update(this, osd.getRegion()); + break; } case PlayerLiveTV::ASPECT169: @@ -880,8 +891,18 @@ void VVideoLiveTV::processMessage(Message* m) wss.draw(); BoxStack::getInstance()->update(this, &wssRegion); } + + sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT169; + sAspectRatio.setVisible(true); + osd.draw(); + BoxStack::getInstance()->update(this, osd.getRegion()); + break; } + case PlayerLiveTV::PREBUFFERING: + { + Log::getInstance()->log("VVideoRec", Log::DEBUG, "Prebuffering - %u", m->tag); + } } } } diff --git a/vvideolivetv.h b/vvideolivetv.h index c1c2aab..c814a1f 100644 --- a/vvideolivetv.h +++ b/vvideolivetv.h @@ -32,6 +32,7 @@ #include "wtextbox.h" #include "wselectlist.h" #include "timerreceiver.h" +#include "wsymbol.h" class VChannelList; class Video; @@ -123,6 +124,7 @@ class VVideoLiveTV : public Boxx, public TimerReceiver WTextbox textGreen; WTextbox textYellow; WTextbox textBlue; + WSymbol sAspectRatio; Boxx summary; WTextbox textSummary; diff --git a/vvideorec.cc b/vvideorec.cc index 391a397..cea94c2 100644 --- a/vvideorec.cc +++ b/vvideorec.cc @@ -514,7 +514,7 @@ void VVideoRec::processMessage(Message* m) else if (m->message == Message::AUDIO_CHANGE_CHANNEL) { Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received change audio channel to %i", m->parameter); - player->setAudioChannel(m->parameter); + player->setAudioChannel(m->parameter&0xFFFF,(m->parameter&0xFF0000)>> 16 ); } else if (m->message == Message::CHILD_CLOSE) { diff --git a/wsymbol.cc b/wsymbol.cc index 16f8913..6d12476 100644 --- a/wsymbol.cc +++ b/wsymbol.cc @@ -22,8 +22,8 @@ #include "colour.h" -UCHAR WSymbol::widths[] = { 2, 2, 4, 4, 1, 1, 3, 3, 3, 3, 3, 4, 4, 2, 2, 3, 5, 5, 4, 4, 2, 2}; -UCHAR WSymbol::heights[] = { 8, 8, 12, 12, 24, 4, 18, 18, 18, 18, 18, 30, 30, 16, 16, 18, 18, 18, 16, 16, 8, 8}; +UCHAR WSymbol::widths[] = { 2, 2, 4, 4, 1, 1, 3, 3, 3, 3, 3, 4, 4, 2, 2, 3, 5, 5, 4, 4, 2, 2, 5, 5}; +UCHAR WSymbol::heights[] = { 8, 8, 12, 12, 24, 4, 18, 18, 18, 18, 18, 30, 30, 16, 16, 18, 18, 18, 16, 16, 8, 8, 16, 16}; UCHAR WSymbol::symbols[] = { @@ -836,6 +836,82 @@ UCHAR WSymbol::symbols[] = { 0x03, 0xC0, 0x01, 0x80, +/* +11111111 11111111 11111111 11111111 11111111 +11111111 11111111 11111111 11111111 11111111 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 + +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11000000 01111111 11111111 11111110 00000011 +11111111 11111111 11111111 11111111 11111111 +11111111 11111111 11111111 11111111 11111111 +*/ + +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, + +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xC0, 0x1F, 0xFF, 0xF8, 0x03, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + +/* +11111111 11111111 11111111 11111111 11111111 +11111111 11111111 11111111 11111111 11111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 + +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111110 01111111 11111111 11111110 01111111 +11111111 11111111 11111111 11111111 11111111 +11111111 11111111 11111111 11111111 11111111 +*/ + +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, + +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFE, 0x7F, 0xFF, 0xFE, 0x7F, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + }; WSymbol::WSymbol() diff --git a/wsymbol.h b/wsymbol.h index fdb6fa0..d110802 100644 --- a/wsymbol.h +++ b/wsymbol.h @@ -57,7 +57,9 @@ class WSymbol : public Boxx const static UCHAR FFWD = 19; const static UCHAR SMALLUP = 20; const static UCHAR SMALLDOWN = 21; - + const static UCHAR VIDEOASPECT43 = 22; + const static UCHAR VIDEOASPECT169 = 23; + private: static UCHAR symbols[]; static UCHAR widths[]; -- 2.39.5