Skip to content

Commit

Permalink
chore: reduce some unnecessary includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 14, 2025
1 parent e421335 commit abcae38
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/accelerator/accelerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <core/mixer/mixer.h>
#include <core/video_format.h>

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ptree_fwd.hpp>

#include <future>
#include <memory>
Expand Down
2 changes: 2 additions & 0 deletions src/accelerator/ogl/util/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/
#include "buffer.h"

#include <boost/property_tree/ptree.hpp>

#include <common/gl/gl_check.h>

#include <GL/glew.h>
Expand Down
2 changes: 1 addition & 1 deletion src/accelerator/ogl/util/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#pragma once

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ptree_fwd.hpp>
#include <memory>

namespace caspar { namespace accelerator { namespace ogl {
Expand Down
3 changes: 2 additions & 1 deletion src/common/ptree.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

#include <boost/algorithm/string/replace.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ptree_fwd.hpp>
#include <boost/property_tree/exceptions.hpp>
#include <boost/range/adaptor/transformed.hpp>

#include <map>
Expand Down
1 change: 0 additions & 1 deletion src/core/fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ namespace caspar::core { class video_channel; }
namespace caspar::core { struct pixel_format_desc; }
namespace caspar::core { class cg_producer_registry; }
namespace caspar::core { struct frame_transform; }
namespace caspar::core { struct write_frame_consumer; }
namespace caspar::core { struct frame_producer_dependencies; }
namespace caspar::core { struct module_dependencies; }
namespace caspar::core { class frame_producer_registry; }
Expand Down
6 changes: 5 additions & 1 deletion src/core/module_dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
#include "consumer/frame_consumer.h"
#include "producer/cg_proxy.h"
#include "producer/frame_producer.h"
#include "protocol/amcp/amcp_command_repository_wrapper.h"
// #include "protocol/amcp/amcp_command_repository_wrapper.h"

namespace caspar::protocol::amcp {
class amcp_command_repository_wrapper;
}

namespace caspar { namespace core {

Expand Down
8 changes: 0 additions & 8 deletions src/modules/artnet/consumer/artnet_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,14 @@
#undef NOMINMAX
// ^^ This is needed to avoid a conflict between boost asio and other header files defining NOMINMAX

#include <common/array.h>
#include <common/future.h>
#include <common/log.h>
#include <common/ptree.h>
#include <common/utf.h>

#include <core/consumer/frame_consumer.h>
#include <core/frame/frame.h>
#include <core/video_format.h>

#include <boost/algorithm/string.hpp>
#include <boost/asio.hpp>
#include <boost/locale/encoding_utf.hpp>
#include <boost/property_tree/ptree.hpp>

#include <cmath>
#include <thread>
#include <utility>
#include <vector>
Expand Down
10 changes: 6 additions & 4 deletions src/modules/decklink/consumer/decklink_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class decklink_frame
[[nodiscard]] int nb_samples() const { return nb_samples_; }

// IDeckLinkVideoFrameMetadataExtensions
HRESULT STDMETHODCALLTYPE GetInt(BMDDeckLinkFrameMetadataID metadataID, int64_t* value)
HRESULT STDMETHODCALLTYPE GetInt(BMDDeckLinkFrameMetadataID metadataID, int64_t* value) override
{
HRESULT result = S_OK;

Expand All @@ -333,7 +333,7 @@ class decklink_frame
return result;
}

HRESULT STDMETHODCALLTYPE GetFloat(BMDDeckLinkFrameMetadataID metadataID, double* value)
HRESULT STDMETHODCALLTYPE GetFloat(BMDDeckLinkFrameMetadataID metadataID, double* value) override
{
const auto color_space = (color_space_ == core::color_space::bt2020) ? &REC_2020 : &REC_709;
HRESULT result = S_OK;
Expand Down Expand Up @@ -395,25 +395,27 @@ class decklink_frame
return result;
}

HRESULT STDMETHODCALLTYPE GetFlag(BMDDeckLinkFrameMetadataID, BOOL* value)
HRESULT STDMETHODCALLTYPE GetFlag(BMDDeckLinkFrameMetadataID, BOOL* value) override
{
// Not expecting GetFlag
*value = false;
return E_INVALIDARG;
}

HRESULT STDMETHODCALLTYPE GetString(BMDDeckLinkFrameMetadataID, String* value)
HRESULT STDMETHODCALLTYPE GetString(BMDDeckLinkFrameMetadataID, String* value) override
{
// Not expecting GetString
*value = nullptr;
return E_INVALIDARG;
}

/*
HRESULT STDMETHODCALLTYPE GetBytes(BMDDeckLinkFrameMetadataID metadataID, void* buffer, uint32_t* bufferSize)
{
*bufferSize = 0;
return E_INVALIDARG;
}
*/
};

struct decklink_secondary_port final : public IDeckLinkVideoOutputCallback
Expand Down
3 changes: 3 additions & 0 deletions src/modules/ffmpeg/util/av_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ std::shared_ptr<AVFrame> make_av_video_frame(const core::const_frame& frame, con
case core::pixel_format::ycbcra:
av_frame->format = is_16bit ? AVPixelFormat::AV_PIX_FMT_YUVA420P10 : AVPixelFormat::AV_PIX_FMT_YUVA420P;
break;
case core::pixel_format::uyvy:
// TODO
break;
case core::pixel_format::count:
case core::pixel_format::invalid:
break;
Expand Down
1 change: 1 addition & 0 deletions src/modules/html/producer/html_producer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/log/trivial.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/regex.hpp>

#include <tbb/concurrent_queue.h>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/image/consumer/image_consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <common/bit_depth.h>
#include <common/memory.h>

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ptree_fwd.hpp>
#include <core/consumer/frame_consumer.h>

#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/modules/newtek/newtek.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "util/ndi.h"

#include <core/consumer/frame_consumer.h>
#include <protocol/amcp/amcp_command_repository_wrapper.h>

#include <boost/property_tree/ptree.hpp>
#include <common/env.h>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/screen/consumer/screen_consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <core/fwd.h>

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ptree_fwd.hpp>
#include <vector>

namespace caspar { namespace screen {
Expand Down
1 change: 0 additions & 1 deletion src/protocol/amcp/AMCPCommandsImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "../util/http_request.h"
#include "AMCPCommandQueue.h"
#include "amcp_args.h"
#include "amcp_command_repository.h"

#include <common/env.h>

Expand Down

0 comments on commit abcae38

Please sign in to comment.