Pepper_42_C++_interfaces
elementary_stream_listener_samsung.h
Go to the documentation of this file.
1 // Copyright (c) 2016 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef PPAPI_CPP_SAMSUNG_ELEMENTARY_STREAM_LISTENER_SAMSUNG_H_
6 #define PPAPI_CPP_SAMSUNG_ELEMENTARY_STREAM_LISTENER_SAMSUNG_H_
7 
8 #include "ppapi/c/samsung/ppp_media_data_source_samsung.h"
9 
10 /// @file
11 /// This file defines a <code>ElementaryStreamListener_Samsung</code> type which
12 /// allows plugin to receive elementary stream events.
13 namespace pp {
14 
15 /// Listener for receiving elementary stream related events.
17  public:
19 
20  /// Event is fired when internal queue is running out of data.
21  /// Application should start pushing more data via
22  /// <code>ElementaryStream_Samsung::AppendPacket</code> or
23  /// <code>ElementaryStream_Samsung::AppendEncryptedPacket</code> function.
24  virtual void OnNeedData(int32_t bytes_max) = 0;
25 
26  /// Event is fired when internal queue is full. Application should stop
27  /// pushing buffers.
28  virtual void OnEnoughData() = 0;
29 
30  /// Event is fired to notify application to change position of the stream.
31  /// After receiving this event, application should push buffers from the new
32  /// position.
33  virtual void OnSeekData(PP_TimeTicks new_position) = 0;
34 
35  protected:
36  /// The default constructor which creates listener not attached
37  /// to the player
39 
40  private:
41  // Disallow copy and assign
45 };
46 
47 } // namespace pp
48 
49 #endif // PPAPI_CPP_SAMSUNG_ELEMENTARY_STREAM_LISTENER_SAMSUNG_H_
virtual void OnSeekData(PP_TimeTicks new_position)=0
Listener for receiving elementary stream related events.
virtual void OnNeedData(int32_t bytes_max)=0