undo code style changes and whitespace changes

This commit is contained in:
Isaac Connor 2016-04-01 15:30:30 -04:00
parent 58c39f930e
commit 89598da5c1
1 changed files with 16 additions and 14 deletions

View File

@ -176,8 +176,9 @@ int FfmpegCamera::Capture( Image &image )
return( -1 ); return( -1 );
} }
Debug( 5, "Got packet from stream %d", packet.stream_index ); Debug( 5, "Got packet from stream %d", packet.stream_index );
// What about audio stream? // What about audio stream? Maybe someday we could do sound detection...
if ( packet.stream_index == mVideoStreamId ) { if ( packet.stream_index == mVideoStreamId )
{
#if LIBAVCODEC_VERSION_CHECK(52, 23, 0, 23, 0) #if LIBAVCODEC_VERSION_CHECK(52, 23, 0, 23, 0)
if ( avcodec_decode_video2( mCodecContext, mRawFrame, &frameComplete, &packet ) < 0 ) if ( avcodec_decode_video2( mCodecContext, mRawFrame, &frameComplete, &packet ) < 0 )
#else #else
@ -218,7 +219,7 @@ int FfmpegCamera::Capture( Image &image )
#endif #endif
} // end while ! frameComplete } // end while ! frameComplete
return (0); return (0);
} } // FfmpegCamera::Capture
int FfmpegCamera::PostCapture() int FfmpegCamera::PostCapture()
{ {
@ -313,7 +314,8 @@ int FfmpegCamera::OpenFfmpeg() {
// Find first video stream present // Find first video stream present
mVideoStreamId = -1; mVideoStreamId = -1;
for (unsigned int i=0; i < mFormatContext->nb_streams; i++ ) { for (unsigned int i=0; i < mFormatContext->nb_streams; i++ )
{
#if (LIBAVCODEC_VERSION_CHECK(52, 64, 0, 64, 0) || LIBAVUTIL_VERSION_CHECK(50, 14, 0, 14, 0)) #if (LIBAVCODEC_VERSION_CHECK(52, 64, 0, 64, 0) || LIBAVUTIL_VERSION_CHECK(50, 14, 0, 14, 0))
if ( mFormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO ) if ( mFormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO )
#else #else