forked from asnowfix/android_external_opencore
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathclassMPVDataSourceBase.html
523 lines (497 loc) · 21.5 KB
/
classMPVDataSourceBase.html
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>MPVDataSourceBase class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center>
<hr><h1>MPVDataSourceBase Class Reference</h1><code>#include <<a class="el" href="pv__plugin__interfaces_8h-source.html">pv_plugin_interfaces.h</a>></code>
<p>
<p>Inheritance diagram for MPVDataSourceBase:
<p><center><img src="classMPVDataSourceBase.png" usemap="#MPVDataSourceBase_map" border="0" alt=""></center>
<map name="MPVDataSourceBase_map">
<area href="classMPVDataSource.html" alt="MPVDataSource" shape="rect" coords="0,56,154,80">
<area href="classMPVDataSourceAndSink.html" alt="MPVDataSourceAndSink" shape="rect" coords="164,56,318,80">
</map>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a0">MPVDataSourceBase</a> (TUid aType)</td></tr>
<tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a1">~MPVDataSourceBase</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a2">FillBufferL</a> (CMMFBuffer *aBuffer, <a class="el" href="classMPVDataSinkBase.html">MPVDataSinkBase</a> *aConsumer, TMediaId)=0</td></tr>
<tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a3">BufferEmptiedL</a> (CMMFBuffer *aBuffer)=0</td></tr>
<tr><td nowrap align=right valign=top>virtual TBool </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a4">CanCreateSourceBuffer</a> ()=0</td></tr>
<tr><td nowrap align=right valign=top>virtual CMMFBuffer * </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a5">CreateSourceBufferL</a> (TMediaId, TBool &)</td></tr>
<tr><td nowrap align=right valign=top>virtual CMMFBuffer * </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a6">CreateSourceBufferL</a> (TMediaId, CMMFBuffer &, TBool &)</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a7">SourceThreadLogon</a> (MAsyncEventHandler &)</td></tr>
<tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a8">SourceThreadLogoff</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a9">SourcePrimeL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a10">SourcePlayL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a11">SourcePauseL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a12">SourceStopL</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
MPVDataSourceBase Class
<p>
Base class for data sources
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a name="a0" doxytag="MPVDataSourceBase::MPVDataSourceBase"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> MPVDataSourceBase::MPVDataSourceBase </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">TUid </td>
<td class="mdname1" valign="top" nowrap> <em>aType</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
</td>
</tr>
</table>
<a name="a1" doxytag="MPVDataSourceBase::~MPVDataSourceBase"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual MPVDataSourceBase::~MPVDataSourceBase </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a3" doxytag="MPVDataSourceBase::BufferEmptiedL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void MPVDataSourceBase::BufferEmptiedL </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">CMMFBuffer * </td>
<td class="mdname1" valign="top" nowrap> <em>aBuffer</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method called by a data sink to pass back an emptied buffer to the source
<p>
This is a pure virtual function that each derived class must implement. This method is used as the callback when the data source actively requests a consumer ie a data sink to empty a buffer by calling the data sinks EmptyBufferL. When the data source gets this callback it knows that the buffer has been emptied and can be reused<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aBuffer</em> </td><td>
The buffer that has been emptied by a data sink and is now available for reuse </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a4" doxytag="MPVDataSourceBase::CanCreateSourceBuffer"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TBool MPVDataSourceBase::CanCreateSourceBuffer </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method to indicate whether the data source can create a buffer.
<p>
This is a pure virtual function that each derived class must implement.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
ETrue if the data source can create a buffer else EFalse </dl> </td>
</tr>
</table>
<a name="a6" doxytag="MPVDataSourceBase::CreateSourceBufferL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual CMMFBuffer* MPVDataSourceBase::CreateSourceBufferL </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">TMediaId </td>
<td class="mdname" nowrap> , </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>CMMFBuffer & </td>
<td class="mdname" nowrap> , </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>TBool & </td>
<td class="mdname" nowrap> </td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Returns a buffer created by the data source
<p>
This is a virtual function that a derived class can implement. This can be used in preference to the above CreateSourceBufferL method in cases where the source buffer creation has a dependancy on the sink buffer<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aMediaId</em> </td><td>
This identifies the type of media eg audio or video and the stream id. This parameter is required in cases where the source can supply data of more than one media type and/or multiple strams of data eg a multimedia file</td></tr>
<tr><td valign=top><em>aSinkBuffer</em> </td><td>
The sink buffer the nature of which may influence the creation of the source buffer</td></tr>
<tr><td valign=top><em>aReference</em> </td><td>
This must be written to by the method to indicate whether the created buffer is a 'reference' buffer. A 'reference' buffer is a buffer that is owned by the source and should be used in preference to the sink buffer provided the sink buffer is not a reference buffer </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
The created buffer </dl> </td>
</tr>
</table>
<a name="a5" doxytag="MPVDataSourceBase::CreateSourceBufferL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual CMMFBuffer* MPVDataSourceBase::CreateSourceBufferL </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">TMediaId </td>
<td class="mdname" nowrap> , </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>TBool & </td>
<td class="mdname" nowrap> </td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Returns a buffer created by the data source
<p>
This is a pure virtual function that each derived class must implement.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aMediaId</em> </td><td>
This identifies the type of media eg audio or video and the stream id. This parameter is required in cases where the source can supply data of more than one media type and/or multiple strams of data eg a multimedia file</td></tr>
<tr><td valign=top><em>aReference</em> </td><td>
This must be written to by the method to indicate whether the created buffer is a 'reference' buffer. A 'reference' buffer is a buffer that is owned by the source and should be used in preference to the sink buffer provided the sink buffer is also not a reference buffer </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
The created buffer </dl> </td>
</tr>
</table>
<a name="a2" doxytag="MPVDataSourceBase::FillBufferL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void MPVDataSourceBase::FillBufferL </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">CMMFBuffer * </td>
<td class="mdname" nowrap> <em>aBuffer</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="classMPVDataSinkBase.html">MPVDataSinkBase</a> * </td>
<td class="mdname" nowrap> <em>aConsumer</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>TMediaId </td>
<td class="mdname" nowrap> </td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method called by a MDataSink to request the data source to fill aBuffer with data.
<p>
This is a pure virtual function that each derived class must implement. This method is used when a data source is passively waiting for requests from a consumer ie a data sink to fill a buffer. The data source must call the BufferFilledL member on aConsumer when it has filled the buffer with data - the data source can either make this callback synchronously or asynchronously.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aBuffer</em> </td><td>
The buffer that needs filling with data</td></tr>
<tr><td valign=top><em>aConsumer</em> </td><td>
The data sink that consumes the data. The data source needs this to make the BufferFilledL callback on aConsumer when the data source has completed filling the aBuffer.</td></tr>
<tr><td valign=top><em>aMediaId</em> </td><td>
This identifies the type of media eg audio or video and the stream id. This parameter is required in cases where the source can supply data of more than one media type and/or multiple strams of data eg a multimedia file </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a11" doxytag="MPVDataSourceBase::SourcePauseL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSourceBase::SourcePauseL </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method to 'pause' the data source
<p>
This is a virtual function that a derrived data source can implement if any data source specific action is required to 'pause' </td>
</tr>
</table>
<a name="a10" doxytag="MPVDataSourceBase::SourcePlayL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSourceBase::SourcePlayL </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method to 'play' the data source
<p>
This is a virtual function that a derrived data source can implement if any data source specific action is required prior to 'playing'ie the start of data transfer </td>
</tr>
</table>
<a name="a9" doxytag="MPVDataSourceBase::SourcePrimeL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSourceBase::SourcePrimeL </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method to 'prime' the data source
<p>
This is a virtual function that a derrived data source can implement if any data source specific 'priming' is required </td>
</tr>
</table>
<a name="a12" doxytag="MPVDataSourceBase::SourceStopL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSourceBase::SourceStopL </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method to 'stop' the data source
<p>
This is a virtual function that a derrived data source can implement if any data source specific action is required to 'stop' </td>
</tr>
</table>
<a name="a8" doxytag="MPVDataSourceBase::SourceThreadLogoff"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void MPVDataSourceBase::SourceThreadLogoff </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method to 'logoff' the data source from the same thread that source supplies data in.
<p>
This method may be required as the thread that the data source is deleted in may not be the same thread that the data transfer took place in. Therefore any thread specific releasing of resources needs to be performed in the SourceThreadLogoff rather than in the destructor
<p>
This is a virtual function that a derrived data source can implement if any thread specific releasing of resources is required. </td>
</tr>
</table>
<a name="a7" doxytag="MPVDataSourceBase::SourceThreadLogon"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSourceBase::SourceThreadLogon </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">MAsyncEventHandler & </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Method to 'logon' the data source to the same thread that source will be supplying data in.
<p>
This method may be required as the thread that the data source was created in is not always the same thread that the data transfer will take place in. Therefore any thread specific initialisation needs to be performed in the SourceThreadLogon rather than in the creation of the data source.
<p>
This is a virtual function that a derrived data source can implement if any thread specific initialisation is required and/or the data source can create any asynchronous events.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aEventHandler</em> </td><td>
This is an MAsyncEventHandler to handle asynchronous events that occur during the transfer of multimedia data. The event handler must be in the same thread as the data transfer thread - hence the reason it is passed in the SourceThreadLogon as opposed to say the constructor.</td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
KErrNone if successful, otherwise a system wide error code. </dl> </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="pv__plugin__interfaces_8h-source.html">pv_plugin_interfaces.h</a></ul>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>PV Author Engine</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>