diff --git a/src/zm_remote_camera_rtsp.cpp b/src/zm_remote_camera_rtsp.cpp index 29d2bed52..a6549fd50 100644 --- a/src/zm_remote_camera_rtsp.cpp +++ b/src/zm_remote_camera_rtsp.cpp @@ -24,9 +24,6 @@ #include "zm_remote_camera_rtsp.h" #include "zm_ffmpeg.h" #include "zm_mem_utils.h" -extern "C" { -#include "zm_sdp.h" -} #include #include diff --git a/src/zm_remote_camera_rtsp.h b/src/zm_remote_camera_rtsp.h index 480589fb2..495f32781 100644 --- a/src/zm_remote_camera_rtsp.h +++ b/src/zm_remote_camera_rtsp.h @@ -41,10 +41,8 @@ protected: int rtcp_sd; Buffer buffer; - //enum { RTP_UNICAST, RTP_MULTICAST, RTP_RTSP, RTP_RTSP_HTTP } method; - RtspThread::RtspMethod method; - enum { UNDEF, JPEG, X_RGB, X_RGBZ } format; + RtspThread::RtspMethod method; RtspThread *rtspThread; diff --git a/src/zm_rtsp.cpp b/src/zm_rtsp.cpp index 01e70424c..aaddba722 100644 --- a/src/zm_rtsp.cpp +++ b/src/zm_rtsp.cpp @@ -282,30 +282,6 @@ int RtspThread::run() std::string localHost = ""; int localPorts[2] = { 0, 0 }; - //message = "OPTIONS * RTSP/1.0\r\n"; - //sendCommand( message ); - //recvResponse( response ); - -#if 0 - - // Old method, now deprecated - message = "DESCRIBE "+mUrl+" RTSP/1.0\r\n"; - if ( !sendCommand( message ) ) - return( -1 ); - sleep( 1 ); - if ( !recvResponse( response ) ) - return( -1 ); - - RTSPState *rtsp_st = new RTSPState; - rtsp_st->nb_rtsp_streams = 0; - rtsp_st->rtsp_streams = NULL; - mFormatContext->priv_data = rtsp_st; - - // initialize our format context from the sdp description. - sdp_parse( mFormatContext, response.c_str() ); - -#else - // New method using ffmpeg native functions std::string tempUrl = mUrl; if ( !mAuth.empty() ) @@ -320,9 +296,10 @@ int RtspThread::run() } } if ( av_open_input_file( &mFormatContext, tempUrl.c_str(), NULL, 0, NULL ) != 0 ) + { + Error( "Unable to open input '%s'", tempUrl.c_str() ); return( -1 ); - -#endif + } U32 rtpClock = 0; std::string trackUrl = mUrl; diff --git a/src/zm_rtsp.h b/src/zm_rtsp.h index b51e81c72..024a324dd 100644 --- a/src/zm_rtsp.h +++ b/src/zm_rtsp.h @@ -26,10 +26,6 @@ #include "zm_thread.h" #include "zm_rtp_source.h" -extern "C" { -#include "zm_sdp.h" -} - #include #include diff --git a/src/zm_sdp.h b/src/zm_sdp.h deleted file mode 100644 index ae8cd0002..000000000 --- a/src/zm_sdp.h +++ /dev/null @@ -1,37 +0,0 @@ -#if 0 -#ifndef ZM_SDP_H -#define ZM_SDP_H - -#if HAVE_LIBAVFORMAT_AVFORMAT_H -#include -#elif HAVE_FFMPEG_AVFORMAT_H -#include -#else -#error "No location for avformat.h found" -#endif - -// -// Part of libavformat/rtp.h -// - -// -// Part of libavformat/rtp_internal.h -// - -// -// Part of libavformat/rtp.h -// - -// -// Part of libavformat/rtsp.c -// - -// -// Declaration from libavformat/rtsp.c -// -void av_register_rtp_dynamic_payload_handlers(void); - -int sdp_parse(AVFormatContext *s, const char *content); - -#endif // ZM_SDP_H -#endif