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