ripping Class Reference

This abstract class uses streamripper to rip radio streams. More...

#include <ripping.h>

Inheritance diagram for ripping:

Inheritance graph
[legend]
Collaboration diagram for ripping:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

This abstract class uses streamripper to rip radio streams.

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.


Member Enumeration Documentation

This enum can hold the actual status of streamripper.

  • idle: m_process is not running.
  • is_starting:
    1. m_process will be started immediately
    2. m_process is QProcess::Starting.
    3. m_process is QProcess::Running, but streamripper still hasn't reached the state ripping::is_connecting.
  • is_connecting: streamripper connects to the server.
  • is_buffering: streamripper is filling his buffer.
  • is_skipping: streamripper doesn't record the actual song (in splitted files).
  • is_ripping: streamripper is ripping the actual song.
  • is_saving: streamripper is shutting down. This takes usually some time, but only "shutting down" is an annoying message. The user will find it more useful if the status message describes something important. So it's called "saving files". This sounds important and also is true.
Enumerator:
idle 
is_starting 
is_connecting 
is_buffering 
is_skipping 
is_ripping 
is_saving 

Definition at line 344 of file ripping.h.


Constructor & Destructor Documentation

ripping::ripping ( const QPointer< QObject >  parent  ) 

Constructor of the class.

Parameters:
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().

Here is the call graph for this function:

ripping::~ripping (  )  [virtual]

The destructor.

Definition at line 71 of file ripping.cpp.


Member Function Documentation

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().

Here is the caller graph for this function:

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]

See property error.

Referenced by ripping().

Here is the caller graph for this function:

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]

Returns:
The default value of property bitrate.

Definition at line 788 of file ripping.cpp.

Referenced by settings_stream_widget_connection::delete_old_streamInfo_and_start_recognization(), and resetStreamripperProperties().

Here is the caller graph for this function:

qint64 ripping::default_value_of_dataSize (  )  [static]

Returns:
The default value of property dataSize.

Definition at line 658 of file ripping.cpp.

Referenced by interpretate_console_output(), resetStreamripperProperties(), and streamripperStateChange().

Here is the caller graph for this function:

QString ripping::default_value_of_error (  )  [static]

Returns:
The default value of property error.

Definition at line 565 of file ripping.cpp.

Referenced by resetStreamripperProperties().

Here is the caller graph for this function:

bool ripping::default_value_of_isRunning (  )  [static]

Returns:
The default value of property isRunning.

Definition at line 663 of file ripping.cpp.

qint64 ripping::default_value_of_metaInterval (  )  [static]

Returns:
The default value of property metaInterval.

Definition at line 834 of file ripping.cpp.

Referenced by settings_stream_widget_connection::delete_old_streamInfo_and_start_recognization(), and resetStreamripperProperties().

Here is the caller graph for this function:

qint64 ripping::default_value_of_relayPort (  )  [static]

Returns:
The default value of property relayPort.

Definition at line 720 of file ripping.cpp.

Referenced by resetStreamripperProperties(), and streamripperStateChange().

Here is the caller graph for this function:

QString ripping::default_value_of_serverName (  )  [static]

Returns:
The default value of property serverName.

Definition at line 371 of file ripping.cpp.

Referenced by settings_stream_widget_connection::delete_old_streamInfo_and_start_recognization(), and resetStreamripperProperties().

Here is the caller graph for this function:

QString ripping::default_value_of_song (  )  [static]

Returns:
The default value of property song.

Definition at line 601 of file ripping.cpp.

Referenced by interpretate_console_output(), resetStreamripperProperties(), and streamripperStateChange().

Here is the caller graph for this function:

ripping::statusType ripping::default_value_of_status (  )  [static]

Returns:
The default value of property status.

Definition at line 464 of file ripping.cpp.

References idle.

Referenced by resetStreamripperProperties(), and streamripperStateChange().

Here is the caller graph for this function:

QString ripping::default_value_of_streamName (  )  [static]

Returns:
The default value of property streamName.

Definition at line 335 of file ripping.cpp.

Referenced by settings_stream_widget_connection::delete_old_streamInfo_and_start_recognization(), and resetStreamripperProperties().

Here is the caller graph for this function:

bool ripping::doesTheUserWantsThatTheStreamIsRipping ( const ripping::statusType  theStatus  )  [static]

Parameters:
theStatus the status for which you want to determinate if the user wants to rip the stream or not.
Returns:
  • false if the user wants that the stream is not ripping. This is assumed when the stream isn't running, (ripping::idle) or when the stream is running but the user has clicked on stop so that the stream is shutting down (ripping::is_saving).
  • true in all other cases.
