xbmc / inputstream.ffmpegdirect

Supports streams opened by FFmpeg's libavformat or Kodi's cURL such as plain TS, HLS and DASH (non-DRM) as well as many others. There is support for Archive/Catchup services where there is a replay window and can timeshift across that span. Also provides timeshift for live streams where rewind/pause and fast-forward would not have been available.
GNU General Public License v2.0
59 stars 41 forks source link

[Nexus] inputstream.ffmpegdirect HttpProxy.h:18:40: error: ‘uint16_t’ has not been declared #256

Open noguxx opened 1 year ago

noguxx commented 1 year ago

Hi, there's a problem compiling inputstream.ffmpegdirect for kodi Nexus with a x86_64 arch install.

The steps to compile:

git clone --branch Nexus https://github.com/xbmc/xbmc.git
git clone --branch Nexus https://github.com/xbmc/inputstream.ffmpegdirect.git
cd inputstream.ffmpegdirect && mkdir build && cd build
cmake -DADDONS_TO_BUILD=inputstream.ffmpegdirect -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/build/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
make

The output:

(...)
[ 97%] Performing build step for 'inputstream.ffmpegdirect'
[  6%] Building CXX object CMakeFiles/inputstream.ffmpegdirect.dir/src/StreamManager.cpp.o
In file included from /home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/FFmpegStream.h:10,
                 from /home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/StreamManager.h:10,
                 from /home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/StreamManager.cpp:8:
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h:18:40: error: ‘uint16_t’ has not been declared
   18 |     HttpProxy(const std::string& host, uint16_t port, const std::string& user, const std::string& password)
      |                                        ^~~~~~~~
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h:24:5: error: ‘uint16_t’ does not name a type
   24 |     uint16_t GetProxyPort() const { return m_port; }
      |     ^~~~~~~~
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h:11:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   10 | #include <string>
  +++ |+#include <cstdint>
   11 | 
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h:25:23: error: ‘uint16_t’ has not been declared
   25 |     void SetProxyPort(uint16_t value) { m_port = value; }
      |                       ^~~~~~~~
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h:35:5: error: ‘uint16_t’ does not name a type
   35 |     uint16_t m_port;
      |     ^~~~~~~~
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h:35:5: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h: In constructor ‘ffmpegdirect::HttpProxy::HttpProxy(const std::string&, int, const std::string&, const std::string&)’:
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h:19:23: error: class ‘ffmpegdirect::HttpProxy’ does not have any field named ‘m_port’
   19 |       : m_host(host), m_port(port), m_user(user), m_password(password) {};
      |                       ^~~~~~
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h: In member function ‘void ffmpegdirect::HttpProxy::SetProxyPort(int)’:
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/../utils/HttpProxy.h:25:41: error: ‘m_port’ was not declared in this scope; did you mean ‘m_host’?
   25 |     void SetProxyPort(uint16_t value) { m_port = value; }
      |                                         ^~~~~~
      |                                         m_host
In file included from /home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/FFmpegStream.h:13:
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/DemuxStream.h: At global scope:
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/DemuxStream.h:36:7: warning: ‘ffmpegdirect::DemuxStream’ declared with greater visibility than the type of its field ‘ffmpegdirect::DemuxStream::cryptoSession’ [-Wattributes]
   36 | class DemuxStream
      |       ^~~~~~~~~~~
In file included from /home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/FFmpegStream.h:14:
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/CurlInput.h:23:7: warning: ‘ffmpegdirect::CurlInput’ declared with greater visibility than the type of its field ‘ffmpegdirect::CurlInput::m_pFile’ [-Wattributes]
   23 | class CurlInput
      |       ^~~~~~~~~
In file included from /home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/TimeshiftBuffer.h:11,
                 from /home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/TimeshiftStream.h:13,
                 from /home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/StreamManager.cpp:11:
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/TimeshiftSegment.h:27:7: warning: ‘ffmpegdirect::TimeshiftSegment’ declared with greater visibility than the type of its field ‘ffmpegdirect::TimeshiftSegment::m_fileHandle’ [-Wattributes]
   27 | class TimeshiftSegment
      |       ^~~~~~~~~~~~~~~~
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/stream/TimeshiftBuffer.h:37:7: warning: ‘ffmpegdirect::TimeshiftBuffer’ declared with greater visibility than the type of its field ‘ffmpegdirect::TimeshiftBuffer::m_segmentIndexFileHandle’ [-Wattributes]
   37 | class TimeshiftBuffer
      |       ^~~~~~~~~~~~~~~
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/StreamManager.cpp: In member function ‘virtual bool InputStreamFFmpegDirect::Open(const kodi::addon::InputstreamProperty&)’:
/home/kodi_build/kodi-addon-inputstream-ffmpegdirect/inputstream.ffmpegdirect/src/StreamManager.cpp:202:84: error: ‘class ffmpegdirect::HttpProxy’ has no member named ‘GetProxyPort’; did you mean ‘SetProxyPort’?
  202 |     kodi::Log(ADDON_LOG_INFO, "HttpProxy port set: %d", static_cast<int>(httpProxy.GetProxyPort()));
      |                                                                                    ^~~~~~~~~~~~
      |                                                                                    SetProxyPort
make[5]: *** [CMakeFiles/inputstream.ffmpegdirect.dir/build.make:76: CMakeFiles/inputstream.ffmpegdirect.dir/src/StreamManager.cpp.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:110: CMakeFiles/inputstream.ffmpegdirect.dir/all] Error 2
make[3]: *** [Makefile:156: all] Error 2
make[2]: *** [CMakeFiles/inputstream.ffmpegdirect.dir/build.make:88: inputstream.ffmpegdirect-prefix/src/inputstream.ffmpegdirect-stamp/inputstream.ffmpegdirect-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:162: CMakeFiles/inputstream.ffmpegdirect.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
phunkyfish commented 1 year ago

What platform are you compiling for?

noguxx commented 1 year ago

What platform are you compiling for?

I'm compiling for a Arch install x86_64, the official repos don't have the package for inputstream.ffmpegdirect.

phunkyfish commented 1 year ago

Try making the changes in this commit and it should work:

https://github.com/xbmc/inputstream.ffmpegdirect/pull/252/commits/03b3b6d85a6cac2961a143726052e8b9a56f6dc7

phunkyfish commented 1 year ago

I'll add that commit to the Nexus branch shortly.

phunkyfish commented 1 year ago

Done: https://github.com/xbmc/inputstream.ffmpegdirect/pull/257