diff --git a/include/ReaderBase.h b/include/ReaderBase.h index 0d14ea19..f33158a7 100644 --- a/include/ReaderBase.h +++ b/include/ReaderBase.h @@ -49,8 +49,6 @@ #include #include -using namespace std; - namespace openshot { /** @@ -74,20 +72,20 @@ namespace openshot int video_bit_rate; ///< The bit rate of the video stream (in bytes) Fraction pixel_ratio; ///< The pixel ratio of the video stream as a fraction (i.e. some pixels are not square) Fraction display_ratio; ///< The ratio of width to height of the video stream (i.e. 640x480 has a ratio of 4/3) - string vcodec; ///< The name of the video codec used to encode / decode the video stream + std::string vcodec; ///< The name of the video codec used to encode / decode the video stream int64_t video_length; ///< The number of frames in the video stream int video_stream_index; ///< The index of the video stream Fraction video_timebase; ///< The video timebase determines how long each frame stays on the screen bool interlaced_frame; // Are the contents of this frame interlaced bool top_field_first; // Which interlaced field should be displayed first - string acodec; ///< The name of the audio codec used to encode / decode the video stream + std::string acodec; ///< The name of the audio codec used to encode / decode the video stream int audio_bit_rate; ///< The bit rate of the audio stream (in bytes) int sample_rate; ///< The number of audio samples per second (44100 is a common sample rate) int channels; ///< The number of audio channels used in the audio stream ChannelLayout channel_layout; ///< The channel layout (mono, stereo, 5 point surround, etc...) int audio_stream_index; ///< The index of the audio stream Fraction audio_timebase; ///< The audio timebase determines how long each audio packet should be played - std::map metadata; ///< An optional map/dictionary of metadata for this reader + std::map metadata; ///< An optional map/dictionary of metadata for this reader }; /** @@ -140,11 +138,11 @@ namespace openshot virtual bool IsOpen() = 0; /// Return the type name of the class - virtual string Name() = 0; + virtual std::string Name() = 0; /// Get and Set JSON methods - virtual string Json() = 0; ///< Generate JSON string of this object - virtual void SetJson(string value) = 0; ///< Load JSON string into this object + virtual std::string Json() = 0; ///< Generate JSON string of this object + virtual void SetJson(std::string value) = 0; ///< Load JSON string into this object virtual Json::Value JsonValue() = 0; ///< Generate Json::JsonValue for this object virtual void SetJsonValue(Json::Value root) = 0; ///< Load Json::JsonValue into this object diff --git a/src/ReaderBase.cpp b/src/ReaderBase.cpp index 30706866..36fb458a 100644 --- a/src/ReaderBase.cpp +++ b/src/ReaderBase.cpp @@ -108,7 +108,7 @@ void ReaderBase::DisplayInfo() { cout << "----------------------------" << endl; // Iterate through metadata - map::iterator it; + std::map::iterator it; for (it = info.metadata.begin(); it != info.metadata.end(); it++) cout << "--> " << it->first << ": " << it->second << endl; } @@ -122,7 +122,7 @@ Json::Value ReaderBase::JsonValue() { root["has_audio"] = info.has_audio; root["has_single_image"] = info.has_single_image; root["duration"] = info.duration; - stringstream filesize_stream; + std::stringstream filesize_stream; filesize_stream << info.file_size; root["file_size"] = filesize_stream.str(); root["height"] = info.height; @@ -139,7 +139,7 @@ Json::Value ReaderBase::JsonValue() { root["display_ratio"]["num"] = info.display_ratio.num; root["display_ratio"]["den"] = info.display_ratio.den; root["vcodec"] = info.vcodec; - stringstream video_length_stream; + std::stringstream video_length_stream; video_length_stream << info.video_length; root["video_length"] = video_length_stream.str(); root["video_stream_index"] = info.video_stream_index; @@ -160,7 +160,7 @@ Json::Value ReaderBase::JsonValue() { // Append metadata map root["metadata"] = Json::Value(Json::objectValue); - map::iterator it; + std::map::iterator it; for (it = info.metadata.begin(); it != info.metadata.end(); it++) root["metadata"][it->first] = it->second; @@ -245,7 +245,7 @@ void ReaderBase::SetJsonValue(Json::Value root) { } if (!root["metadata"].isNull() && root["metadata"].isObject()) { for( Json::Value::iterator itr = root["metadata"].begin() ; itr != root["metadata"].end() ; itr++ ) { - string key = itr.key().asString(); + std::string key = itr.key().asString(); info.metadata[key] = root["metadata"][key].asString(); } }