Cleanup Snapserver includes

This commit is contained in:
badaix 2024-04-04 19:02:45 +02:00
parent d1a4677970
commit 6f040d3d22
53 changed files with 234 additions and 245 deletions

View file

@ -1,6 +1,6 @@
/***
This file is part of snapcast
Copyright (C) 2014-2023 Johannes Pohl
Copyright (C) 2014-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -16,8 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef ENCODER_HPP
#define ENCODER_HPP
#pragma once
// local headers
#include "common/message/codec_header.hpp"
@ -91,5 +90,3 @@ protected:
};
} // namespace encoder
#endif

View file

@ -1,6 +1,6 @@
/***
This file is part of snapcast
Copyright (C) 2014-2021 Johannes Pohl
Copyright (C) 2014-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -16,7 +16,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
// prototype/interface header file
#include "encoder_factory.hpp"
// local headers
#include "null_encoder.hpp"
#include "pcm_encoder.hpp"
#if defined(HAS_OGG) && defined(HAS_VORBIS) && defined(HAS_VORBIS_ENC)
@ -28,7 +31,6 @@
#if defined(HAS_OPUS)
#include "opus_encoder.hpp"
#endif
#include "common/aixlog.hpp"
#include "common/snap_exception.hpp"
#include "common/utils/string_utils.hpp"

View file

@ -1,10 +1,31 @@
#ifndef ENCODER_FACTORY_H
#define ENCODER_FACTORY_H
/***
This file is part of snapcast
Copyright (C) 2014-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#pragma once
// local headers
#include "encoder.hpp"
// standard headers
#include <memory>
#include <string>
namespace encoder
{
@ -16,5 +37,3 @@ public:
};
} // namespace encoder
#endif

View file

@ -1,6 +1,6 @@
/***
This file is part of snapcast
Copyright (C) 2014-2021 Johannes Pohl
Copyright (C) 2014-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -16,12 +16,21 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include <iostream>
// prototype/interface header file
#include "flac_encoder.hpp"
// local headers
#include "common/aixlog.hpp"
#include "common/snap_exception.hpp"
#include "common/str_compat.hpp"
#include "flac_encoder.hpp"
// 3rd party headers
#include "FLAC/metadata.h"
// standard headers
#include <iostream>
using namespace std;

View file

@ -1,6 +1,6 @@
/***
This file is part of snapcast
Copyright (C) 2014-2020 Johannes Pohl
Copyright (C) 2014-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -16,16 +16,19 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef FLAC_ENCODER_HPP
#define FLAC_ENCODER_HPP
#pragma once
// local headers
#include "encoder.hpp"
// 3rd party headers
#include "FLAC/stream_encoder.h"
// standard headers
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "FLAC/metadata.h"
#include "FLAC/stream_encoder.h"
namespace encoder
{
@ -56,5 +59,3 @@ protected:
};
} // namespace encoder
#endif

View file

@ -1,6 +1,6 @@
/***
This file is part of snapcast
Copyright (C) 2014-2020 Johannes Pohl
Copyright (C) 2014-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -16,7 +16,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
// prototype/interface header file
#include "null_encoder.hpp"
// local headers
#include "common/aixlog.hpp"

View file

@ -16,10 +16,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef NULL_ENCODER_HPP
#define NULL_ENCODER_HPP
#pragma once
// local headers
#include "encoder.hpp"
namespace encoder
{
@ -44,5 +46,3 @@ protected:
};
} // namespace encoder
#endif

View file

@ -1,6 +1,6 @@
/***
This file is part of snapcast
Copyright (C) 2014-2021 Johannes Pohl
Copyright (C) 2014-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -16,15 +16,19 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include <cstring>
#include <iostream>
// prototype/interface header file
#include "ogg_encoder.hpp"
// local headers
#include "common/aixlog.hpp"
#include "common/snap_exception.hpp"
#include "common/str_compat.hpp"
#include "common/utils.hpp"
#include "common/utils/string_utils.hpp"
#include "ogg_encoder.hpp"
// standard headers
#include <cstring>
#include <iostream>
using namespace std;

View file

@ -1,6 +1,6 @@
/***
This file is part of snapcast
Copyright (C) 2014-2020 Johannes Pohl
Copyright (C) 2014-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -16,12 +16,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef OGG_ENCODER_HPP
#define OGG_ENCODER_HPP
#pragma once
// local headers
#include "encoder.hpp"
// 3rd party headers
#include <ogg/ogg.h>
#include <vorbis/vorbisenc.h>
namespace encoder
{
@ -54,5 +58,3 @@ private:
};
} // namespace encoder
#endif

View file

@ -1,7 +1,7 @@
/***
This file is part of snapcast
Copyright (C) 2015 Hannes Ellinger
Copyright (C) 2016-2021 Johannes Pohl
Copyright (C) 2016-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -17,12 +17,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
// prototype/interface header file
#include "opus_encoder.hpp"
// local headers
#include "common/aixlog.hpp"
#include "common/snap_exception.hpp"
#include "common/str_compat.hpp"
#include "common/utils/string_utils.hpp"
using namespace std;
namespace encoder

View file

@ -1,26 +1,29 @@
/***
This file is part of snapcast
Copyright (C) 2015 Hannes Ellinger
This file is part of snapcast
Copyright (C) 2015 Hannes Ellinger
Copyright (C) 2016-2024 Johannes Pohl
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef OPUS_ENCODER_HPP
#define OPUS_ENCODER_HPP
#pragma once
// local headers
#include "common/resampler.hpp"
#include "encoder.hpp"
// 3rd party headers
#include <opus/opus.h>
@ -49,5 +52,3 @@ protected:
};
} // namespace encoder
#endif

View file

@ -16,9 +16,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
// prototype/interface header file
#include "pcm_encoder.hpp"
// local headers
#include "common/aixlog.hpp"
#include "common/endian.hpp"
// standard headers
#include <memory>

View file

@ -16,10 +16,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef PCM_ENCODER_HPP
#define PCM_ENCODER_HPP
#pragma once
// local headers
#include "encoder.hpp"
namespace encoder
{
@ -35,5 +37,3 @@ protected:
};
} // namespace encoder
#endif