#include <ripping.h>
Public Types | |
enum | statusType { idle, is_starting, is_connecting, is_buffering, is_skipping, is_ripping, is_saving } |
Public Slots | |
void | shutDown () |
virtual void | startStreamripper () |
Signals | |
void | bitrateChanged (qlonglong index, PropertyValue newBitrate) |
void | dataSizeChanged (qlonglong index, PropertyValue newDataSize) |
void | errorChanged (qlonglong index, PropertyValue newError) |
void | metaIntervalChanged (qlonglong index, PropertyValue newMetaInterval) |
void | not_running () |
void | relayPortChanged (qlonglong index, PropertyValue newRelayPort) |
void | running () |
void | serverNameChanged (qlonglong index, PropertyValue newServerName) |
void | songChanged (qlonglong index, PropertyValue newSong) |
void | statusChanged (qlonglong index, PropertyValue newStatus) |
void | streamNameChanged (qlonglong index, PropertyValue newStreamName) |
Public Member Functions | |
ripping (const QPointer< QObject > parent) | |
virtual | ~ripping () |
virtual PropertyValue | bitrate () const |
virtual PropertyValue | dataSize () const |
bool | doesTheUserWantsThatTheStreamIsRipping () |
virtual PropertyValue | error () const |
virtual bool | isRunning () const |
virtual PropertyValue | metaInterval () const |
virtual PropertyValue | relayPort () const |
virtual PropertyValue | serverName () const |
virtual PropertyValue | song () const |
virtual PropertyValue | status () const |
virtual PropertyValue | streamName () const |
Static Public Member Functions | |
static qint64 | default_value_of_bitrate () |
static qint64 | default_value_of_dataSize () |
static QString | default_value_of_error () |
static bool | default_value_of_isRunning () |
static qint64 | default_value_of_metaInterval () |
static qint64 | default_value_of_relayPort () |
static QString | default_value_of_serverName () |
static QString | default_value_of_song () |
static statusType | default_value_of_status () |
static QString | default_value_of_streamName () |
static bool | doesTheUserWantsThatTheStreamIsRipping (const ripping::statusType theStatus) |
static PropertyValue | formatedBitrate (const qint64 theBitrate) |
static PropertyValue | formatedDataSize (const qint64 theDataSize) |
static PropertyValue | formatedError (const QString theError) |
static PropertyValue | formatedMetaInterval (const qint64 theMetaInterval) |
static PropertyValue | formatedRelayPort (const qint64 theRelayPort) |
static PropertyValue | formatedServerName (const QString theServerName) |
static PropertyValue | formatedSong (const QString theSong) |
static PropertyValue | formatedStatus (const statusType theStatus) |
static PropertyValue | formatedStreamName (const QString theStreamName) |
Protected Member Functions | |
virtual void | interpretate_console_output (QStringList &stringList) |
virtual QStringList | parameterList () const |
virtual void | resetStreamripperProperties () |
virtual QString | serverUri () const =0 |
virtual void | setBitrate (const qint64 newBitrate) |
virtual void | setDataSize (const qint64 newDataSize) |
virtual void | setError (const QString newError) |
virtual void | setMetaInterval (const qint64 newMetaInterval) |
virtual void | setRelayPort (const qint64 newRelayPort) |
virtual void | setServerName (const QString newServerName) |
virtual void | setSong (const QString newSong) |
virtual void | setStatus (const statusType newStatus) |
virtual void | setStreamName (const QString newStreamName) |
virtual QString | streamripperCommand () const |
Properties | |
PropertyValue | bitrate |
PropertyValue | dataSize |
PropertyValue | error |
bool | isRunning |
PropertyValue | metaInterval |
PropertyValue | relayPort |
PropertyValue | serverName |
PropertyValue | song |
PropertyValue | status |
PropertyValue | streamName |
Private Slots | |
void | errorOccured (QProcess::ProcessError error) |
void | streamripperStateChange (QProcess::ProcessState newState) |
Private Member Functions | |
void | helper_interpretate_metainfo_and_datasize (QString my_line) |
Private Attributes | |
PropertyValue | internal_bitrate |
PropertyValue | internal_dataSize |
PropertyValue | internal_error |
bool | internal_isRunning |
PropertyValue | internal_metaInterval |
PropertyValue | internal_relayPort |
PropertyValue | internal_serverName |
PropertyValue | internal_song |
PropertyValue | internal_status |
PropertyValue | internal_streamName |
You can use the public slots virtual void startStreamripper()
and void shutDown()
to start and stop streamripper.
This class applies the options available through settings_general when calling streamripper (see virtual QStringList parameterList() const
).
The actual state of the ripping process is available through a number of properties.
You have to implement virtual QString serverUri() const
in inherited classes.
Furthermore this class provides the static functions static QString format_bitrate(long bitrate)
and static QString format_metaInterval(long metaInterval)
.
Definition at line 42 of file ripping.h.
enum ripping::statusType |
This enum can hold the actual status of streamripper.
QProcess::Starting
. QProcess::Running
, but streamripper still hasn't reached the state ripping::is_connecting
.
ripping::ripping | ( | const QPointer< QObject > | parent | ) |
Constructor of the class.
parent | Sets the parent of this object. |
Definition at line 33 of file ripping.cpp.
References error(), errorOccured(), console_reader::internal_splitBehavior, console_reader::m_process, resetStreamripperProperties(), and streamripperStateChange().
ripping::~ripping | ( | ) | [virtual] |
The destructor.
Definition at line 71 of file ripping.cpp.
virtual PropertyValue ripping::bitrate | ( | ) | const [virtual] |
See property bitrate.
Reimplemented in radioStation.
virtual PropertyValue ripping::dataSize | ( | ) | const [virtual] |
See property dataSize.
Referenced by helper_interpretate_metainfo_and_datasize().
bool ripping::doesTheUserWantsThatTheStreamIsRipping | ( | ) |
Performs doesTheUserWantsThatTheStreamIsRipping(const ripping::statusType theStatus) with the status of this object - so it provides a sort of view to the propyerty status.
Definition at line 974 of file ripping.cpp.
References internal_status, and PropertyValue::internalValue.
virtual PropertyValue ripping::error | ( | ) | const [virtual] |
virtual bool ripping::isRunning | ( | ) | const [virtual] |
See property isRunning.
virtual PropertyValue ripping::metaInterval | ( | ) | const [virtual] |
See property metaInterval.
Reimplemented in radioStation.
virtual PropertyValue ripping::relayPort | ( | ) | const [virtual] |
See property relayPort.
virtual PropertyValue ripping::serverName | ( | ) | const [virtual] |
See property serverName.
Reimplemented in radioStation.
virtual PropertyValue ripping::song | ( | ) | const [virtual] |
See property song.
virtual PropertyValue ripping::status | ( | ) | const [virtual] |
See property status.
virtual PropertyValue ripping::streamName | ( | ) | const [virtual] |
See property streamName.
Reimplemented in radioStation.
qint64 ripping::default_value_of_bitrate | ( | ) | [static] |
Definition at line 788 of file ripping.cpp.
Referenced by settings_stream_widget_connection::delete_old_streamInfo_and_start_recognization(), and resetStreamripperProperties().
qint64 ripping::default_value_of_dataSize | ( | ) | [static] |
Definition at line 658 of file ripping.cpp.
Referenced by interpretate_console_output(), resetStreamripperProperties(), and streamripperStateChange().
QString ripping::default_value_of_error | ( | ) | [static] |
Definition at line 565 of file ripping.cpp.
Referenced by resetStreamripperProperties().
bool ripping::default_value_of_isRunning | ( | ) | [static] |
qint64 ripping::default_value_of_metaInterval | ( | ) | [static] |
Definition at line 834 of file ripping.cpp.
Referenced by settings_stream_widget_connection::delete_old_streamInfo_and_start_recognization(), and resetStreamripperProperties().
qint64 ripping::default_value_of_relayPort | ( | ) | [static] |
Definition at line 720 of file ripping.cpp.
Referenced by resetStreamripperProperties(), and streamripperStateChange().
QString ripping::default_value_of_serverName | ( | ) | [static] |
Definition at line 371 of file ripping.cpp.
Referenced by settings_stream_widget_connection::delete_old_streamInfo_and_start_recognization(), and resetStreamripperProperties().
QString ripping::default_value_of_song | ( | ) | [static] |
Definition at line 601 of file ripping.cpp.
Referenced by interpretate_console_output(), resetStreamripperProperties(), and streamripperStateChange().
ripping::statusType ripping::default_value_of_status | ( | ) | [static] |
Definition at line 464 of file ripping.cpp.
References idle.
Referenced by resetStreamripperProperties(), and streamripperStateChange().
QString ripping::default_value_of_streamName | ( | ) | [static] |
Definition at line 335 of file ripping.cpp.
Referenced by settings_stream_widget_connection::delete_old_streamInfo_and_start_recognization(), and resetStreamripperProperties().
bool ripping::doesTheUserWantsThatTheStreamIsRipping | ( | const ripping::statusType | theStatus | ) | [static] |
theStatus | the status for which you want to determinate if the user wants to rip the stream or not. |
Definition at line 969 of file ripping.cpp.
PropertyValue ripping::formatedBitrate | ( | const qint64 | theBitrate | ) | [static] |
Definition at line 730 of file ripping.cpp.
References PropertyValue::error, PropertyValue::formatedValue, PropertyValue::formatedValueAlignment, PropertyValue::internalValue, PropertyValue::toolTip, PropertyValue::type, PropertyValue::unset, PropertyValue::value, and PropertyValue::whatsThis.
Referenced by radioStation::bitrate(), settings_stream_widget_connection::change_empty_user_visible_widgets_to__connection_failed(), settings_stream_widget_connection::load_info_from_kcfg_and_start_recognization(), and setBitrate().
PropertyValue ripping::formatedDataSize | ( | const qint64 | theDataSize | ) | [static] |
Definition at line 611 of file ripping.cpp.
References PropertyValue::error, PropertyValue::formatedValue, PropertyValue::formatedValueAlignment, PropertyValue::internalValue, PropertyValue::toolTip, PropertyValue::type, PropertyValue::unset, PropertyValue::value, and PropertyValue::whatsThis.
Referenced by setDataSize().
PropertyValue ripping::formatedError | ( | const QString | theError | ) | [static] |
Definition at line 474 of file ripping.cpp.
References PropertyValue::formatedValue, PropertyValue::internalValue, PropertyValue::toolTip, PropertyValue::type, PropertyValue::unset, PropertyValue::value, and PropertyValue::whatsThis.
Referenced by setError().
PropertyValue ripping::formatedMetaInterval | ( | const qint64 | theMetaInterval | ) | [static] |
Definition at line 798 of file ripping.cpp.
References PropertyValue::error, PropertyValue::formatedValue, PropertyValue::formatedValueAlignment, PropertyValue::internalValue, PropertyValue::type, PropertyValue::unset, and PropertyValue::value.
Referenced by settings_stream_widget_connection::change_empty_user_visible_widgets_to__connection_failed(), settings_stream_widget_connection::load_info_from_kcfg_and_start_recognization(), radioStation::metaInterval(), and setMetaInterval().
PropertyValue ripping::formatedRelayPort | ( | const qint64 | theRelayPort | ) | [static] |
Definition at line 678 of file ripping.cpp.
References PropertyValue::error, PropertyValue::formatedValue, PropertyValue::formatedValueAlignment, PropertyValue::internalValue, PropertyValue::toolTip, PropertyValue::type, PropertyValue::unset, PropertyValue::value, and PropertyValue::whatsThis.
Referenced by setRelayPort().
PropertyValue ripping::formatedServerName | ( | const QString | theServerName | ) | [static] |
Definition at line 340 of file ripping.cpp.
References PropertyValue::formatedValue, PropertyValue::internalValue, PropertyValue::type, PropertyValue::unset, and PropertyValue::value.
Referenced by settings_stream_widget_connection::change_empty_user_visible_widgets_to__connection_failed(), settings_stream_widget_connection::load_info_from_kcfg_and_start_recognization(), radioStation::serverName(), and setServerName().
PropertyValue ripping::formatedSong | ( | const QString | theSong | ) | [static] |
Definition at line 575 of file ripping.cpp.
References EQUAL, PropertyValue::formatedValue, PropertyValue::internalValue, OR, PropertyValue::type, PropertyValue::unset, and PropertyValue::value.
Referenced by setSong().
PropertyValue ripping::formatedStatus | ( | const statusType | theStatus | ) | [static] |
Definition at line 381 of file ripping.cpp.
References PropertyValue::formatedValue, idle, PropertyValue::internalValue, is_buffering, is_connecting, is_ripping, is_saving, is_skipping, is_starting, PropertyValue::toolTip, PropertyValue::type, PropertyValue::unset, PropertyValue::value, and PropertyValue::whatsThis.
Referenced by setStatus().
PropertyValue ripping::formatedStreamName | ( | const QString | theStreamName | ) | [static] |
Definition at line 291 of file ripping.cpp.
References PropertyValue::error, PropertyValue::formatedValue, PropertyValue::internalValue, PropertyValue::toolTip, PropertyValue::type, PropertyValue::unset, PropertyValue::value, and PropertyValue::whatsThis.
Referenced by settings_stream_widget_connection::load_info_from_kcfg_and_start_recognization(), setStreamName(), and radioStation::streamName().
void ripping::bitrateChanged | ( | qlonglong | index, | |
PropertyValue | newBitrate | |||
) | [signal] |
See property bitrate.
Referenced by setBitrate().
void ripping::dataSizeChanged | ( | qlonglong | index, | |
PropertyValue | newDataSize | |||
) | [signal] |
See property dataSize.
Referenced by setDataSize().
void ripping::errorChanged | ( | qlonglong | index, | |
PropertyValue | newError | |||
) | [signal] |
See property error.
Referenced by setError().
void ripping::metaIntervalChanged | ( | qlonglong | index, | |
PropertyValue | newMetaInterval | |||
) | [signal] |
See property metaInterval.
Referenced by setMetaInterval().
void ripping::not_running | ( | ) | [signal] |
See property isRunning.
Referenced by setStatus().
void ripping::relayPortChanged | ( | qlonglong | index, | |
PropertyValue | newRelayPort | |||
) | [signal] |
See property relayPort.
Referenced by setRelayPort().
void ripping::running | ( | ) | [signal] |
See property isRunning.
Referenced by setStatus().
void ripping::serverNameChanged | ( | qlonglong | index, | |
PropertyValue | newServerName | |||
) | [signal] |
See property serverName.
Referenced by setServerName().
void ripping::songChanged | ( | qlonglong | index, | |
PropertyValue | newSong | |||
) | [signal] |
void ripping::statusChanged | ( | qlonglong | index, | |
PropertyValue | newStatus | |||
) | [signal] |
See property status.
Referenced by setStatus().
void ripping::streamNameChanged | ( | qlonglong | index, | |
PropertyValue | newStreamName | |||
) | [signal] |
See property streamName.
Referenced by setStreamName().
void ripping::shutDown | ( | ) | [slot] |
This slot sends the terminate signal to the streamripper instance running in m_process.
void not_running()
Definition at line 961 of file ripping.cpp.
References console_reader::m_process.
void ripping::startStreamripper | ( | ) | [virtual, slot] |
This function starts streamripper (using streamripper_base::startStreamripper()) if it isn't yet running. It uses settings_general::saveDirectory() as working directory. It resets the property error and actualizes the property status.
void not_running()
Reimplemented from streamripper_base.
Definition at line 932 of file ripping.cpp.
References idle, is_starting, console_reader::m_process, setError(), setStatus(), and streamripper_base::startStreamripper().
Referenced by settings_stream_widget_connection::helper_setServerUri_connectMProcess_startRecognization().
void ripping::interpretate_console_output | ( | QStringList & | stringList | ) | [protected, virtual] |
This function reads the output of the streamripper process and interpretates it. It keeps the property of this class up to date - so when you want to use this information, use the properties.
Internally for performance reasons it uses from the many lines it can recive only the last available information of each type. (For example: When it receives 15 lines "[Ripping] song title [data size]" it uses only the last one to set status, song and dataSize properties - but controlls all the lines before, to see if they contain data of other type like bitrate information or so on, and if so, it uses it.)
Implements console_reader.
Definition at line 88 of file ripping.cpp.
References default_value_of_dataSize(), default_value_of_song(), helper_interpretate_metainfo_and_datasize(), is_buffering, is_connecting, is_ripping, is_saving, is_skipping, NOT, setBitrate(), setDataSize(), setError(), setMetaInterval(), setRelayPort(), setServerName(), setSong(), setStatus(), and setStreamName().
QStringList ripping::parameterList | ( | ) | const [protected, virtual] |
This function provides the necessary parameters for calling streamripper as available from serverUri() and settings_general - and some extra parameter (like to don't override temporary files).
Implements streamripper_base.
Reimplemented in get_stream_info, and radioStation.
Definition at line 889 of file ripping.cpp.
References NOT, and serverUri().
Referenced by radioStation::parameterList(), and get_stream_info::parameterList().
void ripping::resetStreamripperProperties | ( | ) | [protected, virtual] |
This function resets all streamripper properties to it's default values (=unset). It uses the reset functions of the properties, so for all changes a notify signal will be emitted.
Definition at line 75 of file ripping.cpp.
References default_value_of_bitrate(), default_value_of_dataSize(), default_value_of_error(), default_value_of_metaInterval(), default_value_of_relayPort(), default_value_of_serverName(), default_value_of_song(), default_value_of_status(), default_value_of_streamName(), setBitrate(), setDataSize(), setError(), setMetaInterval(), setRelayPort(), setServerName(), setSong(), setStatus(), and setStreamName().
Referenced by ripping(), and get_stream_info::setServerUri().
virtual QString ripping::serverUri | ( | ) | const [protected, pure virtual] |
This function provides the URI which should be ripped and is used by parameterList(). Implement it in inherited classes!
Implemented in get_stream_info, and radioStation.
Referenced by parameterList().
void ripping::setBitrate | ( | const qint64 | newBitrate | ) | [protected, virtual] |
Used internally to write the property bitrate.
Reimplemented in radioStation.
Definition at line 778 of file ripping.cpp.
References bitrateChanged(), formatedBitrate(), streamripper_base::index(), internal_bitrate, and PropertyValue::internalValue.
Referenced by interpretate_console_output(), resetStreamripperProperties(), and radioStation::setBitrate().
void ripping::setDataSize | ( | const qint64 | newDataSize | ) | [protected, virtual] |
Used internally to write the property dataSize.
Definition at line 650 of file ripping.cpp.
References dataSizeChanged(), formatedDataSize(), streamripper_base::index(), internal_dataSize, and PropertyValue::internalValue.
Referenced by helper_interpretate_metainfo_and_datasize(), interpretate_console_output(), resetStreamripperProperties(), and streamripperStateChange().
void ripping::setError | ( | const QString | newError | ) | [protected, virtual] |
Used internally to write the property error.
Definition at line 554 of file ripping.cpp.
References errorChanged(), formatedError(), streamripper_base::index(), internal_error, and PropertyValue::internalValue.
Referenced by errorOccured(), interpretate_console_output(), resetStreamripperProperties(), and startStreamripper().
void ripping::setMetaInterval | ( | const qint64 | newMetaInterval | ) | [protected, virtual] |
Used internally to write the property metaInterval.
Reimplemented in radioStation.
Definition at line 826 of file ripping.cpp.
References formatedMetaInterval(), streamripper_base::index(), internal_metaInterval, PropertyValue::internalValue, and metaIntervalChanged().
Referenced by interpretate_console_output(), resetStreamripperProperties(), and radioStation::setMetaInterval().
void ripping::setRelayPort | ( | const qint64 | newRelayPort | ) | [protected, virtual] |
Used internally to write the property relayPort.
Definition at line 712 of file ripping.cpp.
References formatedRelayPort(), streamripper_base::index(), internal_relayPort, PropertyValue::internalValue, and relayPortChanged().
Referenced by interpretate_console_output(), resetStreamripperProperties(), and streamripperStateChange().
void ripping::setServerName | ( | const QString | newServerName | ) | [protected, virtual] |
Used internally to write the property serverName.
Reimplemented in radioStation.
Definition at line 363 of file ripping.cpp.
References formatedServerName(), streamripper_base::index(), internal_serverName, PropertyValue::internalValue, and serverNameChanged().
Referenced by interpretate_console_output(), resetStreamripperProperties(), and radioStation::setServerName().
void ripping::setSong | ( | const QString | newSong | ) | [protected, virtual] |
Used internally to write the property song.
Definition at line 593 of file ripping.cpp.
References formatedSong(), streamripper_base::index(), internal_song, PropertyValue::internalValue, and songChanged().
Referenced by helper_interpretate_metainfo_and_datasize(), interpretate_console_output(), resetStreamripperProperties(), and streamripperStateChange().
void ripping::setStatus | ( | const statusType | newStatus | ) | [protected, virtual] |
Used internally to write the properties status and also isRunning.
Definition at line 446 of file ripping.cpp.
References formatedStatus(), idle, streamripper_base::index(), internal_isRunning, internal_status, PropertyValue::internalValue, not_running(), running(), and statusChanged().
Referenced by interpretate_console_output(), resetStreamripperProperties(), startStreamripper(), and streamripperStateChange().
void ripping::setStreamName | ( | const QString | newStreamName | ) | [protected, virtual] |
Used internally to write the property streamName.
Reimplemented in radioStation.
Definition at line 327 of file ripping.cpp.
References formatedStreamName(), streamripper_base::index(), internal_streamName, PropertyValue::internalValue, and streamNameChanged().
Referenced by interpretate_console_output(), resetStreamripperProperties(), and radioStation::setStreamName().
QString ripping::streamripperCommand | ( | ) | const [protected, virtual] |
This function provides the necessary command for invoking streamripper as available from settings_general::streamripperCommand.
Implements streamripper_base.
Definition at line 927 of file ripping.cpp.
void ripping::helper_interpretate_metainfo_and_datasize | ( | QString | my_line | ) | [private] |
This internal helper function used in interpretate_console_output() interpretates a specific part of streamrippers output and sets the properties song and dataSize accordingly.
my_line | A string of the form song title [ 1kb]. The units B, KB, K, MB and M are recognized for the data size (not case sensitive). |
Definition at line 230 of file ripping.cpp.
References dataSize(), NOT, OR, setDataSize(), and setSong().
Referenced by interpretate_console_output().
void ripping::errorOccured | ( | QProcess::ProcessError | error | ) | [private, slot] |
This slot is to catch the signal QProcess::error(QProcess::ProcessError error)
from m_process.
If the error is...
QProcess::FailedToStart
: Make a test if either the invoked program is missing or you may have insufficient permissions to invoke the program. An appropriate error messessage is set in the property error. QProcess::Crashed
: An appropriate error messessage is set in the property error. error | The QProcess::ProcessError that has occurred. |
Definition at line 839 of file ripping.cpp.
References setError().
Referenced by ripping().
void ripping::streamripperStateChange | ( | QProcess::ProcessState | newState | ) | [private, slot] |
This slot is to catch the signal QProcess::stateChanged(QProcess::ProcessState)
from m_process.
QProcess::NotRunning
than the properties get adjusted. QProcess::Starting
nothing happens because the properties get adjusted by the calling function. QProcess::Running
nothing happens because the properties will get adjusted by interpretate_console_output().newState | The new QProcess::ProcessState that has occurred. |
Definition at line 867 of file ripping.cpp.
References default_value_of_dataSize(), default_value_of_relayPort(), default_value_of_song(), default_value_of_status(), setDataSize(), setRelayPort(), setSong(), and setStatus().
Referenced by ripping().
PropertyValue ripping::internal_bitrate [private] |
Used internally to store the property bitrate.
Definition at line 535 of file ripping.h.
Referenced by setBitrate().
PropertyValue ripping::internal_dataSize [private] |
Used internally to store the property dataSize.
Definition at line 537 of file ripping.h.
Referenced by setDataSize().
PropertyValue ripping::internal_error [private] |
Used internally to store the property error.
Definition at line 539 of file ripping.h.
Referenced by setError().
bool ripping::internal_isRunning [private] |
Used internally to store the property isRunning.
Definition at line 541 of file ripping.h.
Referenced by setStatus().
PropertyValue ripping::internal_metaInterval [private] |
Used internally to store the property metaInterval.
Definition at line 543 of file ripping.h.
Referenced by setMetaInterval().
PropertyValue ripping::internal_relayPort [private] |
Used internally to store the property relayPort.
Definition at line 545 of file ripping.h.
Referenced by setRelayPort().
PropertyValue ripping::internal_serverName [private] |
Used internally to store the property serverName.
Definition at line 547 of file ripping.h.
Referenced by setServerName().
PropertyValue ripping::internal_song [private] |
PropertyValue ripping::internal_status [private] |
Used internally to store the property status.
Definition at line 551 of file ripping.h.
Referenced by doesTheUserWantsThatTheStreamIsRipping(), and setStatus().
PropertyValue ripping::internal_streamName [private] |
Used internally to store the property streamName.
Definition at line 553 of file ripping.h.
Referenced by setStreamName().
PropertyValue ripping::bitrate [read] |
This property holds the bitrate of the stream in kbit/s (with SI prefix, which means 1000 bit per second, not 1024) that is recorded by streamripper.
Meaning of the internal value:
This property guards it's last value also when streamripper terminates.
Formated value:
virtual PropertyValue bitrate() const
void bitrateChanged(qlonglong index, PropertyValue newBitrate)
virtual void setBitrate(qint64 bitrate)
static qint64 default_value_of_bitrate()
static PropertyValue formatedBitrate(const qint64 theBitrate)
PropertyValue ripping::dataSize [read] |
This property holds the amount of data of the actual song in byte, that has been recorded by streamripper until now.
This property gets reseted when streamripper terminates.
virtual PropertyValue dataSize() const
void dataSizeChanged(qlonglong index, PropertyValue newDataSize)
virtual void setDataSize(qint64 dataSize)
static qint64 default_value_of_dataSize()
static PropertyValue formatedDataSize(const qint64 theDataSize)
PropertyValue ripping::error [read] |
This property holds the error message of the last error that has occurred. It holds error messages from streamripper or an error messages from KRadioRipper (e.g. that the streamripper command wasn't found or the "save directory" isn't writable). The error message is human readable and localised.
Meaning:
This property guards it's last value also when streamripper terminates.
This property gets reseted when you startStreamripper().
virtual QString error() const
void errorChanged(qlonglong index, PropertyValue newError)
virtual void setError(const QString newError)
static QString default_value_of_error()
static PropertyValue formatedError(const QString theError)
bool ripping::isRunning [read] |
This property holds the status of streamripper in a simplified way: false when the status is ripping::idle, and true in all other cases.
Initialization value: false
virtual bool isRunning() const
void not_running()
This means that this signal is emitted when the streamripper process enters in the state QProcess::NotRunning
.
This differs from QProcess:finished()
, which is only emitted when the process was yet running. But not_running
is also emitted after you've tried to start streamripper (m_process has yet entered in state QProcess::Starting
) but the binary could than not be invoced (because is doesn't exit or the user hasn't execution rights or whatever).
void running()
This means that this signal is emitted when the streamripper process has entered in the state QProcess::Starting
or immediately before it will enter.
This differs from QProcess:started()
, which is only emitted when the binary has been successfully invoced. But running
is emitted after you start to try to invoce streamripper - still not knowing if this will work or not.
virtual void setStatus(const statusType newStatus)
static QString default_value_of_isRunning()
bool internal_isRunning
PropertyValue ripping::metaInterval [read] |
This property holds the interval in which metadata is send by the stream.
Meaning of the internal value:
This property guards it's last value also when streamripper terminates.
Formated value:
virtual PropertyValue metaInterval() const
void metaIntervalChanged(qlonglong index, PropertyValue newMetaInterval)
virtual void setMetaInterval(qint64 newMetaInterval)
static qint64 default_value_of_metaInterval()
void resetMetaInterval()
static PropertyValue formatedMetaInterval(const qint64 theMetaInterval)
PropertyValue ripping::relayPort [read] |
streamripper can start a local relay server which provides the stream that is actually recorded with some seconds of delay to the local network. This relay server is also used by KRadioRipper to implement to hear to the streams. This property holds the port of the relay server.
Meaning:
This property gets reseted when streamripper terminates.
virtual PropertyValue relayPort() const
void relayPortChanged(qlonglong index, PropertyValue newRelayPort)
virtual void setRelayPort(qint64 relayPort)
static qint64 default_value_of_relayPort()
static PropertyValue formatedRelayPort(const qint64 theRelayPort)
PropertyValue ripping::serverName [read] |
This property holds the name of server from which the stream comes.
Meaning:
This property guards it's last value also when streamripper terminates.
virtual PropertyValue serverName() const
void serverNameChanged(qlonglong index, PropertyValue newServerName)
virtual void setServerName(const QString newServerName)
static QString default_value_of_serverName()
static PropertyValue formatedServerName(const QString theServerName)
PropertyValue ripping::song [read] |
This property holds the name of the song that is actually recorded by streamripper.
Meaning:
virtual PropertyValue song() const
void songChanged(qlonglong index, PropertyValue newSong)
static QString default_value_of_song()
static PropertyValue formatedSong(const QString theSong)
PropertyValue ripping::status [read] |
This property holds the status of streamripper (like "Buffering...", "Ripping...", "Shutting down..." ...).
Initialization value: ripping::idle
virtual PropertyValue status() const
void statusChanged(qlonglong index, PropertyValue newStatus);
virtual void setStatus(const statusType newStatus)
static statusType default_value_of_status()
static PropertyValue formatedStatus(const statusType theStatus)
PropertyValue ripping::streamName [read] |
This property holds the name of the stream that is recorded by streamripper.
Meaning:
This property guards it's last value also when streamripper terminates.
virtual PropertyValue streamName() const
void streamNameChanged(qlonglong index, PropertyValue newStreamName)
virtual void setStreamName(const QString newStreamName)
static QString default_value_of_streamName()
static PropertyValue formatedStreamName(const QString theStreamName)