See also:
doesTheUserWantsThatTheStreamIsRipping()

Definition at line 969 of file ripping.cpp.

References idle, is_saving, and OR.

PropertyValue ripping::formatedBitrate ( const qint64  theBitrate  )  [static]

PropertyValue ripping::formatedDataSize ( const qint64  theDataSize  )  [static]

Returns:
A full-featured formateded version for the property dataSize.

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().

Here is the caller graph for this function:

PropertyValue ripping::formatedError ( const QString  theError  )  [static]

Returns:
A full-featured formateded version for the property error.

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().

Here is the caller graph for this function:

PropertyValue ripping::formatedMetaInterval ( const qint64  theMetaInterval  )  [static]

PropertyValue ripping::formatedRelayPort ( const qint64  theRelayPort  )  [static]

Returns:
A full-featured formateded version for the property relayPort.

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().

Here is the caller graph for this function:

PropertyValue ripping::formatedServerName ( const QString  theServerName  )  [static]

PropertyValue ripping::formatedSong ( const QString  theSong  )  [static]

Returns:
A full-featured formateded version for the property song.

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().

Here is the caller graph for this function:

PropertyValue ripping::formatedStatus ( const statusType  theStatus  )  [static]

Returns:
A full-featured formateded version for the property status.

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().

Here is the caller graph for this function:

PropertyValue ripping::formatedStreamName ( const QString  theStreamName  )  [static]

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]

See property song.

Referenced by setSong().

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.

See also:
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.

See also:
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.
  • All other errors can safly be ignored because they don't mean that streamripper is terminated.
Parameters:
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.

  • When the state has changed to QProcess::NotRunning than the properties get adjusted.
  • When the state has changed to QProcess::Starting nothing happens because the properties get adjusted by the calling function.
  • When the state has changed to QProcess::Running nothing happens because the properties will get adjusted by interpretate_console_output().
Parameters:
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().


Member Data Documentation

Used internally to store the property bitrate.

Definition at line 535 of file ripping.h.

Referenced by setBitrate().

Used internally to store the property dataSize.

Definition at line 537 of file ripping.h.

Referenced by setDataSize().

Used internally to store the property error.

Definition at line 539 of file ripping.h.

Referenced by setError().

Used internally to store the property isRunning.

Definition at line 541 of file ripping.h.

Referenced by setStatus().

Used internally to store the property metaInterval.

Definition at line 543 of file ripping.h.

Referenced by setMetaInterval().

Used internally to store the property relayPort.

Definition at line 545 of file ripping.h.

Referenced by setRelayPort().

Used internally to store the property serverName.

Definition at line 547 of file ripping.h.

Referenced by setServerName().

Used internally to store the property song.

Definition at line 549 of file ripping.h.

Referenced by setSong().

Used internally to store the property status.

Definition at line 551 of file ripping.h.

Referenced by doesTheUserWantsThatTheStreamIsRipping(), and setStatus().

Used internally to store the property streamName.

Definition at line 553 of file ripping.h.

Referenced by setStreamName().


Property Documentation

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:

  • bitrate >= 1: The bitrate has been recognized. \ The property holds the bitrate.
  • (bitrate = 0) OR (bitrate = -1): An error occurred while recognizing the bitrate. (Maybe a streamripper error or maybe a KRadioRipper error while recognzing.)
  • bitrate <= -2: The property isn't defined. The bitrate has not (yet) been recognized.
Initialization value: -2

This property guards it's last value also when streamripper terminates.

Formated value:

  • If the parameter "bitrate" is >= 1, this is a nicly format QString version of bitrate in the form "23 kbit/s".
  • If the parameter is 0 or -1, then this is a message that there was an error while recognizing the bitrate.
  • If the parameter is < -1, then this is an empty string.
All returned strings are fully localised: They are translated and use the locally used number format.

See also:
 virtual void setBitrate(qint64 bitrate) 

 static qint64 default_value_of_bitrate() 

 static PropertyValue formatedBitrate(const qint64 theBitrate) 

Definition at line 82 of file ripping.h.

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.

Warning:
The formated version contains the value in MiB (with binary prefix which means 1024 * 1024 byte, not 1000 * 1000 byte).
Meaning:
  • dataSize >= 0: The dataSize has been recognized. The property holds the dataSize.
  • dataSize = -1: An error occurred while recognizing the dataSize. (Maybe a streamripper error or maybe a KRadioRipper error while recognzing.)
  • dataSize <= -2: The property isn't defined. The dataSize has not (yet) been recognized.
Initialization value: -2

This property gets reseted when streamripper terminates.

See also:
 virtual void setDataSize(qint64 dataSize) 

 static qint64 default_value_of_dataSize() 

 static PropertyValue formatedDataSize(const qint64 theDataSize) 

