summaryrefslogtreecommitdiffstats
path: root/media/base/buffering_state.h
blob: 935922c9b4d7b4b857351e819ca8cf066146cb64 (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
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef MEDIA_BASE_BUFFERING_STATE_H_
#define MEDIA_BASE_BUFFERING_STATE_H_

#include "base/callback_forward.h"

namespace media {

enum BufferingState {
  // Indicates that there is no data buffered.
  //
  // Typical reason is data underflow and hence playback should be paused.
  BUFFERING_HAVE_NOTHING,

  // Indicates that enough data has been buffered.
  //
  // Typical reason is enough data has been prerolled to start playback.
  BUFFERING_HAVE_ENOUGH,
};

// Used to indicate changes in buffering state;
typedef base::Callback<void(BufferingState)> BufferingStateCB;

}  // namespace media

#endif  // MEDIA_BASE_BUFFERING_STATE_H_