Replace property class with something sane
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mediascanner |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
The property class is poorly designed in multiple different ways. The main one of these being that it is a massive dependency injector. Since it converts all data to and from all possible backend types, it must include all said dependencies. Since property is used in many places it makes every part of the code base dependent on every other part of the code base.
The fix is to create a simple class that holds media information. Each backend then deals only with these objects, converting between the common data model and their own. This decouples e.g. Grilo from Lucene, which is how it should be.
The current implementation is also a massive garbage pile of templates and too much cleverness. Getting rid of it should noticeably cut our compile times (especially since so many files include property.h).
Changed in mediascanner: | |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | added: scopes-s |
If we were going to redo the internals (which I don't think is on the table until we've fixed up the other missing features and bugs), I'd seriously consider getting rid of mediascanner's internal metadata representation all together.
At the moment, we've got the MediaInfo class with the following conversion routines:
* to and from GrlMedia fo/GstDiscovere rStreamInfo
* to and from Lucene::Document
* from GstDiscovererIn
Apart from not being written in C++, the GrlMedia type seems like it could fill this role. And if the GstDiscoverer code was packaged up as a Grilo metadata resolver plugin, the media scanner daemon's job boils down to:
1. watch for file system changes
2. run a series of Grilo metadata resolver plugins
3. store results in Lucene index.