Pepper_47_C_interfaces
ppp_media_control_samsung.h
Go to the documentation of this file.
1 /* Copyright (c) 2013 The Chromium Authors. 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 
6 /* From samsung/ppp_media_control_samsung.idl,
7  * modified Wed Oct 26 12:20:59 2016.
8  */
9 
10 #ifndef PPAPI_C_SAMSUNG_PPP_MEDIA_CONTROL_SAMSUNG_H_
11 #define PPAPI_C_SAMSUNG_PPP_MEDIA_CONTROL_SAMSUNG_H_
12 
13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h"
19 
20 #define PPP_MEDIACONTROL_SAMSUNG_INTERFACE_0_9 "PPP_MediaControl_Samsung;0.9"
21 #define PPP_MEDIACONTROL_SAMSUNG_INTERFACE \
22  PPP_MEDIACONTROL_SAMSUNG_INTERFACE_0_9
23 
24 /**
25  * @file
26  * This file defines the <code>PPP_MediaControl_Samsung</code> interface.
27  */
28 
29 
30 /**
31  * @addtogroup Interfaces
32  * @{
33  */
34 /**
35  * Interface allowing application to receive various events regarding
36  * media playback (i.e. player state changes, duration update, media time
37  * position changes etc.).
38  *
39  * All methods from this interface accepts |user_data| as the first parameter
40  * which is set when registering interface.
41  */
43  /**
44  * Method called when controller handling particular stream/clip finish
45  * transition to PLAYING state.
46  *
47  * |timestamp| - current time of media
48  */
49  void (*Play)(PP_Instance instance,
50  PP_Resource media,
51  PP_MicrosecondsDelta timestamp,
52  void* user_data);
53  /**
54  * Method called when controller handling particular stream finish
55  * transition to PAUSED state.
56  */
57  void (*Pause)(PP_Instance instance, PP_Resource media, void* user_data);
58  /**
59  * Signals that end of media has been reached, |error| argument of
60  * PP_MediaError type signals if this is caused by some sort of error.
61  */
62  void (*Ended)(PP_Instance instance,
63  PP_Resource media,
64  PP_MediaError error,
65  void* user_data);
66  /**
67  * Method called when played media playback time has been changed explicitly.
68  */
69  void (*Seeking)(PP_Instance instance,
70  PP_Resource media,
71  PP_MicrosecondsDelta seek_time,
72  void* user_data);
73  /**
74  * Method called when played stream duration has been changed.
75  * |duration| is total stream duration in microseconds.
76  */
77  void (*DurationChange)(PP_Instance instance,
78  PP_Resource media,
79  PP_MicrosecondsDelta duration,
80  void* user_data);
81  /**
82  * Method called periodically while playing media to signal advance of
83  * playback time. Minimal resolution of callback is 0.5s.
84  * |media_times| represents current media time in microseconds from beginning
85  * of the stream/clip.
86  */
87  void (*TimeUpdate)(PP_Instance instance,
88  PP_Resource media,
89  PP_MicrosecondsDelta media_time,
90  void* user_data);
91  /**
92  * Method called when media playback rate is changed.
93  * |plaback_rate| represent current rate of playback media
94  */
95  void (*RateChange)(PP_Instance instance,
96  PP_Resource media,
97  float playback_rate,
98  void* user_data);
99 };
100 
102 /**
103  * @}
104  */
105 
106 #endif /* PPAPI_C_SAMSUNG_PPP_MEDIA_CONTROL_SAMSUNG_H_ */
107 
void(* DurationChange)(PP_Instance instance, PP_Resource media, PP_MicrosecondsDelta duration, void *user_data)
void(* TimeUpdate)(PP_Instance instance, PP_Resource media, PP_MicrosecondsDelta media_time, void *user_data)
int64_t PP_MicrosecondsDelta
int32_t PP_Resource
Definition: pp_resource.h:40
void(* RateChange)(PP_Instance instance, PP_Resource media, float playback_rate, void *user_data)
void(* Seeking)(PP_Instance instance, PP_Resource media, PP_MicrosecondsDelta seek_time, void *user_data)
int32_t PP_Instance
Definition: pp_instance.h:34
void(* Play)(PP_Instance instance, PP_Resource media, PP_MicrosecondsDelta timestamp, void *user_data)
void(* Pause)(PP_Instance instance, PP_Resource media, void *user_data)
void(* Ended)(PP_Instance instance, PP_Resource media, PP_MediaError error, void *user_data)