Browse Source

Fixed unrecognized Pixel Format of the stream

pull/7/head
Evgeny Gagua 3 months ago
parent
commit
6ebca5096b
  1. 6
      Projects/la_mojo/build
  2. 4
      lib/App/common/deviceNodeCamera.cpp
  3. 4
      lib/App/common/kernelModuleEmbedVideo.cpp
  4. 6
      lib/data/media/video/videoAVLIBSource.cpp

6
Projects/la_mojo/build

@ -5,10 +5,10 @@
#make -e "CFG=Debug" -j$(nproc)
#make clean -e "CFG=LRF_Proxy_ONLY"
make -e "CFG=LRF_Proxy_ONLY" -j$(nproc)
#make -e "CFG=LRF_Proxy_ONLY" -j$(nproc)
#make clean -e "CFG=Debug86"
#make -e "CFG=Debug86" -j$(nproc)
make clean -e "CFG=Debug86"
make -e "CFG=Debug86" -j$(nproc)
#cd Debug86
#strip ./mojo_d
#cd ..

4
lib/App/common/deviceNodeCamera.cpp

@ -15,7 +15,7 @@
#define LOG(X) deviceNode::m_pLog->Log("RCAM", this, X)
// #define DEBUG_EXTRA
//#define DEBUG_EXTRA
#ifdef DEBUG
#define LOG_ERROR(X) \
@ -2883,4 +2883,4 @@ CSTR deviceNodeCamera::getPresetToken(uint8_t specialRole)
#undef LOG
#undef LOG_ERROR
// #undef DEBUG_EXTRA
//#undef DEBUG_EXTRA

4
lib/App/common/kernelModuleEmbedVideo.cpp

@ -2294,7 +2294,7 @@ bool kernelModuleEmbedVideo::registerStream(uint32_t streamID, uint8_t flip_mode
return true;
};
#ifdef DEBUG_EXTRA
LOG( "Create New StreamHabdler!" );
LOG( "Create New Stream Handler!" );
#endif
if ((m_sEmbedVideoData.output_mode & EVE_OUTPUT_VIDEO) != EVE_OUTPUT_VIDEO)
@ -2329,7 +2329,7 @@ bool kernelModuleEmbedVideo::registerStream(uint32_t streamID, uint8_t flip_mode
catch (const std::out_of_range & oor)
{
#ifdef DEBUG_EXTRA
LOG("Exception Catched!");
LOG("Exception Catched - Stream Handler not found in collection!");
#endif
streamHandler * tSH = NULL;
// Create New One

6
lib/data/media/video/videoAVLIBSource.cpp

@ -888,7 +888,11 @@ bool videoAVLIBSource::_open(char * URI, bool ShowDeviceMenu, float framerate, i
sprintf(tB, "swsPar: IN: %dx%d [%d] OUT: %dx%d [%d] {%d}", m_pVideoState->m_pCodecCtx->width, m_pVideoState->m_pCodecCtx->height, m_pVideoState->m_pCodecCtx->pix_fmt, m_nOutWidth, m_nOutHeight, AV_PIX_FMT_BGR24, SWS_BICUBIC);
LOG(tB);
#endif
m_pVideoState->m_pSwsCtx = sws_getContext(m_pVideoState->m_pCodecCtx->width, m_pVideoState->m_pCodecCtx->height, m_pVideoState->m_pCodecCtx->pix_fmt, m_nOutWidth, m_nOutHeight, AV_PIX_FMT_BGR24,
if ( m_pVideoState->m_pCodecCtx->pix_fmt < 0 ) {
LOG_ERROR("Error Detectin Pixel Format of the stream!!");
return false;
};
m_pVideoState->m_pSwsCtx = sws_getContext(m_pVideoState->m_pCodecCtx->width, m_pVideoState->m_pCodecCtx->height, m_pVideoState->m_pCodecCtx->pix_fmt, m_nOutWidth, m_nOutHeight, AV_PIX_FMT_BGR24,
SWS_BICUBIC, // SWS_FAST_BILINEAR,// | SWS_ACCURATE_RND,//SWS_BILINEAR,//SWS_BICUBIC,
NULL, NULL, NULL);

Loading…
Cancel
Save