Commit 57c9b0ed authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

VideoTrack: Make all fields immutable

parent f009017f
......@@ -35,19 +35,19 @@ const std::string VideoTrack::Table::PrimaryKeyColumn = "id_track";
int64_t VideoTrack::* const VideoTrack::Table::PrimaryKey = &VideoTrack::m_id;
VideoTrack::VideoTrack( MediaLibraryPtr, sqlite::Row& row )
: m_id( row.extract<decltype(m_id)>() )
, m_codec( row.extract<decltype(m_codec)>() )
, m_width( row.extract<decltype(m_width)>() )
, m_height( row.extract<decltype(m_height)>() )
, m_fpsNum( row.extract<decltype(m_fpsNum)>() )
, m_fpsDen( row.extract<decltype(m_fpsDen)>() )
, m_bitrate( row.extract<decltype(m_bitrate)>() )
, m_sarNum( row.extract<decltype(m_sarNum)>() )
, m_sarDen( row.extract<decltype(m_sarDen)>() )
, m_mediaId( row.extract<decltype(m_mediaId)>() )
, m_language( row.extract<decltype(m_language)>() )
, m_description( row.extract<decltype(m_description)>() )
{
row >> m_id
>> m_codec
>> m_width
>> m_height
>> m_fpsNum
>> m_fpsDen
>> m_bitrate
>> m_sarNum
>> m_sarDen
>> m_mediaId
>> m_language
>> m_description;
}
VideoTrack::VideoTrack( MediaLibraryPtr, const std::string& codec, unsigned int width,
......
......@@ -70,17 +70,17 @@ class VideoTrack : public IVideoTrack, public DatabaseHelpers<VideoTrack>
private:
int64_t m_id;
std::string m_codec;
unsigned int m_width;
unsigned int m_height;
uint32_t m_fpsNum;
uint32_t m_fpsDen;
uint32_t m_bitrate;
uint32_t m_sarNum;
uint32_t m_sarDen;
int64_t m_mediaId;
std::string m_language;
std::string m_description;
const std::string m_codec;
const unsigned int m_width;
const unsigned int m_height;
const uint32_t m_fpsNum;
const uint32_t m_fpsDen;
const uint32_t m_bitrate;
const uint32_t m_sarNum;
const uint32_t m_sarDen;
const int64_t m_mediaId;
const std::string m_language;
const std::string m_description;
private:
friend struct VideoTrack::Table;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment