@@ -15,7 +15,7 @@ FormatContext::FormatContext( const std::string& filename, int req_flags, AVDict
15
15
int ret = avformat_open_input ( &_avFormatContext, filename.c_str (), NULL , options );
16
16
if ( ret < 0 )
17
17
{
18
- std::string msg = " unable to open file " ;
18
+ std::string msg = " Unable to open file " ;
19
19
msg += filename;
20
20
msg += " : " ;
21
21
msg += getDescriptionFromErrorCode ( ret );
@@ -56,7 +56,7 @@ void FormatContext::findStreamInfo( AVDictionary** options )
56
56
int err = avformat_find_stream_info ( _avFormatContext, options );
57
57
if ( err < 0 )
58
58
{
59
- throw std::ios_base::failure ( " unable to find stream informations: " + getDescriptionFromErrorCode ( err ) );
59
+ throw std::ios_base::failure ( " Unable to find stream informations: " + getDescriptionFromErrorCode ( err ) );
60
60
}
61
61
}
62
62
@@ -68,7 +68,7 @@ void FormatContext::openRessource( const std::string& url, int flags )
68
68
int err = avio_open2 ( &_avFormatContext->pb , url.c_str (), flags, NULL , NULL );
69
69
if ( err < 0 )
70
70
{
71
- throw std::ios_base::failure ( " error when opening output format: " + getDescriptionFromErrorCode ( err ) );
71
+ throw std::ios_base::failure ( " Error when opening output format: " + getDescriptionFromErrorCode ( err ) );
72
72
}
73
73
}
74
74
@@ -80,7 +80,7 @@ void FormatContext::closeRessource()
80
80
int err = avio_close ( _avFormatContext->pb );
81
81
if ( err < 0 )
82
82
{
83
- throw std::ios_base::failure ( " error when close output format: " + getDescriptionFromErrorCode ( err ) );
83
+ throw std::ios_base::failure ( " Error when close output format: " + getDescriptionFromErrorCode ( err ) );
84
84
}
85
85
}
86
86
@@ -89,7 +89,7 @@ void FormatContext::writeHeader( AVDictionary** options )
89
89
int ret = avformat_write_header ( _avFormatContext, options );
90
90
if ( ret != 0 )
91
91
{
92
- throw std::runtime_error ( " could not write header: " + getDescriptionFromErrorCode ( ret ) );
92
+ throw std::runtime_error ( " Could not write header: " + getDescriptionFromErrorCode ( ret ) );
93
93
}
94
94
// when muxing, priv_data of AVFormatContext is set by avformat_write_header()
95
95
if ( _avFormatContext->oformat ->priv_class )
@@ -109,7 +109,7 @@ void FormatContext::writeFrame( AVPacket& packet, bool interleaved )
109
109
110
110
if ( ret < 0 )
111
111
{
112
- throw std::runtime_error ( " error when writting packet in stream: " + getDescriptionFromErrorCode ( ret ) );
112
+ throw std::runtime_error ( " Error when writting packet in stream: " + getDescriptionFromErrorCode ( ret ) );
113
113
}
114
114
}
115
115
@@ -118,7 +118,7 @@ void FormatContext::writeTrailer()
118
118
int ret = av_write_trailer ( _avFormatContext );
119
119
if ( ret != 0 )
120
120
{
121
- throw std::runtime_error ( " could not write trailer: " + getDescriptionFromErrorCode ( ret ) );
121
+ throw std::runtime_error ( " Could not write trailer: " + getDescriptionFromErrorCode ( ret ) );
122
122
}
123
123
}
124
124
@@ -137,7 +137,7 @@ AVStream& FormatContext::addAVStream( const AVCodec& avCodec )
137
137
AVStream* stream = avformat_new_stream ( _avFormatContext, const_cast <AVCodec*>(&avCodec) );
138
138
if ( stream == NULL )
139
139
{
140
- throw std::runtime_error ( " unable to add new video stream" );
140
+ throw std::runtime_error ( " Unable to add new video stream" );
141
141
}
142
142
return *stream;
143
143
}
@@ -189,7 +189,7 @@ void FormatContext::setOutputFormat( const std::string& filename, const std::str
189
189
AVOutputFormat* oformat = av_guess_format ( shortName.c_str (), filename.c_str (), mimeType.c_str () );
190
190
if ( ! oformat )
191
191
{
192
- std::string msg ( " unable to find format for " );
192
+ std::string msg ( " Unable to find format for " );
193
193
msg += filename;
194
194
if ( ! shortName.empty () )
195
195
{
0 commit comments