class virtual source : ?seek:bool -> bufferize:float -> empty_on_abort:bool -> Generator.t ->
object
.. end
val generator : Generator.t
We keep the generator in an instance variable so that derived
classes can access it. There are concurrency issues, though:
- In classes such as http_source, the generator is fed concurrently
with its consumption. But in that case a thread-safe implementation
of Generator is used.
- In any case there is always concurrency in this class, with #get
on one hand and #is_ready, #abort_track and #seek that can be
called from other threads. We use the generator_lock to avoid
the only bad interference, ie. #get_frame vs #seek.
val generator_lock : Mutex.t
val mutable buffering : bool
val mutable should_fail : bool
method private virtual log : Dtools.Log.t
method seek : int -> int
method abort_track : unit
method private length : int
method is_ready : bool
method remaining : int
method private get_frame : Frame.t -> unit