Converted osg::notify to OSG_INFO etc.
This commit is contained in:
@@ -35,7 +35,7 @@ FFmpegAudioStream::~FFmpegAudioStream()
|
||||
|
||||
void FFmpegAudioStream::setAudioSink(osg::AudioSink* audio_sink)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"FFmpegAudioStream::setAudioSink( "<<audio_sink<<")"<<std::endl;
|
||||
OSG_NOTICE<<"FFmpegAudioStream::setAudioSink( "<<audio_sink<<")"<<std::endl;
|
||||
m_decoder->audio_decoder().setAudioSink(audio_sink);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ bool FFmpegDecoder::open(const std::string & filename)
|
||||
{
|
||||
avdevice_register_all();
|
||||
|
||||
osg::notify(osg::NOTICE)<<"Attempting to stream "<<filename<<std::endl;
|
||||
OSG_NOTICE<<"Attempting to stream "<<filename<<std::endl;
|
||||
|
||||
AVFormatParameters formatParams;
|
||||
memset(&formatParams, 0, sizeof(AVFormatParameters));
|
||||
@@ -70,11 +70,11 @@ bool FFmpegDecoder::open(const std::string & filename)
|
||||
|
||||
if (iformat)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Found input format: "<<format<<std::endl;
|
||||
OSG_NOTICE<<"Found input format: "<<format<<std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Failed to find input format: "<<format<<std::endl;
|
||||
OSG_NOTICE<<"Failed to find input format: "<<format<<std::endl;
|
||||
}
|
||||
|
||||
int error = av_open_input_file(&p_format_context, filename.c_str(), iformat, 0, &formatParams);
|
||||
@@ -133,13 +133,13 @@ bool FFmpegDecoder::open(const std::string & filename)
|
||||
|
||||
catch (const std::runtime_error & error)
|
||||
{
|
||||
osg::notify(osg::WARN) << "FFmpegImageStream::open audio failed, audio stream will be disabled: " << error.what() << std::endl;
|
||||
OSG_WARN << "FFmpegImageStream::open audio failed, audio stream will be disabled: " << error.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
catch (const std::runtime_error & error)
|
||||
{
|
||||
osg::notify(osg::WARN) << "FFmpegImageStream::open : " << error.what() << std::endl;
|
||||
OSG_WARN << "FFmpegImageStream::open : " << error.what() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class FormatContextPtr
|
||||
{
|
||||
if (_ptr)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Calling av_close_input_file("<<_ptr<<")"<<std::endl;
|
||||
OSG_NOTICE<<"Calling av_close_input_file("<<_ptr<<")"<<std::endl;
|
||||
av_close_input_file(_ptr);
|
||||
}
|
||||
_ptr = 0;
|
||||
|
||||
@@ -157,12 +157,12 @@ void FFmpegDecoderAudio::run()
|
||||
|
||||
catch (const std::exception & error)
|
||||
{
|
||||
osg::notify(osg::WARN) << "FFmpegDecoderAudio::run : " << error.what() << std::endl;
|
||||
OSG_WARN << "FFmpegDecoderAudio::run : " << error.what() << std::endl;
|
||||
}
|
||||
|
||||
catch (...)
|
||||
{
|
||||
osg::notify(osg::WARN) << "FFmpegDecoderAudio::run : unhandled exception" << std::endl;
|
||||
OSG_WARN << "FFmpegDecoderAudio::run : unhandled exception" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ void FFmpegDecoderAudio::run()
|
||||
void FFmpegDecoderAudio::setAudioSink(osg::ref_ptr<osg::AudioSink> audio_sink)
|
||||
{
|
||||
// The FFmpegDecoderAudio object takes the responsability of destroying the audio_sink.
|
||||
osg::notify(osg::NOTICE)<<"Assigning "<<audio_sink<<std::endl;
|
||||
OSG_NOTICE<<"Assigning "<<audio_sink<<std::endl;
|
||||
m_audio_sink = audio_sink;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ FFmpegDecoderVideo::FFmpegDecoderVideo(PacketQueue & packets, FFmpegClocks & clo
|
||||
|
||||
FFmpegDecoderVideo::~FFmpegDecoderVideo()
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Destructing FFmpegDecoderVideo..."<<std::endl;
|
||||
OSG_INFO<<"Destructing FFmpegDecoderVideo..."<<std::endl;
|
||||
|
||||
|
||||
if (isRunning())
|
||||
@@ -76,7 +76,7 @@ FFmpegDecoderVideo::~FFmpegDecoderVideo()
|
||||
}
|
||||
#endif
|
||||
|
||||
osg::notify(osg::INFO)<<"Destructed FFmpegDecoderVideo"<<std::endl;
|
||||
OSG_INFO<<"Destructed FFmpegDecoderVideo"<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,12 +157,12 @@ void FFmpegDecoderVideo::run()
|
||||
|
||||
catch (const std::exception & error)
|
||||
{
|
||||
osg::notify(osg::WARN) << "FFmpegDecoderVideo::run : " << error.what() << std::endl;
|
||||
OSG_WARN << "FFmpegDecoderVideo::run : " << error.what() << std::endl;
|
||||
}
|
||||
|
||||
catch (...)
|
||||
{
|
||||
osg::notify(osg::WARN) << "FFmpegDecoderVideo::run : unhandled exception" << std::endl;
|
||||
OSG_WARN << "FFmpegDecoderVideo::run : unhandled exception" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,21 +282,21 @@ int FFmpegDecoderVideo::convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src,
|
||||
}
|
||||
|
||||
|
||||
osg::notify(osg::INFO)<<"Using sws_scale ";
|
||||
OSG_INFO<<"Using sws_scale ";
|
||||
|
||||
int result = sws_scale(m_swscale_ctx,
|
||||
(src->data), (src->linesize), 0, src_height,
|
||||
(dst->data), (dst->linesize));
|
||||
#else
|
||||
|
||||
osg::notify(osg::INFO)<<"Using img_convert ";
|
||||
OSG_INFO<<"Using img_convert ";
|
||||
|
||||
int result = img_convert(dst, dst_pix_fmt, src,
|
||||
src_pix_fmt, src_width, src_height);
|
||||
|
||||
#endif
|
||||
osg::Timer_t endTick = osg::Timer::instance()->tick();
|
||||
osg::notify(osg::INFO)<<" time = "<<osg::Timer::instance()->delta_m(startTick,endTick)<<"ms"<<std::endl;
|
||||
OSG_INFO<<" time = "<<osg::Timer::instance()->delta_m(startTick,endTick)<<"ms"<<std::endl;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -39,11 +39,11 @@ FFmpegImageStream::FFmpegImageStream(const FFmpegImageStream & image, const osg:
|
||||
|
||||
FFmpegImageStream::~FFmpegImageStream()
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Destructing FFmpegImageStream..."<<std::endl;
|
||||
OSG_INFO<<"Destructing FFmpegImageStream..."<<std::endl;
|
||||
|
||||
quit(true);
|
||||
|
||||
osg::notify(osg::INFO)<<"Have done quit"<<std::endl;
|
||||
OSG_INFO<<"Have done quit"<<std::endl;
|
||||
|
||||
// release athe audio streams to make sure that the decoder doesn't retain any external
|
||||
// refences.
|
||||
@@ -55,7 +55,7 @@ FFmpegImageStream::~FFmpegImageStream()
|
||||
|
||||
delete m_commands;
|
||||
|
||||
osg::notify(osg::INFO)<<"Destructed FFMpegImageStream."<<std::endl;
|
||||
OSG_INFO<<"Destructed FFMpegImageStream."<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ bool FFmpegImageStream::open(const std::string & filename)
|
||||
|
||||
setPixelAspectRatio(m_decoder->video_decoder().pixelAspectRatio());
|
||||
|
||||
osg::notify(osg::NOTICE)<<"ffmpeg::open("<<filename<<") size("<<s()<<", "<<t()<<") aspect ratio "<<m_decoder->video_decoder().pixelAspectRatio()<<std::endl;
|
||||
OSG_NOTICE<<"ffmpeg::open("<<filename<<") size("<<s()<<", "<<t()<<") aspect ratio "<<m_decoder->video_decoder().pixelAspectRatio()<<std::endl;
|
||||
|
||||
#if 1
|
||||
// swscale is reported errors and then crashing when rescaling video of size less than 10 by 10.
|
||||
@@ -87,7 +87,7 @@ bool FFmpegImageStream::open(const std::string & filename)
|
||||
|
||||
if (m_decoder->audio_decoder().validContext())
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Attaching FFmpegAudioStream"<<std::endl;
|
||||
OSG_NOTICE<<"Attaching FFmpegAudioStream"<<std::endl;
|
||||
|
||||
getAudioStreams().push_back(new FFmpegAudioStream(m_decoder.get()));
|
||||
}
|
||||
@@ -218,15 +218,15 @@ void FFmpegImageStream::run()
|
||||
|
||||
catch (const std::exception & error)
|
||||
{
|
||||
osg::notify(osg::WARN) << "FFmpegImageStream::run : " << error.what() << std::endl;
|
||||
OSG_WARN << "FFmpegImageStream::run : " << error.what() << std::endl;
|
||||
}
|
||||
|
||||
catch (...)
|
||||
{
|
||||
osg::notify(osg::WARN) << "FFmpegImageStream::run : unhandled exception" << std::endl;
|
||||
OSG_WARN << "FFmpegImageStream::run : unhandled exception" << std::endl;
|
||||
}
|
||||
|
||||
osg::notify(osg::NOTICE)<<"Finished FFmpegImageStream::run()"<<std::endl;
|
||||
OSG_NOTICE<<"Finished FFmpegImageStream::run()"<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
|
||||
ReadResult readImageStream(const std::string& filename, const osgDB::ReaderWriter::Options * options) const
|
||||
{
|
||||
osg::notify(osg::INFO) << "ReaderWriterFFmpeg::readImage " << filename << std::endl;
|
||||
OSG_INFO << "ReaderWriterFFmpeg::readImage " << filename << std::endl;
|
||||
|
||||
osg::ref_ptr<osgFFmpeg::FFmpegImageStream> image_stream(new osgFFmpeg::FFmpegImageStream);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user