• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 #ifndef PV_PLAYER_EVENTS_H_INCLUDED
19 #define PV_PLAYER_EVENTS_H_INCLUDED
20 
21 /** C++ defintion of UUID for pvPlayer error and information event type codes */
22 #define PVPlayerErrorInfoEventTypesUUID PVUuid(0x46fca5ac,0x5b57,0x4cc2,0x82,0xc3,0x03,0x10,0x60,0xb7,0xb5,0x98)
23 /** C defintion of UUID for pvPlayer error and information event type coddes */
24 #define PVPlayerErrorInfoEventTypesUUID_C PVUuid_Construct(0x46fca5ac,0x5b57,0x4cc2,0x82,0xc3,0x03,0x10,0x60,0xb7,0xb5,0x98)
25 
26 /**
27  * An enumeration of error types from pvPlayer
28  **/
29 typedef enum
30 {
31     /**
32      pvPlayer sends this error event when the user
33      provides an invalid data source for multimedia playback
34     **/
35     PVPlayerErrSourceInvalid = 1024,
36 
37     /**
38      pvPlayer sends this error event when an error occurs
39      during initialization of data source
40     **/
41     PVPlayerErrSourceInit,
42 
43     /**
44      pvPlayer sends this error event for general non-fatal error
45      from the data source
46     **/
47     PVPlayerErrSource,
48 
49     /**
50      pvPlayer sends this error event for general fatal error from
51      the data source
52     **/
53     PVPlayerErrSourceFatal,
54 
55     /**
56      pvPlayer sends this error event when the data source contains
57      no media track for playback
58     **/
59     PVPlayerErrSourceNoMediaTrack,
60 
61     /**
62      pvPlayer sends this error event when the user provides an invalid
63      data sink for multimedia playback
64     **/
65     PVPlayerErrSinkInvalid,
66 
67     /**
68      pvPlayer sends this error event when an error occurs
69      during initialization of data sink
70     **/
71     PVPlayerErrSinkInit,
72 
73     /**
74      pvPlayer sends this error event for general non-fatal error
75      from the data sink
76     **/
77     PVPlayerErrSink,
78 
79     /**
80      pvPlayer sends this error event for general fatal error from
81      the data sink
82     **/
83     PVPlayerErrSinkFatal,
84 
85     /**
86      pvPlayer sends this error event when no supported media track
87      for playback was found
88     **/
89     PVPlayerErrNoSupportedTrack,
90 
91     /**
92      pvPlayer sends this error event when an error occurs while
93      initializing the datapath or its nodes
94     **/
95     PVPlayerErrDatapathInit,
96 
97     /**
98      pvPlayer sends this error event for general non-fatal error from
99      the datapath or its nodes
100     **/
101     PVPlayerErrDatapath,
102 
103     /**
104      pvPlayer sends this error event for general fatal error from
105      the datapath or its nodes
106     **/
107     PVPlayerErrDatapathFatal,
108 
109     /**
110      pvPlayer sends this error event when the data source runs out of
111      media data
112     **/
113     PVPlayerErrSourceMediaDataUnavailable,
114 
115     /**
116      pvPlayer sends this error event when the data source encounters a
117      general error in the media data
118     **/
119     PVPlayerErrSourceMediaData,
120 
121     /**
122      pvPlayer sends this error event when the data sink encounters a
123      general error in the media data
124     **/
125     PVPlayerErrSinkMediaData,
126 
127     /**
128      pvPlayer sends this error event when the datapath or its node encounters a
129      general error in the media data
130     **/
131     PVPlayerErrDatapathMediaData,
132 
133     /**
134      pvPlayer sends this error event when an error occurs during shutdown
135      of data source
136     **/
137     PVPlayerErrSourceShutdown,
138 
139     /**
140      pvPlayer sends this error event when an error occurs during shutdown
141      of data sink
142     **/
143     PVPlayerErrSinkShutdown,
144 
145     /**
146      pvPlayer sends this error event when an error occurs during shutdown
147      of datapath or its nodes
148     **/
149     PVPlayerErrDatapathShutdown,
150 
151     /**
152      pvPlayer sends this error event when an error occurs during interaction
153      with CPM plug-in
154     **/
155     PVPlayerErrCPMPlugin,
156 
157     /**
158      Placeholder for the last pvPlayer error event
159      **/
160     PVPlayerErrLast = 8191
161 } PVPlayerErrorEventType;
162 
163 /**
164  * An enumeration of informational event types from pvPlayer
165  **/
166 typedef enum
167 {
168     /**
169      pvPlayer sends this event when the playback has reached
170      the specified end time and playback has been paused.
171      **/
172     PVPlayerInfoEndTimeReached  = 8192,
173 
174     /**
175      pvPlayer sends this event when reporting periodic playback
176      position status
177      This event will be sent with general event code PVMFInfoPositionStatus and the event's local
178      buffer contains the playback position in milliseconds, seconds, or minutes. The format of local buffer is as follows:
179      Byte 1: 0x01
180      Byte 2: 0x00
181      Byte 3: 0x00
182      Byte 4: 0x00
183      Byte 5-8: uint32 (playback position value in milliseconds, seconds, or minutes depending on the
184      current settings for playback position status units)
185      **/
186     PVPlayerInfoPlaybackPositionStatus,
187 
188     /**
189      pvPlayer sends this event when the playback has reached
190      the end of clip (all sink nodes reported PVMFInfoEndOfData)
191      and playback has been paused.
192      **/
193     PVPlayerInfoEndOfClipReached,
194 
195     /**
196      pvPlayer sends this event when playback has started
197      from the new specified begin time after SetPlaybackRange() call
198      **/
199     PVPlayerInfoPlaybackFromBeginTime,
200 
201     /**
202      pvPlayer sends this event when it recvs any info event from
203      the source
204      **/
205     PVPlayerInfoSourceMediaData,
206 
207     /**
208      pvPlayer sends this event when it is doing a source rollover,
209      or in other words attempting alternate sources.
210      This event's local buffer contains the format type for the new source.
211      The format of local buffer is as follows:
212      Byte 1: 0x01
213      Byte 2: 0x00
214      Byte 3: 0x00
215      Byte 4: 0x00
216      Byte 5-8: uint32 (format type for the new source)
217      **/
218     PVPlayerInfoAttemptingSourceRollOver,
219 
220     /**
221      pvPlayer sends this event when it is doing SFR,
222      or in other words a repos requested is satisfied by skipping to the requested point
223      from the current playback position ASAP.
224      **/
225     PVPlayerInfoAttemptingSFRAsPartOfSetPlayBackRange,
226 
227     /**
228      pvPlayer sends this event when engine is changing position and
229      Source node sends NotSupported to Change Position request.
230      **/
231     PVPlayerInfoChangePlaybackPositionNotSupported,
232 
233     /**
234      Placeholder for the last pvPlayer informational event
235      **/
236     PVPlayerInfoLast = 10000
237 
238 } PVPlayerInformationalEventType;
239 
240 
241 #endif // PV_PLAYER_EVENTS_H_INCLUDED
242 
243 
244