Browse Source

Fixed minor bugs And Local Video Source Resource validation (WebCam Issue)

pull/7/head
Evgeny Gagua 10 months ago
parent
commit
0be7f21bf8
  1. 4
      Projects/la_mojo/la_mojo.vpj
  2. 4
      Projects/la_mojo/makefile
  3. 4
      lib/App/common/hardwareManager.cpp
  4. 4
      lib/App/common/hardwareResourceVideoProvider.cpp
  5. 4
      lib/App/common/kernelEventFilterBubble.cpp
  6. 3
      lib/App/mojo/mojoBackend.cpp
  7. 1
      lib/components/base/basicSettingsProvider.cpp

4
Projects/la_mojo/la_mojo.vpj

@ -392,7 +392,7 @@
SaveOption="SaveCurrent"
RunFromDir="%rw">
<Exec
CmdLine='g++ -c %xup -x c++ %defd -O3 -g -ggdb -w -Wpointer-arith %~other -o "%bd%n%oe" %i %f'
CmdLine='g++ -c %xup -x c++ %defd -O3 -w -Wpointer-arith %~other -o "%bd%n%oe" %i %f'
OtherOptions="-std=c++11 -Wno-write-strings -I../../lib/include `pkg-config opencv4 libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswresample libswscale live555 --cflags`"/>
</Target>
<Target
@ -404,7 +404,7 @@
Deletable="0"
SaveOption="SaveCurrent"
RunFromDir="%rw">
<Exec CmdLine='g++ %xup -O3 -g -ggdb -w -o "%o" %objs'/>
<Exec CmdLine='g++ %xup -O3 -w -o "%o" %objs'/>
</Target>
<Target
Name="Build"

4
Projects/la_mojo/makefile

@ -743,8 +743,8 @@ ALL_OBJ=$(OUTDIR)/base64.o $(OUTDIR)/basicCameraInfo.o \
opencv4 rdkafka++` -lliveMedia -lgroupsock -lBasicUsageEnvironment \
-lUsageEnvironment
COMPILE=g++ -c -x c++ "-D__STDC_CONSTANT_MACROS" "-D_CLIENT_APPLICATION_" "-D_OPENCV_" -O3 -g -ggdb -w -Wpointer-arith -std=c++11 -Wno-write-strings -I../../lib/include `pkg-config opencv4 libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswresample libswscale live555 --cflags` -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=g++ -O3 -g -ggdb -w -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE=g++ -c -x c++ "-D__STDC_CONSTANT_MACROS" "-D_CLIENT_APPLICATION_" "-D_OPENCV_" -O3 -w -Wpointer-arith -std=c++11 -Wno-write-strings -I../../lib/include `pkg-config opencv4 libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswresample libswscale live555 --cflags` -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=g++ -O3 -w -o "$(OUTFILE)" $(ALL_OBJ)
# Pattern rules
$(OUTDIR)/%.o : ../../lib/components/object/%.cpp

4
lib/App/common/hardwareManager.cpp

@ -376,7 +376,7 @@ bool hardwareManager::validate( void ){
// recreate Resource
LOG_ERROR( "HW Resource Invalid!" );
m_pDBC->setRessourceActive( (*idx)->getDbId(), false );
#ifdef DEBUG
#ifndef DEBUG
char tB[256];
sprintf( tB, "Info: DBID[%d] R-Type: %d Provider: %d ", (*idx)->getDbId(), (*idx)->getHardwareType(), (*idx)->getProviderType() );
LOG( tB );
@ -386,7 +386,7 @@ bool hardwareManager::validate( void ){
} else {
m_pDBC->setRessourceActive( (*idx)->getDbId() );
#ifdef DEBUG
#ifndef DEBUG
LOG("Re-Created OK");
#endif
};

4
lib/App/common/hardwareResourceVideoProvider.cpp

@ -37,12 +37,14 @@ bool hardwareResourceVideoProvider::create( void ){
LOG("Creating Local Video Source!");
if( m_pDBC->updateLocalCam( m_sStreamData.source_id ) ){
LOG("Cam Updated!");
return m_pDBC->setStreamValid( m_sStreamData.id );
return m_bValid = m_pDBC->setStreamValid( m_sStreamData.id );
};
LOG("Cam NOT! Updated!");
return false;
};
#undef LOG
#undef LOG_ERROR

4
lib/App/common/kernelEventFilterBubble.cpp

@ -122,7 +122,7 @@ bool kernelEventFilterBubble::initFilter(){
};
delete( tList );
};
m_bActive = init();
return m_bActive = init();
};
void kernelEventFilterBubble::m_fThreadProc( void ){
@ -348,7 +348,7 @@ bool kernelEventFilterBubble::popSessionBubbles(){
m_mDataProtector.lock();
if ( m_vTargetBubbles.size() ) {
//Erase All
for (V_TARGET_SEGMENTS::iterator idx = m_vTargetBubbles.begin(); idx != m_vTargetBubbles.end(); ) free(*idx);
for (V_TARGET_SEGMENTS::iterator idx = m_vTargetBubbles.begin(); idx != m_vTargetBubbles.end(); idx++ ) free(*idx);
m_vTargetBubbles.clear();
};
DBC_INT_LIST *tList = m_pDBC->listFrozenBubbles( m_sBubbleFilterData.min_block_counts );

3
lib/App/mojo/mojoBackend.cpp

@ -395,6 +395,7 @@ int main( int argc, char *argv[] ){
// Clear to start Service
m_pLog = basicLogCollection::getInstance( _LOG_LVL_TIME_PTR );
#ifndef DEBUG
m_pLog->setLogLevel( _LOG_ERROR ); // Most Silent Mode
#else
@ -407,7 +408,7 @@ int main( int argc, char *argv[] ){
m_pLog->setLogLevel( _LOG_ALL );
#endif
#endif
#endif
#endif
if ( FLE ){// Init File Logging Engine
m_pLog->addHandler((basicLoggingService *) new objectFileLoggingService( FLE_NAME ));

1
lib/components/base/basicSettingsProvider.cpp

@ -49,6 +49,7 @@ basicSettingsProvider::~basicSettingsProvider(){
};
bool basicSettingsProvider::load( void ){
m_bModified = false;
if( fileExist( m_pFileName ) ) {
if( !config_read_file( &m_sCfg, m_pFileName ) ){
//fprintf( stderr, "%s:%d - %s\n", config_error_file( &m_sCfg ), config_error_line( &m_sCfg ), config_error_text( &m_sCfg ) );

Loading…
Cancel
Save