[PATCH 00/15] Rework of references counter in Specs
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 00/15] Rework of references counter in Specs
- Date: Mon, 19 Jul 2010 20:33:49 +0200
Hi.
This is a rework I did of this feature, taking in account Iago comments, and
mostly, after hitting my head against the wall because I implemented it wrongly
first time (kudos to Iago for enlighten me).
Anyway, some issues regarding the first set of patches (these ones invalidates
the others, of course):
(1) Specs are unreffered after source caller ends
(2) I added references counter to GrlMetadataSourceFooSpec structures
(3) Get rid of setters/getters in specs
Regarding (1), this was ill-implemented in first attempt. Now, when source's
caller invokes callback with remaining == 0 (or just the callback for those
that only one callback is expected), an idle is added to free the helper
structures used in core and, more important, to unref() the spec. So, when
callback ends, caller continue its execution, and when it finishes, the
"freeing" idle can unref() the spec. As in previous work, if source wants to
keep the spec, it needs to ref() it.
Regarding (2), mostly I've done the same as GrlMediaSourceFooSpec. Nothing to
say then.
Regarding (3), well, actually it is a bit out-of-scope of the main goal of
these patches, so I prefer to keep it away. Also, some discussions needs to be
done to know what is the best approach to implement it. But at the same time I
would like to make a new Grilo release this week, so I think it is better to do
add them in future.
Again, comments are welcome. Please, note that I would like to do a release
this week, so the sooner I get those comments, the better. Thanks.
J.A.
Juan A. Suarez Romero (15):
core: Add references counter to GrlMediaSourceFooSpec structures
core: Add constructors to GrlMediaSourceFooSpec
core: Use constructors to create GrlMediaSourceFooSpec
core: Add ref() functions to GrlMediaSourceFooSpec
core: Add unref() functions to GrlMediaSourceFooSpec
core: Do not directly destroy GrlMediaSourceFooSpec structures
core: Free specs after last element is sent
core: Add references counter to GrlMetadataSourceFooSpec structures
core: Get rid of failed_keys field in
GrlMetadataSourceSetMetadataSpec
core: Add constructors to GrlMetadataSourceFooSpec
core: Use constructors to create GrlMetadataSourceFooSpec
core: Add ref() functions to GrlMetadataSourceFooSpec
core: Add unref() functions to GrlMetadataSourceFooSpec
core: Free helper structures after processing metadata
core: Get a copy of failed keys
src/grl-media-source.c | 470 +++++++++++++++++++++++++++++++++++++--------
src/grl-media-source.h | 48 +++++
src/grl-metadata-source.c | 152 ++++++++++++---
src/grl-metadata-source.h | 18 ++-
4 files changed, 573 insertions(+), 115 deletions(-)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]