Skip to content

Commit 82f7af1

Browse files
author
Clement Champetier
committed
Profile: remove width and height
OuputVideo: width and height are set from the imageDesc. These informations are not in the profile.
1 parent 0a2ef1a commit 82f7af1

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

src/AvTranscoder/EssenceStream/OutputVideo.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,6 @@ void OutputVideo::setProfile( Profile::ProfileDesc& desc, const avtranscoder::Im
195195
throw std::runtime_error( "The profile " + desc[ Profile::avProfileIdentificatorHuman ] + " is invalid." );
196196
}
197197

198-
if( ( desc.count( Profile::avProfileWidth ) && std::strtoul( desc[ Profile::avProfileWidth ].c_str(), NULL, 0 ) != imageDesc.getWidth() ) ||
199-
( desc.count( Profile::avProfileHeight ) && std::strtoul( desc[ Profile::avProfileHeight ].c_str(), NULL, 0 ) != imageDesc.getHeight() ) )
200-
{
201-
throw std::runtime_error( "Invalid imageDesc with the profile " + desc[ Profile::avProfileIdentificatorHuman ] + "." );
202-
}
203-
204198
_videoDesc.setVideoCodec( desc[ Profile::avProfileCodec ] );
205199

206200
const size_t frameRate = std::strtoul( desc[ Profile::avProfileFrameRate ].c_str(), NULL, 0 );
@@ -215,8 +209,6 @@ void OutputVideo::setProfile( Profile::ProfileDesc& desc, const avtranscoder::Im
215209
(*it).first == Profile::avProfileType ||
216210
(*it).first == Profile::avProfileCodec ||
217211
(*it).first == Profile::avProfilePixelFormat ||
218-
(*it).first == Profile::avProfileWidth ||
219-
(*it).first == Profile::avProfileHeight ||
220212
(*it).first == Profile::avProfileFrameRate )
221213
continue;
222214

@@ -239,8 +231,6 @@ void OutputVideo::setProfile( Profile::ProfileDesc& desc, const avtranscoder::Im
239231
(*it).first == Profile::avProfileType ||
240232
(*it).first == Profile::avProfileCodec ||
241233
(*it).first == Profile::avProfilePixelFormat ||
242-
(*it).first == Profile::avProfileWidth ||
243-
(*it).first == Profile::avProfileHeight ||
244234
(*it).first == Profile::avProfileFrameRate )
245235
continue;
246236

src/AvTranscoder/Profile.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ const std::string Profile::avProfileSampleFormat( "sample_fmt" );
2525
const std::string Profile::avProfileFrameRate( "r" );
2626
const std::string Profile::avProfileSampleRate( "ar" );
2727
const std::string Profile::avProfileChannel( "ac" );
28-
const std::string Profile::avProfileWidth( "width" );
29-
const std::string Profile::avProfileHeight( "height" );
3028

3129
Profile::Profile( bool autoload )
3230
{

src/AvTranscoder/Profile.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ class Profile
2525
static const std::string avProfileFrameRate;
2626
static const std::string avProfileSampleRate;
2727
static const std::string avProfileChannel;
28-
29-
static const std::string avProfileWidth;
30-
static const std::string avProfileHeight;
3128

3229
public:
3330
// typedef std::pair< std::string, std::string > KeyDesc;

0 commit comments

Comments
 (0)