Skip to content

Commit

Permalink
reduced code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalnadjieb committed Nov 16, 2024
1 parent 29b02dd commit 959eb90
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions single_include/nadjieb/mjpeg_streamer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SOFTWARE.

// #include <nadjieb/utils/version.hpp>


/// The major version number
#define NADJIEB_MJPEG_STREAMER_VERSION_MAJOR 3

Expand All @@ -39,15 +40,15 @@ SOFTWARE.
#define NADJIEB_MJPEG_STREAMER_VERSION_PATCH 0

/// The complete version number
#define NADJIEB_MJPEG_STREAMER_VERSION_CODE \
(NADJIEB_MJPEG_STREAMER_VERSION_MAJOR * 10000 + NADJIEB_MJPEG_STREAMER_VERSION_MINOR * 100 \
+ NADJIEB_MJPEG_STREAMER_VERSION_PATCH)
#define NADJIEB_MJPEG_STREAMER_VERSION_CODE (NADJIEB_MJPEG_STREAMER_VERSION_MAJOR * 10000 + NADJIEB_MJPEG_STREAMER_VERSION_MINOR * 100 + NADJIEB_MJPEG_STREAMER_VERSION_PATCH)

/// Version number as string
#define NADJIEB_MJPEG_STREAMER_VERSION_STRING "3.0.0"


// #include <nadjieb/net/http_request.hpp>


#include <sstream>
#include <string>
#include <unordered_map>
Expand Down Expand Up @@ -111,6 +112,7 @@ class HTTPRequest {

// #include <nadjieb/net/http_response.hpp>


#include <sstream>
#include <string>
#include <unordered_map>
Expand Down Expand Up @@ -154,10 +156,13 @@ class HTTPResponse {

// #include <nadjieb/net/listener.hpp>


// #include <nadjieb/net/socket.hpp>


// #include <nadjieb/utils/platform.hpp>


#if defined _MSC_VER || defined __MINGW32__
#define NADJIEB_MJPEG_STREAMER_PLATFORM_WINDOWS
#elif defined __APPLE_CC__ || defined __APPLE__
Expand All @@ -166,6 +171,7 @@ class HTTPResponse {
#define NADJIEB_MJPEG_STREAMER_PLATFORM_LINUX
#endif


#ifdef NADJIEB_MJPEG_STREAMER_PLATFORM_WINDOWS
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
Expand Down Expand Up @@ -333,6 +339,7 @@ static int pollSockets(NADJIEB_MJPEG_STREAMER_POLLFD* fds, size_t nfds, long tim

// #include <nadjieb/utils/non_copyable.hpp>


namespace nadjieb {
namespace utils {
class NonCopyable {
Expand All @@ -351,6 +358,7 @@ class NonCopyable {

// #include <nadjieb/utils/runnable.hpp>


namespace nadjieb {
namespace utils {
enum class State { UNSPECIFIED = 0, NEW, BOOTING, RUNNING, TERMINATING, TERMINATED };
Expand All @@ -366,6 +374,7 @@ class Runnable {
} // namespace utils
} // namespace nadjieb


#include <functional>
#include <iostream>
#include <stdexcept>
Expand Down Expand Up @@ -559,12 +568,15 @@ class Listener : public nadjieb::utils::NonCopyable, public nadjieb::utils::Runn

// #include <nadjieb/net/publisher.hpp>


// #include <nadjieb/net/socket.hpp>

// #include <nadjieb/net/topic.hpp>


// #include <nadjieb/net/socket.hpp>


#include <mutex>
#include <shared_mutex>
#include <string>
Expand Down Expand Up @@ -648,6 +660,7 @@ class Topic {

// #include <nadjieb/utils/runnable.hpp>


#include <algorithm>
#include <condition_variable>
#include <mutex>
Expand Down Expand Up @@ -805,6 +818,7 @@ class Publisher : public nadjieb::utils::NonCopyable, public nadjieb::utils::Run

// #include <nadjieb/utils/non_copyable.hpp>


#include <string>

namespace nadjieb {
Expand Down

0 comments on commit 959eb90

Please sign in to comment.