Pepper_47_C_interfaces
ppp_media_data_source_samsung.h
Go to the documentation of this file.
1 /* Copyright (c) 2016 Samsung Electronics. All rights reserved.
2  */
3 
4 /* From samsung/ppp_media_data_source_samsung.idl,
5  * modified Wed Mar 30 10:21:58 2016.
6  */
7 
8 #ifndef PPAPI_C_SAMSUNG_PPP_MEDIA_DATA_SOURCE_SAMSUNG_H_
9 #define PPAPI_C_SAMSUNG_PPP_MEDIA_DATA_SOURCE_SAMSUNG_H_
10 
11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_stdint.h"
13 #include "ppapi/c/pp_time.h"
14 
15 #define PPP_ELEMENTARYSTREAMLISTENER_SAMSUNG_INTERFACE_1_0 \
16  "PPP_ElementaryStreamListener_Samsung;1.0"
17 #define PPP_ELEMENTARYSTREAMLISTENER_SAMSUNG_INTERFACE \
18  PPP_ELEMENTARYSTREAMLISTENER_SAMSUNG_INTERFACE_1_0
19 
20 /**
21  * @file
22  * This file defines events listeners used with the
23  * <code>PPB_MediaDataSource_Samsung</code> interface
24  * and its descendants.
25  *
26  * Part of Pepper Media Player interfaces (Samsung's extension).
27  * See comments in ppb_media_data_source_samsung.idl.
28  */
29 
30 
31 /**
32  * @addtogroup Interfaces
33  * @{
34  */
35 /**
36  * Structure containing pointers to functions provided by plugin,
37  * and called when player or playback related event occurs.
38  */
40  /**
41  * Event is fired when internal queue is running out of data.
42  * Application should start pushing more data via
43  * <code>PPB_ElementaryStream_Samsung::AppendPacket</code> or
44  * <code>PPB_ElementaryStream_Samsung::AppendEncryptedPacket</code> function.
45  *
46  * @param[in] bytes_max Maximum number of bytes which can stored in
47  * the internal queue.
48  * @param[in] user_data A pointer to user data passed to a listener function.
49  */
50  void (*OnNeedData)(int32_t bytes_max, void* user_data);
51  /**
52  * Event is fired when internal queue is full. Application should stop pushing
53  * buffers.
54  *
55  * @param[in] user_data A pointer to user data passed to a listener function.
56  */
57  void (*OnEnoughData)(void* user_data);
58  /**
59  * Event is fired to notify application to change position of the stream.
60  * After receiving this event, application should push buffers from the new
61  * position.
62  *
63  * @param[in] new_position The new position in the stream.
64  * @param[in] user_data A pointer to user data passed to a listener function.
65  */
66  void (*OnSeekData)(PP_TimeTicks new_position, void* user_data);
67 };
68 
71 /**
72  * @}
73  */
74 
75 #endif /* PPAPI_C_SAMSUNG_PPP_MEDIA_DATA_SOURCE_SAMSUNG_H_ */
76 
double PP_TimeTicks
Definition: pp_time.h:42
void(* OnSeekData)(PP_TimeTicks new_position, void *user_data)
void(* OnNeedData)(int32_t bytes_max, void *user_data)