Skip to content

Commit bc67a2f

Browse files
author
Clement Champetier
committed
FileProperties: rename attribute _streams to _streamsProperties
1 parent 294aa03 commit bc67a2f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/AvTranscoder/properties/FileProperties.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ FileProperties::FileProperties(const InputFile& file)
1515
: _file(file)
1616
, _formatContext(&file.getFormatContext())
1717
, _avFormatContext(&file.getFormatContext().getAVFormatContext())
18+
, _streamsProperties()
1819
, _videoStreams()
1920
, _audioStreams()
2021
, _dataStreams()
@@ -92,43 +93,43 @@ void FileProperties::extractStreamProperties(IProgress& progress, const EAnalyse
9293
}
9394

9495
// clear streams
95-
_streams.clear();
96+
_streamsProperties.clear();
9697

9798
// once the streams vectors are filled, add their references the base streams vector
9899
for(size_t streamIndex = 0; streamIndex < _videoStreams.size(); ++streamIndex)
99100
{
100101
const size_t videoStreamIndex = _videoStreams.at(streamIndex).getStreamIndex();
101-
_streams[videoStreamIndex] = &_videoStreams.at(streamIndex);
102+
_streamsProperties[videoStreamIndex] = &_videoStreams.at(streamIndex);
102103
}
103104

104105
for(size_t streamIndex = 0; streamIndex < _audioStreams.size(); ++streamIndex)
105106
{
106107
const size_t audioStreamIndex = _audioStreams.at(streamIndex).getStreamIndex();
107-
_streams[audioStreamIndex] = &_audioStreams.at(streamIndex);
108+
_streamsProperties[audioStreamIndex] = &_audioStreams.at(streamIndex);
108109
}
109110

110111
for(size_t streamIndex = 0; streamIndex < _dataStreams.size(); ++streamIndex)
111112
{
112113
const size_t dataStreamIndex = _dataStreams.at(streamIndex).getStreamIndex();
113-
_streams[dataStreamIndex] = &_dataStreams.at(streamIndex);
114+
_streamsProperties[dataStreamIndex] = &_dataStreams.at(streamIndex);
114115
}
115116

116117
for(size_t streamIndex = 0; streamIndex < _subtitleStreams.size(); ++streamIndex)
117118
{
118119
const size_t subtitleStreamIndex = _subtitleStreams.at(streamIndex).getStreamIndex();
119-
_streams[subtitleStreamIndex] = &_subtitleStreams.at(streamIndex);
120+
_streamsProperties[subtitleStreamIndex] = &_subtitleStreams.at(streamIndex);
120121
}
121122

122123
for(size_t streamIndex = 0; streamIndex < _attachementStreams.size(); ++streamIndex)
123124
{
124125
const size_t attachementStreamIndex = _attachementStreams.at(streamIndex).getStreamIndex();
125-
_streams[attachementStreamIndex] = &_attachementStreams.at(streamIndex);
126+
_streamsProperties[attachementStreamIndex] = &_attachementStreams.at(streamIndex);
126127
}
127128

128129
for(size_t streamIndex = 0; streamIndex < _unknownStreams.size(); ++streamIndex)
129130
{
130131
const size_t unknownStreamIndex = _unknownStreams.at(streamIndex).getStreamIndex();
131-
_streams[unknownStreamIndex] = &_unknownStreams.at(streamIndex);
132+
_streamsProperties[unknownStreamIndex] = &_unknownStreams.at(streamIndex);
132133
}
133134

134135
// Returns at the beginning of the stream after any deep analysis
@@ -224,7 +225,7 @@ size_t FileProperties::getPacketSize() const
224225

225226
const avtranscoder::StreamProperties& FileProperties::getStreamPropertiesWithIndex(const size_t streamIndex) const
226227
{
227-
avtranscoder::StreamProperties* properties = _streams.find(streamIndex)->second;
228+
avtranscoder::StreamProperties* properties = _streamsProperties.find(streamIndex)->second;
228229
if(properties)
229230
return *properties;
230231
std::stringstream os;
@@ -236,7 +237,7 @@ const avtranscoder::StreamProperties& FileProperties::getStreamPropertiesWithInd
236237
const std::vector<avtranscoder::StreamProperties*> FileProperties::getStreamProperties() const
237238
{
238239
std::vector<avtranscoder::StreamProperties*> streams;
239-
for(std::map<size_t, StreamProperties*>::const_iterator it = _streams.begin(); it != _streams.end(); ++it)
240+
for(std::map<size_t, StreamProperties*>::const_iterator it = _streamsProperties.begin(); it != _streamsProperties.end(); ++it)
240241
{
241242
streams.push_back(it->second);
242243
}

src/AvTranscoder/properties/FileProperties.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class AvExport FileProperties
113113
const AVFormatContext* _avFormatContext; ///< Has link (no ownership)
114114

115115
std::map<size_t, StreamProperties*>
116-
_streams; ///< Map of properties per stream index (of all types) - only references to the following properties
116+
_streamsProperties; ///< Map of properties per stream index (of all types) - only references to the following properties
117117

118118
std::vector<VideoProperties> _videoStreams; ///< Array of properties per video stream
119119
std::vector<AudioProperties> _audioStreams; ///< Array of properties per audio stream

0 commit comments

Comments
 (0)