I would like to know how to compute the probability distribution of a random variable $S(\tau)$, defined by the following integral
$S(\tau)=\int_{0}^{\tau}dtF(t)\delta_{x(t),1}$
where $F(t)$ is some real and smooth known function of $t$, $x(t)$ is a random variable (whose probability distribution depends on $t$) which takes the values $0$ or $1$ and $\delta_{x(t),1}$ is the indicator function which is $1$ whenever $x(t)=1$ and $0$ otherwise. Moreover, the $t$ dependent probability distribution of $x(t)$ is known.
My first thought was to use that the distribution of the random variable $y$ which is a function of another random variable $x$ i.e, $y=h(x)$ of the random variable $x$, is given by $f_{Y}(y)dy=f_{X}(h^{-1}(y))|\frac{dh^{-1}(y)}{dy}|$. Unfortunately, I don't know how to solve the integral and apply this.
I'd appreciate advice on how to solve this.