summaryrefslogtreecommitdiff
path: root/session.c
AgeCommit message (Collapse)Author
2017-02-21Clarify that {start,end,cur}_samplenum are absolute numbers.Uwe Hermann
2017-02-20Support adding multiple instances of a decoderKarl Palsson
srd_inst_new() used the decoder ID as the instance ID, preventing the use of multiple instances of the same decoder in the same session. Simply append a numerical suffix to later instances to allow more. Required changes to cleanup to reliably free all memory. Valgrind checked. This fixes parts of bug #868. Based on original work by: Soeren Apel <soeren@apelpie.net> Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-08-25srd_session_send(): Improve Doxygen comments.Uwe Hermann
2016-05-11Supply metadata to stacked decodersStefan BrĂ¼ns
Currently only toplevel decoders receive the samplerate, thus stacked decoders are not able to derive e.g. timestamps from the sample number. This fixes bug #664.
2015-09-13Build: Include <config.h> first in all source filesDaniel Elstner
Since Autoconf places some important feature flags only into the configuration header, it is necessary to include it globally to guarantee a consistent build.
2015-08-20Pass unitsize per sample chunk.Uwe Hermann
Don't pass unitsize to srd_inst_channel_set_all(), have that only set the channel map. Instead, srd_session_send() now has a parameter for the unitsize which is passed with every new chunk to be decoded. This is in preparation to fix issues with devices or files which have a unitsize != 1 and where the "guessed" unitsize based on the number of channels is not correct. This also allows for (potential) future changes where every chunk can indeed have a different unitsize. This fixes (parts of) bug #352.
2015-07-23Slightly more verbose logging in srd_inst_decode().Uwe Hermann
2015-04-01Use g_malloc*() consistently, simplify error handling.Uwe Hermann
Use g_malloc*() for small allocations and assume they always succeed. Simplify error handling in a few places accordingly. Document the rules in the README file.
2014-07-08Remove dependency on Python.h from public API headerMarcus Comstedt
This prevents Python.h from being included into client code, where it can mess things up by e.g. redefining _POSIX_C_SOURCE.
2014-05-04Mark some variables more consistently as SRD_PRIV.Uwe Hermann
2014-05-03Don't define names ending with _t (POSIX reserved).Uwe Hermann
Avoid defining any names ending in _t, those are generally reserved for POSIX usage. For details see: http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
2014-04-13Rename 'probe' to 'channel' everywhere.Uwe Hermann
Variables of type 'struct srd_channel *' are consistently named 'pdch' to make them easily distinguishable from libsigrok's 'struct sr_channel *' variables that are consistently named 'ch'.
2014-02-24Make the data unit size configurableDaniel Elstner
2014-01-30Fix warnings exposed by -Wmissing-prototypes.Uwe Hermann
2013-11-19Add a missing #include.Uwe Hermann
This causes compiler errors in some setups otherwise, e.g.: CC libsigrokdecode_la-session.lo session.c: In function 'srd_session_metadata_set': session.c:195:46: error: expected ')' before 'PRIu64' srd_dbg("Setting session %d samplerate to %"PRIu64".", ^ session.c: In function 'srd_session_send': session.c:242:15: error: expected ')' before 'PRIu64' "number %" PRIu64 ", %" PRIu64 " bytes at 0x%p", ^
2013-11-18Better error checking on session metadataBert Vermeulen
2013-11-16Move session-specific functionality into session.cBert Vermeulen