Rips CDs and individual tracks to M4A files.
More...
#include <cd_ripper.h>
|
| typedef sigc::signal< void(unsigned int, unsigned int)> | sig_track_progress |
| | "Track progress made" signal type.
|
| |
| typedef sigc::signal< void(void)> | sig_done |
| | "Rip done" signal type.
|
| |
|
| int16_t | consume () const |
| | Returns one datum from the producer.
|
| |
Rips CDs and individual tracks to M4A files.
- See also
- Producer/Consumer.
Definition at line 41 of file cd_ripper.h.
◆ sig_done
"Rip done" signal type.
Definition at line 67 of file cd_ripper.h.
◆ sig_track_progress
"Track progress made" signal type.
Definition at line 64 of file cd_ripper.h.
◆ CDRipper()
| CDRipper::CDRipper |
( |
CDDrive & | drive, |
|
|
const DiscDB::Disc & | disc, |
|
|
const std::string & | albumArtURL, |
|
|
const std::string & | mediaRoot ) |
CDRipper constructor.
- Parameters
-
| [in] | drive | Parent CDDrive. |
| [in] | disc | Fully populated DiscDB::Disc describing the album. |
| [in] | albumArtURL | URL to the currently shown album art. |
| [in] | mediaRoot | Path to the root of the removable volume. |
Definition at line 10 of file cd_ripper.cc.
◆ ~CDRipper()
◆ add_file_art()
| void CDRipper::add_file_art |
( |
RipContext * | rip_ctx | ) |
|
|
private |
Adds _album_art_image to the output file.
- Parameters
-
| rip_ctx | Pointer to the ripping context. |
Definition at line 387 of file cd_ripper.cc.
◆ do_rip()
The core ripping method interacting directly with ffmpeg.
- Parameters
-
| [in] | rip_ctx | Pointer to the ripping context. |
| [in] | continuous | Whether to continue ripping after the current track. |
Definition at line 143 of file cd_ripper.cc.
◆ end_file()
Frees resources in the ripping context specific to the output file.
- Parameters
-
| rip_ctx | Pointer to the ripping context. |
Definition at line 303 of file cd_ripper.cc.
◆ end_rip()
Ends the ripping process.
- Parameters
-
| rip_ctx | Pointer to the ripping context. |
Definition at line 233 of file cd_ripper.cc.
◆ ensure_output_dir()
| void CDRipper::ensure_output_dir |
( |
| ) |
|
|
private |
Verifies _media_root exists and sets _output_dir.
Definition at line 54 of file cd_ripper.cc.
◆ make_safe()
| std::string CDRipper::make_safe |
( |
const std::string & | str | ) |
const |
|
private |
Used to sanitize folder and file names.
- Parameters
-
| [in] | str | A file or folder path component . |
- Returns
- str with unsafe symbols replaced with underscores.
Definition at line 36 of file cd_ripper.cc.
◆ on_done_notification()
| void CDRipper::on_done_notification |
( |
| ) |
|
|
private |
Called when _dispatcher_done is notified.
Definition at line 50 of file cd_ripper.cc.
◆ on_notification()
| void CDRipper::on_notification |
( |
| ) |
|
|
private |
Called when _dispatcher is notified.
Definition at line 46 of file cd_ripper.cc.
◆ rip() [1/2]
◆ rip() [2/2]
| void CDRipper::rip |
( |
const int | track | ) |
|
Rip a specific track on the disc.
- Parameters
-
| [in] | track | The 1-based track index. |
Definition at line 339 of file cd_ripper.cc.
◆ rip_helper() [1/2]
| void CDRipper::rip_helper |
( |
| ) |
|
|
private |
◆ rip_helper() [2/2]
| void CDRipper::rip_helper |
( |
const int | track | ) |
|
|
private |
◆ signal_done()
◆ signal_track_progress()
Getter for ::_signal_track_progress.
Definition at line 367 of file cd_ripper.cc.
◆ start_file()
Creates the ouput file, tags it and writes the M4A header.
- Parameters
-
| rip_ctx | Pointer to the ripping context. |
Definition at line 238 of file cd_ripper.cc.
◆ start_rip()
Begins the ripping process.
- Parameters
-
| [in] | rip_ctx | Pointer to the ripping context . |
Definition at line 68 of file cd_ripper.cc.
◆ tag_file()
Adds textual metadata (album and track information) to the output file.
- Parameters
-
| rip_ctx | Pointer to the ripping context. |
Definition at line 375 of file cd_ripper.cc.
◆ _album_art_image
| uint8_t* CDRipper::_album_art_image |
|
private |
Raw bytes received from the _album_art_url.
Definition at line 117 of file cd_ripper.h.
◆ _album_art_image_codec
| AVCodecID CDRipper::_album_art_image_codec |
|
private |
Reflects whether the _album_art_image is JPEG or PNG.
Definition at line 119 of file cd_ripper.h.
◆ _album_art_image_dims
| std::pair<int, int> CDRipper::_album_art_image_dims |
|
private |
The dimensions of _album_art_image in pixels.
Definition at line 120 of file cd_ripper.h.
◆ _album_art_image_size
| int CDRipper::_album_art_image_size |
|
private |
The size of _album_art_image.
Definition at line 118 of file cd_ripper.h.
◆ _album_art_url
| std::string CDRipper::_album_art_url |
|
private |
The URL of the album art currently shown.
Definition at line 116 of file cd_ripper.h.
◆ _disc
| const DiscDB::Disc& CDRipper::_disc |
|
private |
The fully populated DiscDB::Disc describing the album.
Definition at line 107 of file cd_ripper.h.
◆ _dispatcher
| Glib::Dispatcher CDRipper::_dispatcher |
|
private |
Used by _thread to safely emit _sig_track_progress.
Definition at line 109 of file cd_ripper.h.
◆ _dispatcher_done
| Glib::Dispatcher CDRipper::_dispatcher_done |
|
private |
Used by _thread to safely emit _sig_done.
Definition at line 110 of file cd_ripper.h.
◆ _drive
◆ _media_root
| std::string CDRipper::_media_root |
|
private |
The path to the root of the removable volume.
Definition at line 113 of file cd_ripper.h.
◆ _output_dir
| std::string CDRipper::_output_dir |
|
private |
The path to the album folder on the removable volume.
Definition at line 114 of file cd_ripper.h.
◆ _output_filename
| std::string CDRipper::_output_filename |
|
private |
◆ _progress
| unsigned int CDRipper::_progress |
|
private |
The current percentage completion ripping the current track.
Definition at line 112 of file cd_ripper.h.
◆ _sig_done
Emiited when the rip (whole disc or single track) is done.
Definition at line 104 of file cd_ripper.h.
◆ _sig_track_progress
Emitted when the percentage progress ripping a track has increased.
Definition at line 103 of file cd_ripper.h.
◆ _thread
| std::thread* CDRipper::_thread |
|
private |
Used to execute the ripping process.
Definition at line 108 of file cd_ripper.h.
◆ _track
| unsigned int CDRipper::_track |
|
private |
The 1-based index of the track currently being ripped.
Definition at line 111 of file cd_ripper.h.
The documentation for this class was generated from the following files: