[RFC] Changing the way our saved database files are stored from blob to tagstruct.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm intending on changing module-device-restore to store some elements
of sink proplists (for Arun and Pierre's passthrough work in order to
allow the user to specify what formats his receiver supports).

In order to do that, I need to be able to store an arbitrary sized chunk
of data in the database. At present, all the files that use it are based
on fixed sizes.

So in order to make this neater, I've converted the internal database
reading/writing to use tagstructs. This allows us to version the data
stored in the same way our protocol is versioned (while this isn't
really awesome from a code perspective, at least it's extensible which
is nice). At present when we change something we have to invalidate all
old data. This way we can save some of it at least if we want to.

Of course during this transition, it's much simpler to just trash the
old data and start again which is what I've done. If people are super
opposed to this, I guess we could load the old format and transition it
to the new format... let me know your opinions on this. Personally I
don't really mind about losing the data this once (especially as we're
moving to 1.0)


The memory management is a little more complicated now (the entries are
no longer stack based as they are more dynamic), but otherwise the
principles are identical. There will be marginally greater overhead but
this isn't something that is done super often so I think that's permissible.

Please check the attached patch (particularly for memory leaks!)

Cheers

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux