Skip to content

Commit 4e4fe60

Browse files
committed
Merge pull request #59 from cchampet/clean_encoders_decoders
Clean encoders / decoders
2 parents c07fe43 + 81059ac commit 4e4fe60

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

src/AvTranscoder/decoder/VideoDecoder.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ VideoDecoder::~VideoDecoder()
4242

4343
void VideoDecoder::setup()
4444
{
45-
4645
_inputStream->getVideoCodec().open();
4746

4847
#if LIBAVCODEC_VERSION_MAJOR > 54
@@ -134,7 +133,7 @@ void VideoDecoder::setProfile( const ProfileLoader::Profile& profile )
134133
}
135134
catch( std::exception& e )
136135
{
137-
std::cout << "[InputVideo] warning - can't set option " << (*it).first << " to " << (*it).second << ": " << e.what() << std::endl;
136+
std::cout << "[VideoDecoder] warning - can't set option " << (*it).first << " to " << (*it).second << ": " << e.what() << std::endl;
138137
}
139138
}
140139
}

src/AvTranscoder/encoder/AudioEncoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void AudioEncoder::setProfile( const ProfileLoader::Profile& profile, const Audi
187187
}
188188
catch( std::exception& e )
189189
{
190-
std::cout << "[OutputAudio] warning - can't set option " << (*it).first << " to " << (*it).second << ": " << e.what() << std::endl;
190+
std::cout << "[AudioEncoder] warning - can't set option " << (*it).first << " to " << (*it).second << ": " << e.what() << std::endl;
191191
}
192192
}
193193
}

src/AvTranscoder/encoder/VideoEncoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void VideoEncoder::setProfile( const ProfileLoader::Profile& profile, const avtr
176176
}
177177
catch( std::exception& e )
178178
{
179-
std::cout << "[OutputVideo] warning - can't set option " << (*it).first << " to " << (*it).second << ": " << e.what() << std::endl;
179+
std::cout << "[VideoEncoder] warning - can't set option " << (*it).first << " to " << (*it).second << ": " << e.what() << std::endl;
180180
}
181181
}
182182
}

src/AvTranscoder/frame/AudioFrame.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ namespace avtranscoder
1717
class AvExport AudioFrameDesc
1818
{
1919
public:
20+
/**
21+
* @warning FPS value is set to 25 by default
22+
*/
2023
AudioFrameDesc( const size_t sampleRate = 0, const size_t channels = 0, const AVSampleFormat sampleFormat = AV_SAMPLE_FMT_NONE )
2124
: _sampleRate( sampleRate )
2225
, _channels( channels )
2326
, _sampleFormat( sampleFormat )
2427
, _fps( 25. )
2528
{}
29+
/**
30+
* @warning FPS value is set to 25 by default
31+
*/
2632
AudioFrameDesc( const size_t sampleRate, const size_t channels, const std::string& sampleFormat )
2733
: _sampleRate( sampleRate )
2834
, _channels( channels )

src/AvTranscoder/stream/InputStream.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ VideoCodec& InputStream::getVideoCodec()
8989
throw std::runtime_error( "unable to get video descriptor on non-video stream" );
9090
}
9191

92-
return *static_cast<VideoCodec*>( _codec );;
92+
return *static_cast<VideoCodec*>( _codec );
9393
}
9494

9595
AudioCodec& InputStream::getAudioCodec()
@@ -101,7 +101,7 @@ AudioCodec& InputStream::getAudioCodec()
101101
throw std::runtime_error( "unable to get audio descriptor on non-audio stream" );
102102
}
103103

104-
return *static_cast<AudioCodec*>( _codec );;
104+
return *static_cast<AudioCodec*>( _codec );
105105
}
106106

107107
DataCodec& InputStream::getDataCodec()
@@ -113,7 +113,7 @@ DataCodec& InputStream::getDataCodec()
113113
throw std::runtime_error( "unable to get data descriptor on non-data stream" );
114114
}
115115

116-
return *static_cast<DataCodec*>( _codec );;
116+
return *static_cast<DataCodec*>( _codec );
117117
}
118118

119119
AVMediaType InputStream::getStreamType() const

0 commit comments

Comments
 (0)