Definition at line 111 of file ripping.h.

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:

  • an empty string: No error since the last startStreamripper().
  • else: An error occurred since the last startStreamripper and the property holds the error message.
Initialization value: an empty string

This property guards it's last value also when streamripper terminates.

This property gets reseted when you startStreamripper().

See also:
 virtual void setError(const QString newError) 

 static QString default_value_of_error() 

 static PropertyValue formatedError(const QString theError) 

Definition at line 137 of file ripping.h.

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

  • read:
     virtual bool isRunning() const 
    
  • notify: There are 2 signals to which you can connect:
    •  void not_running() 
      
      This signal is emitted when isRunning changes to false.

      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 signal is emitted when isRunning changes to true.

      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.

See also:
status

 virtual void setStatus(const statusType newStatus) 

 static QString default_value_of_isRunning() 

Definition at line 182 of file ripping.h.

PropertyValue ripping::metaInterval [read]

This property holds the interval in which metadata is send by the stream.

Meaning of the internal value:

  • metaInterval >= 1: The metaInterval has been recognized. The property holds the metaInterval.
  • (metaInterval = 0) OR (metaInterval = -1): An error occurred while recognizing the metaInterval. (Maybe a streamripper error or maybe a KRadioRipper error while recognzing.)
  • metaInterval <= -2: The property isn't defined. The metaInterval has not (yet) been recognized.
Initialization value: -2

This property guards it's last value also when streamripper terminates.

Formated value:

  • If the parameter "metaInterval" is >= 1, this is a nicly format QString version of metaInterval.
  • If the parameter is 0 or -1, then this is a message that there was an error while recognizing the meta data interval.
  • If the parameter is < -1, then this is an empty string.
All returned strings are fully localised: They are translated and use the locally used number format.

See also:
 virtual void setMetaInterval(qint64 newMetaInterval) 

 void resetMetaInterval() 

 static PropertyValue formatedMetaInterval(const qint64 theMetaInterval) 

Definition at line 217 of file ripping.h.

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:

  • relayPort >= 0: There exists a relay server. The property holds the port of the relay server.
  • relayPort = -1: An error occurred while recognizing the relay server port. (Maybe a streamripper error or maybe a KRadioRipper error while recognzing.)
  • relayPort <= -2: There doesn't exist a relay server.
Initialization value: -2

This property gets reseted when streamripper terminates.

See also:
 virtual void setRelayPort(qint64 relayPort) 

 static qint64 default_value_of_relayPort() 

 static PropertyValue formatedRelayPort(const qint64 theRelayPort) 

Definition at line 245 of file ripping.h.

PropertyValue ripping::serverName [read]

This property holds the name of server from which the stream comes.

Meaning:

  • an empty string: The name of the server hasn't (yet) been recognized.
  • else: The name of the server has been recognized and the property holds it.
Initialization value: an empty string

This property guards it's last value also when streamripper terminates.

See also:
 virtual void setServerName(const QString newServerName) 

 static QString default_value_of_serverName() 

 static PropertyValue formatedServerName(const QString theServerName) 

Definition at line 265 of file ripping.h.

PropertyValue ripping::song [read]

This property holds the name of the song that is actually recorded by streamripper.

Meaning:

  • an empty string: Actually streamripper isn't recordeding.
  • else: Actually streamripper is recordeding and the property holds the name of the song who's actually recorded.
Initialization value: an empty string

See also:
 virtual void setSong(const QString song) 

 static QString default_value_of_song() 

 static PropertyValue formatedSong(const QString theSong) 

Definition at line 283 of file ripping.h.

PropertyValue ripping::status [read]

This property holds the status of streamripper (like "Buffering...", "Ripping...", "Shutting down..." ...).

Initialization value: ripping::idle

See also:
isRunning

 virtual void setStatus(const statusType newStatus) 

 static PropertyValue formatedStatus(const statusType theStatus) 

Definition at line 299 of file ripping.h.

PropertyValue ripping::streamName [read]

This property holds the name of the stream that is recorded by streamripper.

Meaning:

  • an empty string: The name of the stream hasn't (yet) been recognized.
  • else: The name of the stream has been recognized and the property holds it.
Initialization value: an empty string

This property guards it's last value also when streamripper terminates.

See also:
 virtual void setStreamName(const QString newStreamName) 

 static QString default_value_of_streamName() 

 static PropertyValue formatedStreamName(const QString theStreamName) 

Definition at line 319 of file ripping.h.


The documentation for this class was generated from the following files:

Generated on Sat May 2 10:44:01 2009 for kradioripper by  doxygen 1.5.6