Skip to contentSkip to conversation

timer: use explicit two types of signals to dispatch events

PATCH New GitHub pull_request - opened 1 participant 1 message Jun 5, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

cover timer: use explicit two types of signals to dispatch events

alsa-project/alsa-gobject pull request #74 was opened from takaswie:

In current implementation, ALSATimer.UserInstance dispatches one type of event for both tick and timestamp events. However, the type of event is decided before starting timer instance, therefore user application never processes both types of event.

In this patchset, two types of signals are added to ALSATimer.UserInstance to dispatch the two types of event separately, then ALSATImer.Event is going to be removed. Additionally, some boxed objects and enumerations are renamed so that they have straight-forward names.

```
Takashi Sakamoto (6):
  timer: user_instance: use two signals to dispatch events explicitly
  timer: event: remove unused structure
  timer: enums: rename TstampEventType from EventType
  timer: enum: rename EventType from EventDataType
  timer: tick-event: rename from event-data-tick
  timer: tstamp-event: rename from event-data-tstamp

 samples/timer                    |  29 ++++----
 src/timer/alsatimer-enum-types.h |  80 +++++++++++-----------
 src/timer/alsatimer.h            |   5 +-
 src/timer/alsatimer.map          |  30 ++++----
 src/timer/event-data-tick.c      |  51 --------------
 src/timer/event-data-tick.h      |  23 -------
 src/timer/event-data-tstamp.c    |  66 ------------------
 src/timer/event-data-tstamp.h    |  26 -------
 src/timer/event.c                |  64 -----------------
 src/timer/event.h                |  28 --------
 src/timer/instance-params.c      |  22 +++---
 src/timer/instance-params.h      |   4 +-
 src/timer/meson.build            |  10 ++-
 src/timer/tick-event.c           |  51 ++++++++++++++
 src/timer/tick-event.h           |  23 +++++++
 src/timer/tstamp-event.c         |  64 +++++++++++++++++
 src/timer/tstamp-event.h         |  24 +++++++
 src/timer/user-instance.c        | 114 ++++++++++++++++++++-----------
 src/timer/user-instance.h        |  22 ++++--
 tests/alsatimer-enums            |   6 +-
 tests/alsatimer-user-instance    |   8 ++-
 21 files changed, 346 insertions(+), 404 deletions(-)
 delete mode 100644 src/timer/event-data-tick.c
 delete mode 100644 src/timer/event-data-tick.h
 delete mode 100644 src/timer/event-data-tstamp.c
 delete mode 100644 src/timer/event-data-tstamp.h
 delete mode 100644 src/timer/event.c
 delete mode 100644 src/timer/event.h
 create mode 100644 src/timer/tick-event.c
 create mode 100644 src/timer/tick-event.h
 create mode 100644 src/timer/tstamp-event.c
 create mode 100644 src/timer/tstamp-event.h
```

Request URL : https://github.com/alsa-project/alsa-gobject/pull/74
Patch URL : https://github.com/alsa-project/alsa-gobject/pull/74.patch
Repository URL: https://github.com/alsa-project/alsa-gobject