summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/binding/include/demuxer/TrackDemuxer.h
blob: c3f72648b919c5f6be57f684bfecac23419e1a0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef TRACK_DEMUXER_H_
#define TRACK_DEMUXER_H_

template <class T> struct already_AddRefed;

namespace mozilla {

class MediaRawData;
class MediaByteRange;

class TrackDemuxer {
public:
  typedef int64_t Microseconds;

  TrackDemuxer() {}
  virtual ~TrackDemuxer() {}

  virtual void Seek(Microseconds aTime) = 0;

  // DemuxSample returns nullptr on end of stream or error.
  virtual already_AddRefed<MediaRawData> DemuxSample() = 0;

  // Returns timestamp of next keyframe, or -1 if demuxer can't
  // report this.
  virtual Microseconds GetNextKeyframeTime() = 0;
};

}

#endif