From 074bbc626e30e12df7c6e6560074b4eebf318828 Mon Sep 17 00:00:00 2001 From: Carles Pina i Estany Date: Thu, 1 Feb 2024 21:03:42 +0000 Subject: [PATCH] Quick test to use cvlc instead of mplayer --- configuration/stations.json | 10 +++++----- mainwindow.cpp | 2 +- player.cpp | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/configuration/stations.json b/configuration/stations.json index ca0209a..cb242f5 100644 --- a/configuration/stations.json +++ b/configuration/stations.json @@ -4,12 +4,12 @@ "stream": "http://media-ice.musicradio.com/SmoothUKMP3?amsparams=playerid:UKRP;skey:1513640000;&awparams=kxsegs:||;&kuid=" }, "2": { - "name": "BBC 5 Live", - "stream": "http://stream.live.vc.bbcmedia.co.uk/bbc_radio_five_live" + "name": "Rock FM", + "stream": "https://rockfm-cope.flumotion.com/playlist.m3u8" }, "3": { - "name": "BBC 6 Music", - "stream": "http://stream.live.vc.bbcmedia.co.uk/bbc_6music" + "name": "RAC 105", + "stream": "https://20133.live.streamtheworld.com/RAC105AAC/HLS/playlist.m3u8" }, "4": { "name": "BBC Radio 2", @@ -17,7 +17,7 @@ }, "5": { "name": "RAC 105", - "stream": "http://streaming.rac105.cat" + "stream": "https://20133.live.streamtheworld.com/RAC105AAC/HLS/playlist.m3u8" }, "6": { "name": "RAC1", diff --git a/mainwindow.cpp b/mainwindow.cpp index 950defc..04e6ca7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -99,7 +99,7 @@ void MainWindow::setupInputHandling() int MainWindow::greaterStationNumber() { - QStringList actions = m_actions.numbers().toList(); + QStringList actions = m_actions.numbers().values(); std::sort(actions.begin(), actions.end(), [](QString a, QString b) { return a.toInt() > b.toInt();}); diff --git a/player.cpp b/player.cpp index b6019e6..32f29dc 100644 --- a/player.cpp +++ b/player.cpp @@ -23,8 +23,9 @@ void Player::play(const QString &url) connect(m_player.data(), &QProcess::readyReadStandardOutput, this, &Player::processMplayerOutput); - startAndLog("mplayer", QStringList{"-quiet", url}); - emit song("Loading..."); + // startAndLog("mplayer", QStringList{"-quiet", url}); + startAndLog("cvlc", QStringList{url}); + emit song(""); } QString Player::argumentsToString(const QStringList& arguments)