I have the following scenario:
- Data from multiple video files needs to be held in a data structure/collection.
- A video file can have 1 to many video streams.
- Each stream has a field and value pair.
For example:
Video1:
Stream1:
format mpeg
bitrate 700kb/s
resolution 1024x764
Stream2:
format mpeg
bitrate 600kb/s
resolution 800x600
Video2:
Stream1:
format mpeg
bitrate 700kb/s
resolution 1024x764
Stream2:
format mpeg
bitrate 600kb/s
resolution 800x600
This is what I was consider holding the data in:
QVector<QVector<QStringList>>
Where QStringList are the value pairs (format, mpeg).
Inside QVector holds the multiple pairs for the stream.
Outside QVector holds the everything i.e. each entry/index is data for a single video file.
I’m not sure whether this is the best way to hold the data a I guess a collection inside a collection inside a collection is not going to be very efficient.
Any opinions on alternatives?
Why not write classes as you need?