Main entry point and implementation of the playd class. More...
#include <algorithm>#include <cstdint>#include <iostream>#include <tuple>#include "io.hpp"#include "response.hpp"#include "player.hpp"#include "messages.h"
Include dependency graph for main.cpp:Go to the source code of this file.
Functions | |
| std::vector< std::string > | MakeArgVector (int argc, char *argv[]) |
| Creates a vector of strings from a C-style argument vector. More... | |
| int | GetDeviceID (const std::vector< std::string > &args) |
| Tries to get the output device ID from program arguments. More... | |
| void | ExitWithUsage (const std::string &progname) |
| Reports usage information and exits. More... | |
| std::pair< std::string, std::string > | GetHostAndPort (const std::vector< std::string > &args) |
| Gets the host and port from the program arguments. More... | |
| void | ExitWithNetError (const std::string &host, const std::string &port, const std::string &msg) |
| Exits with an error message for a network error. More... | |
| void | ExitWithError (const std::string &msg) |
| Exits with an error message for an unhandled exception. More... | |
| int | main (int argc, char *argv[]) |
| The main entry point. More... | |
Main entry point and implementation of the playd class.
Definition in file main.cpp.
| void ExitWithError | ( | const std::string & | msg | ) |
| void ExitWithNetError | ( | const std::string & | host, |
| const std::string & | port, | ||
| const std::string & | msg | ||
| ) |
| void ExitWithUsage | ( | const std::string & | progname | ) |
Reports usage information and exits.
| progname | The name of the program as executed. |
Definition at line 88 of file main.cpp.
References SdlAudioSink::GetDevicesInfo().
Referenced by main().
| int GetDeviceID | ( | const std::vector< std::string > & | args | ) |
Tries to get the output device ID from program arguments.
| args | The program argument vector. |
Definition at line 64 of file main.cpp.
References SdlAudioSink::IsOutputDevice().
Referenced by main().
| std::pair<std::string, std::string> GetHostAndPort | ( | const std::vector< std::string > & | args | ) |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
The main entry point.
| argc | Program argument count. |
| argv | Program argument vector. |
Definition at line 150 of file main.cpp.
References SdlAudioSink::CleanupLibrary(), ExitWithError(), ExitWithNetError(), ExitWithUsage(), GetDeviceID(), GetHostAndPort(), SdlAudioSink::InitLibrary(), MakeArgVector(), Error::Message(), and IoCore::Run().
| std::vector<std::string> MakeArgVector | ( | int | argc, |
| char * | argv[] | ||
| ) |