Symbian3/SDK/Source/GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept xml:lang="en" id="GUID-F9896E96-1076-552D-AE54-8F9DABED867F"><title>Configuring the Video Player</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to configure the video player. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to make configuration adjustments to the video player. </p> <p><b>Required Background</b> </p> <p>The <xref href="GUID-2DC80BA9-7AA2-5CD3-9105-1DE28CE196C1.dita">Video Client Overview</xref> introduces the video client utilities. </p> <p><b>Introduction</b> </p> <p>The video player utility is used to open, play, and obtain information from sampled video data. This functionality is implemented by the <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita"><apiname>CVideoPlayerUtility</apiname></xref> class. The video data can be supplied either in a file, a descriptor or a URL. </p> </section> <section><title>Using Video Player </title> <p>The following tasks will be covered in this tutorial: </p> <ul><li id="GUID-0A783BCE-7C87-5EE1-BFDA-BD2847CF1E4F"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-18902F43-1F13-5A91-84AD-94732560A554">Set the Display Window</xref>  </p> </li> <li id="GUID-4A64B04C-737D-587E-BBA4-478EE453EC82"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-CDD3561D-84E4-5524-9593-5055659B6CB0"> Query and Set the Volume</xref>  </p> </li> <li id="GUID-15F0C370-6460-5D6D-8CDB-B042CBD4A7C6"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-BBCD720C-1276-5D6C-B9E6-1946EE019987">Query and Set the Balance</xref>  </p> </li> <li id="GUID-ACB66213-E77F-5F93-BF2D-A7DEECFA10D1"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-7666501B-196B-5FE9-A331-311B11BF7954">Query and Set the Priority</xref>  </p> </li> <li id="GUID-7E7ACD89-0ECB-5CD7-A550-571BC8F8FE1C"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-8B88F87D-A3F0-5521-92DA-C74EE2D942A8">Query and Set the Bit and Frame Rate</xref>  </p> </li> <li id="GUID-1ED08DD8-4D68-52AF-89DA-7617BCE9A388"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-7D998004-DC09-5328-B2EE-AA363FB2D1C5">Query and Set the Current Playback Position</xref>  </p> </li> <li id="GUID-ADFC9AEB-30BE-56A0-B2C0-F6F2E7D12C2E"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-0A67AED6-860A-5D84-9CE3-6E30A673DD82">Query and Set the MIME and Codec Type</xref>  </p> </li> </ul> <p id="GUID-18902F43-1F13-5A91-84AD-94732560A554"><b>Setting the Display Window</b> </p> <p>The high level steps to set the display window are shown here: </p> <ul><li id="GUID-86A3CE74-3BC6-5C40-B9D4-9A6D89C2D059"><p> <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-34881891-A618-3E46-B6E2-3BA63324C0D7"><apiname>CVideoPlayerUtility::SetDisplayWindowL</apiname></xref>: This is used to provide the video controller with an area of display to render the current video frame. It can be represented pictorially as shown below: </p> <fig id="GUID-FAA210BE-66AB-5B23-AD33-F623B30AE305"><title>
    12 <concept xml:lang="en" id="GUID-F9896E96-1076-552D-AE54-8F9DABED867F"><title>Configuring the Video Player</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to configure the video player. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to make configuration adjustments to the video player. </p> <p><b>Required Background</b> </p> <p>The <xref href="GUID-2DC80BA9-7AA2-5CD3-9105-1DE28CE196C1.dita">Video Client Overview</xref> introduces the video client utilities. </p> <p><b>Introduction</b> </p> <p>The video player utility is used to open, play, and obtain information from sampled video data. This functionality is implemented by the <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita"><apiname>CVideoPlayerUtility</apiname></xref> class. The video data can be supplied either in a file, a descriptor or a URL. </p> </section> <section><title>Using Video Player </title> <p>The following tasks will be covered in this tutorial: </p> <ul><li id="GUID-0A783BCE-7C87-5EE1-BFDA-BD2847CF1E4F"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-18902F43-1F13-5A91-84AD-94732560A554">Set the Display Window</xref>  </p> </li> <li id="GUID-4A64B04C-737D-587E-BBA4-478EE453EC82"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-CDD3561D-84E4-5524-9593-5055659B6CB0"> Query and Set the Volume</xref>  </p> </li> <li id="GUID-15F0C370-6460-5D6D-8CDB-B042CBD4A7C6"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-BBCD720C-1276-5D6C-B9E6-1946EE019987">Query and Set the Balance</xref>  </p> </li> <li id="GUID-ACB66213-E77F-5F93-BF2D-A7DEECFA10D1"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-7666501B-196B-5FE9-A331-311B11BF7954">Query and Set the Priority</xref>  </p> </li> <li id="GUID-7E7ACD89-0ECB-5CD7-A550-571BC8F8FE1C"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-8B88F87D-A3F0-5521-92DA-C74EE2D942A8">Query and Set the Bit and Frame Rate</xref>  </p> </li> <li id="GUID-1ED08DD8-4D68-52AF-89DA-7617BCE9A388"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-7D998004-DC09-5328-B2EE-AA363FB2D1C5">Query and Set the Current Playback Position</xref>  </p> </li> <li id="GUID-ADFC9AEB-30BE-56A0-B2C0-F6F2E7D12C2E"><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita#GUID-F9896E96-1076-552D-AE54-8F9DABED867F/GUID-0A67AED6-860A-5D84-9CE3-6E30A673DD82">Query and Set the MIME and Codec Type</xref>  </p> </li> </ul> <p id="GUID-18902F43-1F13-5A91-84AD-94732560A554"><b>Setting the Display Window</b> </p> <p>The high level steps to set the display window are shown here: </p> <ul><li id="GUID-86A3CE74-3BC6-5C40-B9D4-9A6D89C2D059"><p> <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-34881891-A618-3E46-B6E2-3BA63324C0D7"><apiname>CVideoPlayerUtility::SetDisplayWindowL</apiname></xref>: This is used to provide the video controller with an area of display to render the current video frame. It can be represented pictorially as shown below: </p> <fig id="GUID-FAA210BE-66AB-5B23-AD33-F623B30AE305"><title>
    13                      Video display regions 
    13                      Video display regions 
    14                   </title> <image href="GUID-1E25EE44-9421-549C-B79E-AEFE87308011_d0e317843_href.png" placement="inline"/></fig> <p>The screeenRect specifies the area within the window provided for displaying the video image. This rectangle is in screen coordinates. The video frame will be fitted to this rectangle as best possible, while maintaining the original aspect ratio. </p> <p>The ClipRect specifies the region to draw. The drawn region will be the intersection between the ClipRect and the ScreenRect. </p> <p>A crop region is defined as a region in the source video frame. The cropped region is displayed in the center of the ScreenRect with the same scaling as if it was displayed as part of the whole image. This could be used to zoom in on a region by setting the crop region, and setting the scale factor to fill the WindowRect. </p> <codeblock id="GUID-3F331C91-F37E-5575-9994-A162E3C88EAD" xml:space="preserve">void CPlayVideo::SetDisplayWindowL(RWsSession &amp;aWs, CWsScreenDevice &amp;aScreenDevice, RWindowBase &amp;aWindow, const TRect &amp;aWindowRect, const TRect &amp;aClipRect)
    14                   </title> <image href="GUID-1E25EE44-9421-549C-B79E-AEFE87308011_d0e311449_href.png" placement="inline"/></fig> <p>The screeenRect specifies the area within the window provided for displaying the video image. This rectangle is in screen coordinates. The video frame will be fitted to this rectangle as best possible, while maintaining the original aspect ratio. </p> <p>The ClipRect specifies the region to draw. The drawn region will be the intersection between the ClipRect and the ScreenRect. </p> <p>A crop region is defined as a region in the source video frame. The cropped region is displayed in the center of the ScreenRect with the same scaling as if it was displayed as part of the whole image. This could be used to zoom in on a region by setting the crop region, and setting the scale factor to fill the WindowRect. </p> <codeblock id="GUID-3F331C91-F37E-5575-9994-A162E3C88EAD" xml:space="preserve">void CPlayVideo::SetDisplayWindowL(RWsSession &amp;aWs, CWsScreenDevice &amp;aScreenDevice, RWindowBase &amp;aWindow, const TRect &amp;aWindowRect, const TRect &amp;aClipRect)
    15     {
    15     {
    16     iVideoUtility-&gt;SetDisplayWindowL(aWs, aScreenDevice, aWindow, aWindowRect, aClipRect);
    16     iVideoUtility-&gt;SetDisplayWindowL(aWs, aScreenDevice, aWindow, aWindowRect, aClipRect);
    17     }
    17     }
    18 </codeblock> </li> </ul> <p id="GUID-CDD3561D-84E4-5524-9593-5055659B6CB0"><b>Querying and Setting the Volume</b> </p> <p>The current volume settings can be reported and set appropriately with the help of the following functions: : </p> <ul><li id="GUID-E8AFCF73-2B6E-5DF1-80EE-69B2E7D51260"><p> <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-4397F487-2C26-3F6C-B347-F58C0F8E1DB4"><apiname>CVideoPlayerUtility::Volume()</apiname></xref>: Returns the current playback volume for the audio track of the video clip. </p> <codeblock id="GUID-F4994952-BDBA-51D6-B1C5-6658EE4C31A5" xml:space="preserve">TInt CPlayVideo::Volume() 
    18 </codeblock> </li> </ul> <p id="GUID-CDD3561D-84E4-5524-9593-5055659B6CB0"><b>Querying and Setting the Volume</b> </p> <p>The current volume settings can be reported and set appropriately with the help of the following functions: : </p> <ul><li id="GUID-E8AFCF73-2B6E-5DF1-80EE-69B2E7D51260"><p> <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-4397F487-2C26-3F6C-B347-F58C0F8E1DB4"><apiname>CVideoPlayerUtility::Volume()</apiname></xref>: Returns the current playback volume for the audio track of the video clip. </p> <codeblock id="GUID-F4994952-BDBA-51D6-B1C5-6658EE4C31A5" xml:space="preserve">TInt CPlayVideo::Volume() 
    19     {
    19     {