Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > 9ee5ef51dbf4a00567f58cff4d0e160c > files > 147

qtmultimedia5-doc-5.9.4-1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qcameraimagecapture.cpp -->
  <title>QCameraImageCapture Class | Qt Multimedia 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtmultimedia-index.html">Qt Multimedia</a></td><td ><a href="qtmultimedia-modules.html">C++ Classes</a></td><td >QCameraImageCapture</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCameraImageCapture Class</h1>
<!-- $$$QCameraImageCapture-brief -->
<p>The <a href="qcameraimagecapture.html">QCameraImageCapture</a> class is used for the recording of media content. <a href="#details">More...</a></p>
<!-- @@@QCameraImageCapture -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QCameraImageCapture&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += multimedia</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qmediabindableinterface.html">QMediaBindableInterface</a> and </td></tr></table></div><ul>
<li><a href="qcameraimagecapture-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#CaptureDestination-enum">CaptureDestination</a></b> { CaptureToFile, CaptureToBuffer }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#CaptureDestination-enum">CaptureDestinations</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#DriveMode-enum">DriveMode</a></b> { SingleImageCapture }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#Error-enum">Error</a></b> { NoError, NotReadyError, ResourceError, OutOfSpaceError, NotSupportedFeatureError, FormatError }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qcameraimagecapture.html#readyForCapture-prop">readyForCapture</a></b> : const bool</li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#QCameraImageCapture">QCameraImageCapture</a></b>(QMediaObject *<i>mediaObject</i>, QObject *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#dtor.QCameraImageCapture">~QCameraImageCapture</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMultimedia::AvailabilityStatus </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#availability">availability</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVideoFrame::PixelFormat </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#bufferFormat">bufferFormat</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> CaptureDestinations </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#captureDestination">captureDestination</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QImageEncoderSettings </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#encodingSettings">encodingSettings</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Error </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#error">error</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#errorString">errorString</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#imageCodecDescription">imageCodecDescription</a></b>(const QString &amp;<i>codec</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#isAvailable">isAvailable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#isCaptureDestinationSupported">isCaptureDestinationSupported</a></b>(CaptureDestinations <i>destination</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#readyForCapture-prop">isReadyForCapture</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#setBufferFormat">setBufferFormat</a></b>(const QVideoFrame::PixelFormat <i>format</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#setCaptureDestination">setCaptureDestination</a></b>(CaptureDestinations <i>destination</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#setEncodingSettings">setEncodingSettings</a></b>(const QImageEncoderSettings &amp;<i>settings</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QVideoFrame::PixelFormat&gt; </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#supportedBufferFormats">supportedBufferFormats</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#supportedImageCodecs">supportedImageCodecs</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QSize&gt; </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#supportedResolutions">supportedResolutions</a></b>(const QImageEncoderSettings &amp;<i>settings</i> = QImageEncoderSettings(), bool *<i>continuous</i> = Q_NULLPTR) const</td></tr>
</table></div>
<a name="reimplemented-public-functions"></a>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QMediaObject *</td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#mediaObject">mediaObject</a></b>() const override</td></tr>
</table></div>
<ul>
<li class="fn">1 public function inherited from <a href="qmediabindableinterface.html#public-functions">QMediaBindableInterface</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#cancelCapture">cancelCapture</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#capture">capture</a></b>(const QString &amp;<i>file</i> = QString())</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#bufferFormatChanged">bufferFormatChanged</a></b>(QVideoFrame::PixelFormat <i>format</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#captureDestinationChanged">captureDestinationChanged</a></b>(QCameraImageCapture::CaptureDestinations <i>destination</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#error-1">error</a></b>(int <i>id</i>, QCameraImageCapture::Error <i>error</i>, const QString &amp;<i>errorString</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#imageAvailable">imageAvailable</a></b>(int <i>id</i>, const QVideoFrame &amp;<i>buffer</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#imageCaptured">imageCaptured</a></b>(int <i>id</i>, const QImage &amp;<i>preview</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#imageExposed">imageExposed</a></b>(int <i>id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#imageMetadataAvailable">imageMetadataAvailable</a></b>(int <i>id</i>, const QString &amp;<i>key</i>, const QVariant &amp;<i>value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#imageSaved">imageSaved</a></b>(int <i>id</i>, const QString &amp;<i>fileName</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#readyForCaptureChanged">readyForCaptureChanged</a></b>(bool <i>ready</i>)</td></tr>
</table></div>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qcameraimagecapture.html#setMediaObject">setMediaObject</a></b>(QMediaObject *<i>mediaObject</i>) override</td></tr>
</table></div>
<ul>
<li class="fn">1 protected function inherited from <a href="qmediabindableinterface.html#protected-functions">QMediaBindableInterface</a></li>
</ul>
<a name="details"></a>
<!-- $$$QCameraImageCapture-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qcameraimagecapture.html">QCameraImageCapture</a> class is used for the recording of media content.</p>
<p>The <a href="qcameraimagecapture.html">QCameraImageCapture</a> class is a high level images recording class. It's not intended to be used alone but for accessing the media recording functions of other media objects, like <a href="qcamera.html">QCamera</a>.</p>
<pre class="cpp">

  camera <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qcamera.html">QCamera</a></span>;

  viewfinder <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qcameraviewfinder.html">QCameraViewfinder</a></span>();
  viewfinder<span class="operator">-</span><span class="operator">&gt;</span>show();

  camera<span class="operator">-</span><span class="operator">&gt;</span>setViewfinder(viewfinder);

  imageCapture <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qcameraimagecapture.html#QCameraImageCapture">QCameraImageCapture</a></span>(camera);

  camera<span class="operator">-</span><span class="operator">&gt;</span>setCaptureMode(<span class="type"><a href="qcamera.html">QCamera</a></span><span class="operator">::</span>CaptureStillImage);
  camera<span class="operator">-</span><span class="operator">&gt;</span>start();
  <span class="comment">//on half pressed shutter button</span>
  camera<span class="operator">-</span><span class="operator">&gt;</span>searchAndLock();

  <span class="comment">//on shutter button pressed</span>
  imageCapture<span class="operator">-</span><span class="operator">&gt;</span>capture();

  <span class="comment">//on shutter button released</span>
  camera<span class="operator">-</span><span class="operator">&gt;</span>unlock();

</pre>
</div>
<p><b>See also </b><a href="qcamera.html">QCamera</a>.</p>
<!-- @@@QCameraImageCapture -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$CaptureDestination$$$CaptureToFile$$$CaptureToBuffer -->
<h3 class="flags" id="CaptureDestination-enum"><a name="CaptureDestination-enum"></a>enum QCameraImageCapture::<span class="name">CaptureDestination</span><br/>flags QCameraImageCapture::<span class="name">CaptureDestinations</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::CaptureToFile</code></td><td class="topAlign tblval"><code>0x01</code></td><td class="topAlign">Capture the image to a file.</td></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::CaptureToBuffer</code></td><td class="topAlign tblval"><code>0x02</code></td><td class="topAlign">Capture the image to a buffer for further processing.</td></tr>
</table></div>
<p>The CaptureDestinations type is a typedef for <a href="">QFlags</a>&lt;CaptureDestination&gt;. It stores an OR combination of CaptureDestination values.</p>
<!-- @@@CaptureDestination -->
<!-- $$$DriveMode$$$SingleImageCapture -->
<h3 class="fn" id="DriveMode-enum"><a name="DriveMode-enum"></a>enum QCameraImageCapture::<span class="name">DriveMode</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::SingleImageCapture</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Drive mode is capturing a single picture.</td></tr>
</table></div>
<!-- @@@DriveMode -->
<!-- $$$Error$$$NoError$$$NotReadyError$$$ResourceError$$$OutOfSpaceError$$$NotSupportedFeatureError$$$FormatError -->
<h3 class="fn" id="Error-enum"><a name="Error-enum"></a>enum QCameraImageCapture::<span class="name">Error</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::NoError</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">No Errors.</td></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::NotReadyError</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The service is not ready for capture yet.</td></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::ResourceError</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Device is not ready or not available.</td></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::OutOfSpaceError</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">No space left on device.</td></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::NotSupportedFeatureError</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Device does not support stillimages capture.</td></tr>
<tr><td class="topAlign"><code>QCameraImageCapture::FormatError</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Current format is not supported.</td></tr>
</table></div>
<!-- @@@Error -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$readyForCapture-prop$$$isReadyForCapture$$$readyForCaptureChangedbool -->
<h3 class="fn" id="readyForCapture-prop"><a name="readyForCapture-prop"></a><span class="name">readyForCapture</span> : const <span class="type">bool</span></h3>
<p>This property holds whether the service is ready to capture a an image immediately.</p>
<p>Calling <a href="qcameraimagecapture.html#capture">capture</a>() while <i>readyForCapture</i> is <code>false</code> is not permitted and results in an error.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isReadyForCapture</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qcameraimagecapture.html#readyForCaptureChanged">readyForCaptureChanged</a></b></span>(bool <i>ready</i>)</td></tr>
</table></div>
<!-- @@@readyForCapture -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCameraImageCapture[overload1]$$$QCameraImageCaptureQMediaObject*QObject* -->
<h3 class="fn" id="QCameraImageCapture"><a name="QCameraImageCapture"></a>QCameraImageCapture::<span class="name">QCameraImageCapture</span>(<span class="type"><a href="qmediaobject.html">QMediaObject</a></span> *<i>mediaObject</i>, <span class="type">QObject</span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a media recorder which records the media produced by <i>mediaObject</i>.</p>
<p>The <i>parent</i> is passed to <a href="qmediaobject.html">QMediaObject</a>.</p>
<!-- @@@QCameraImageCapture -->
<!-- $$$~QCameraImageCapture[overload1]$$$~QCameraImageCapture -->
<h3 class="fn" id="dtor.QCameraImageCapture"><a name="dtor.QCameraImageCapture"></a>QCameraImageCapture::<span class="name">~QCameraImageCapture</span>()</h3>
<p>Destroys images capture object.</p>
<!-- @@@~QCameraImageCapture -->
<!-- $$$availability[overload1]$$$availability -->
<h3 class="fn" id="availability"><a name="availability"></a><span class="type"><a href="qmultimedia.html#AvailabilityStatus-enum">QMultimedia::AvailabilityStatus</a></span> QCameraImageCapture::<span class="name">availability</span>() const</h3>
<p>Returns the availability of this functionality.</p>
<!-- @@@availability -->
<!-- $$$bufferFormat[overload1]$$$bufferFormat -->
<h3 class="fn" id="bufferFormat"><a name="bufferFormat"></a><span class="type"><a href="qvideoframe.html#PixelFormat-enum">QVideoFrame::PixelFormat</a></span> QCameraImageCapture::<span class="name">bufferFormat</span>() const</h3>
<p>Returns the buffer image capture format being used.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#supportedBufferFormats">supportedBufferFormats</a>() and <a href="qcameraimagecapture.html#setBufferFormat">setBufferFormat</a>().</p>
<!-- @@@bufferFormat -->
<!-- $$$bufferFormatChanged[overload1]$$$bufferFormatChangedQVideoFrame::PixelFormat -->
<h3 class="fn" id="bufferFormatChanged"><a name="bufferFormatChanged"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">bufferFormatChanged</span>(<span class="type"><a href="qvideoframe.html#PixelFormat-enum">QVideoFrame::PixelFormat</a></span> <i>format</i>)</h3>
<p>Signal emitted when the buffer <i>format</i> for the buffer image capture has changed.</p>
<!-- @@@bufferFormatChanged -->
<!-- $$$cancelCapture[overload1]$$$cancelCapture -->
<h3 class="fn" id="cancelCapture"><a name="cancelCapture"></a><code>[slot] </code><span class="type">void</span> QCameraImageCapture::<span class="name">cancelCapture</span>()</h3>
<p>Cancel incomplete capture requests. Already captured and queused for proicessing images may be discarded.</p>
<!-- @@@cancelCapture -->
<!-- $$$capture[overload1]$$$captureconstQString& -->
<h3 class="fn" id="capture"><a name="capture"></a><code>[slot] </code><span class="type">int</span> QCameraImageCapture::<span class="name">capture</span>(const <span class="type">QString</span> &amp;<i>file</i> = QString())</h3>
<p>Capture the image and save it to <i>file</i>. This operation is asynchronous in majority of cases, followed by signals <a href="qcameraimagecapture.html#imageExposed">QCameraImageCapture::imageExposed</a>(), <a href="qcameraimagecapture.html#imageCaptured">QCameraImageCapture::imageCaptured</a>(), <a href="qcameraimagecapture.html#imageSaved">QCameraImageCapture::imageSaved</a>() or <a href="qcameraimagecapture.html#error">QCameraImageCapture::error</a>().</p>
<p>If an empty <i>file</i> is passed, the camera backend choses the default location and naming scheme for photos on the system, if only file name without full path is specified, the image will be saved to the default directory, with a full path reported with <a href="qcameraimagecapture.html#imageCaptured">imageCaptured</a>() and <a href="qcameraimagecapture.html#imageSaved">imageSaved</a>() signals.</p>
<p><a href="qcamera.html">QCamera</a> saves all the capture parameters like exposure settings or image processing parameters, so changes to camera parameters after capture() is called do not affect previous capture requests.</p>
<p>QCameraImageCapture::capture returns the capture Id parameter, used with <a href="qcameraimagecapture.html#imageExposed">imageExposed</a>(), <a href="qcameraimagecapture.html#imageCaptured">imageCaptured</a>() and <a href="qcameraimagecapture.html#imageSaved">imageSaved</a>() signals.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#readyForCapture-prop">isReadyForCapture</a>().</p>
<!-- @@@capture -->
<!-- $$$captureDestination[overload1]$$$captureDestination -->
<h3 class="fn" id="captureDestination"><a name="captureDestination"></a><span class="type"><a href="qcameraimagecapture.html#CaptureDestination-enum">CaptureDestinations</a></span> QCameraImageCapture::<span class="name">captureDestination</span>() const</h3>
<p>Returns the image capture destination being used.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#isCaptureDestinationSupported">isCaptureDestinationSupported</a>() and <a href="qcameraimagecapture.html#setCaptureDestination">setCaptureDestination</a>().</p>
<!-- @@@captureDestination -->
<!-- $$$captureDestinationChanged[overload1]$$$captureDestinationChangedQCameraImageCapture::CaptureDestinations -->
<h3 class="fn" id="captureDestinationChanged"><a name="captureDestinationChanged"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">captureDestinationChanged</span>(<span class="type"><a href="qcameraimagecapture.html#CaptureDestination-enum">QCameraImageCapture::CaptureDestinations</a></span> <i>destination</i>)</h3>
<p>Signal emitted when the capture <i>destination</i> has changed.</p>
<!-- @@@captureDestinationChanged -->
<!-- $$$encodingSettings[overload1]$$$encodingSettings -->
<h3 class="fn" id="encodingSettings"><a name="encodingSettings"></a><span class="type"><a href="qimageencodersettings.html">QImageEncoderSettings</a></span> QCameraImageCapture::<span class="name">encodingSettings</span>() const</h3>
<p>Returns the image encoder settings being used.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#setEncodingSettings">setEncodingSettings</a>().</p>
<!-- @@@encodingSettings -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn" id="error"><a name="error"></a><span class="type"><a href="qcameraimagecapture.html#Error-enum">Error</a></span> QCameraImageCapture::<span class="name">error</span>() const</h3>
<p>Returns the current error state.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#errorString">errorString</a>().</p>
<!-- @@@error -->
<!-- $$$error$$$errorintQCameraImageCapture::ErrorconstQString& -->
<h3 class="fn" id="error-1"><a name="error-1"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">error</span>(<span class="type">int</span> <i>id</i>, <span class="type"><a href="qcameraimagecapture.html#Error-enum">QCameraImageCapture::Error</a></span> <i>error</i>, const <span class="type">QString</span> &amp;<i>errorString</i>)</h3>
<p>Signals that the capture request <i>id</i> has failed with an <i>error</i> and <i>errorString</i> description.</p>
<p><b>Note:</b> Signal <i>error</i> is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:<pre class="cpp">

  connect(cameraImageCapture<span class="operator">,</span> <span class="keyword">static_cast</span><span class="operator">&lt;</span><span class="type">void</span>(<span class="type"><a href="qcameraimagecapture.html#QCameraImageCapture">QCameraImageCapture</a></span><span class="operator">::</span><span class="operator">*</span>)(<span class="type">int</span><span class="operator">,</span> <span class="type"><a href="qcameraimagecapture.html#QCameraImageCapture">QCameraImageCapture</a></span><span class="operator">::</span>Error<span class="operator">,</span> <span class="keyword">const</span> <span class="type">QString</span> <span class="operator">&amp;</span>)<span class="operator">&gt;</span>(<span class="operator">&amp;</span><span class="type"><a href="qcameraimagecapture.html#QCameraImageCapture">QCameraImageCapture</a></span><span class="operator">::</span>error)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="type">int</span> id<span class="operator">,</span> <span class="type"><a href="qcameraimagecapture.html#QCameraImageCapture">QCameraImageCapture</a></span><span class="operator">::</span>Error error<span class="operator">,</span> <span class="keyword">const</span> <span class="type">QString</span> <span class="operator">&amp;</span>errorString){ <span class="comment">/* ... */</span> });

</pre>
<!-- @@@error -->
<!-- $$$errorString[overload1]$$$errorString -->
<h3 class="fn" id="errorString"><a name="errorString"></a><span class="type">QString</span> QCameraImageCapture::<span class="name">errorString</span>() const</h3>
<p>Returns a string describing the current error state.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#error">error</a>().</p>
<!-- @@@errorString -->
<!-- $$$imageAvailable[overload1]$$$imageAvailableintconstQVideoFrame& -->
<h3 class="fn" id="imageAvailable"><a name="imageAvailable"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">imageAvailable</span>(<span class="type">int</span> <i>id</i>, const <span class="type"><a href="qvideoframe.html">QVideoFrame</a></span> &amp;<i>buffer</i>)</h3>
<p>Signal emitted when the frame with request <i>id</i> is available as <i>buffer</i>.</p>
<!-- @@@imageAvailable -->
<!-- $$$imageCaptured[overload1]$$$imageCapturedintconstQImage& -->
<h3 class="fn" id="imageCaptured"><a name="imageCaptured"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">imageCaptured</span>(<span class="type">int</span> <i>id</i>, const <span class="type">QImage</span> &amp;<i>preview</i>)</h3>
<p>Signal emitted when the frame with request <i>id</i> was captured, but not processed and saved yet. Frame <i>preview</i> can be displayed to user.</p>
<!-- @@@imageCaptured -->
<!-- $$$imageCodecDescription[overload1]$$$imageCodecDescriptionconstQString& -->
<h3 class="fn" id="imageCodecDescription"><a name="imageCodecDescription"></a><span class="type">QString</span> QCameraImageCapture::<span class="name">imageCodecDescription</span>(const <span class="type">QString</span> &amp;<i>codec</i>) const</h3>
<p>Returns a description of an image <i>codec</i>.</p>
<!-- @@@imageCodecDescription -->
<!-- $$$imageExposed[overload1]$$$imageExposedint -->
<h3 class="fn" id="imageExposed"><a name="imageExposed"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">imageExposed</span>(<span class="type">int</span> <i>id</i>)</h3>
<p>Signal emitted when the frame with request <i>id</i> was exposed.</p>
<!-- @@@imageExposed -->
<!-- $$$imageMetadataAvailable[overload1]$$$imageMetadataAvailableintconstQString&constQVariant& -->
<h3 class="fn" id="imageMetadataAvailable"><a name="imageMetadataAvailable"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">imageMetadataAvailable</span>(<span class="type">int</span> <i>id</i>, const <span class="type">QString</span> &amp;<i>key</i>, const <span class="type">QVariant</span> &amp;<i>value</i>)</h3>
<p>Signals that a metadata for an image with request <i>id</i> is available. Also includes the <i>key</i> and <i>value</i> of the metadata.</p>
<p>This signal is emitted between <a href="qcameraimagecapture.html#imageExposed">imageExposed</a> and <a href="qcameraimagecapture.html#imageSaved">imageSaved</a> signals.</p>
<!-- @@@imageMetadataAvailable -->
<!-- $$$imageSaved[overload1]$$$imageSavedintconstQString& -->
<h3 class="fn" id="imageSaved"><a name="imageSaved"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">imageSaved</span>(<span class="type">int</span> <i>id</i>, const <span class="type">QString</span> &amp;<i>fileName</i>)</h3>
<p>Signal emitted when the frame with request <i>id</i> was saved to <i>fileName</i>.</p>
<!-- @@@imageSaved -->
<!-- $$$isAvailable[overload1]$$$isAvailable -->
<h3 class="fn" id="isAvailable"><a name="isAvailable"></a><span class="type">bool</span> QCameraImageCapture::<span class="name">isAvailable</span>() const</h3>
<p>Returns true if the images capture service ready to use.</p>
<!-- @@@isAvailable -->
<!-- $$$isCaptureDestinationSupported[overload1]$$$isCaptureDestinationSupportedCaptureDestinations -->
<h3 class="fn" id="isCaptureDestinationSupported"><a name="isCaptureDestinationSupported"></a><span class="type">bool</span> QCameraImageCapture::<span class="name">isCaptureDestinationSupported</span>(<span class="type"><a href="qcameraimagecapture.html#CaptureDestination-enum">CaptureDestinations</a></span> <i>destination</i>) const</h3>
<p>Returns true if the image capture <i>destination</i> is supported; otherwise returns false.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#captureDestination">captureDestination</a>() and <a href="qcameraimagecapture.html#setCaptureDestination">setCaptureDestination</a>().</p>
<!-- @@@isCaptureDestinationSupported -->
<!-- $$$mediaObject[overload1]$$$mediaObject -->
<h3 class="fn" id="mediaObject"><a name="mediaObject"></a><code>[override virtual] </code><span class="type"><a href="qmediaobject.html">QMediaObject</a></span> *QCameraImageCapture::<span class="name">mediaObject</span>() const</h3>
<p>Reimplemented from <a href="qmediabindableinterface.html#mediaObject">QMediaBindableInterface::mediaObject</a>().</p>
<p><b>See also </b><a href="qcameraimagecapture.html#setMediaObject">setMediaObject</a>().</p>
<!-- @@@mediaObject -->
<!-- $$$readyForCaptureChanged -->
<h3 class="fn" id="readyForCaptureChanged"><a name="readyForCaptureChanged"></a><code>[signal] </code><span class="type">void</span> QCameraImageCapture::<span class="name">readyForCaptureChanged</span>(<span class="type">bool</span> <i>ready</i>)</h3>
<p>Signals that a camera's <i>ready</i> for capture state has changed.</p>
<p><b>Note:</b> Notifier signal for property <a href="qcameraimagecapture.html#readyForCapture-prop">readyForCapture</a>. </p><!-- @@@readyForCaptureChanged -->
<!-- $$$setBufferFormat[overload1]$$$setBufferFormatconstQVideoFrame::PixelFormat -->
<h3 class="fn" id="setBufferFormat"><a name="setBufferFormat"></a><span class="type">void</span> QCameraImageCapture::<span class="name">setBufferFormat</span>(const <span class="type"><a href="qvideoframe.html#PixelFormat-enum">QVideoFrame::PixelFormat</a></span> <i>format</i>)</h3>
<p>Sets the buffer image capture <i>format</i> to be used.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#bufferFormat">bufferFormat</a>(), <a href="qcameraimagecapture.html#supportedBufferFormats">supportedBufferFormats</a>(), and <a href="qcameraimagecapture.html#captureDestination">captureDestination</a>().</p>
<!-- @@@setBufferFormat -->
<!-- $$$setCaptureDestination[overload1]$$$setCaptureDestinationCaptureDestinations -->
<h3 class="fn" id="setCaptureDestination"><a name="setCaptureDestination"></a><span class="type">void</span> QCameraImageCapture::<span class="name">setCaptureDestination</span>(<span class="type"><a href="qcameraimagecapture.html#CaptureDestination-enum">CaptureDestinations</a></span> <i>destination</i>)</h3>
<p>Sets the capture <i>destination</i> to be used.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#isCaptureDestinationSupported">isCaptureDestinationSupported</a>() and <a href="qcameraimagecapture.html#captureDestination">captureDestination</a>().</p>
<!-- @@@setCaptureDestination -->
<!-- $$$setEncodingSettings[overload1]$$$setEncodingSettingsconstQImageEncoderSettings& -->
<h3 class="fn" id="setEncodingSettings"><a name="setEncodingSettings"></a><span class="type">void</span> QCameraImageCapture::<span class="name">setEncodingSettings</span>(const <span class="type"><a href="qimageencodersettings.html">QImageEncoderSettings</a></span> &amp;<i>settings</i>)</h3>
<p>Sets the image encoding <i>settings</i>.</p>
<p>If some parameters are not specified, or null settings are passed, the encoder choose the default encoding parameters.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#encodingSettings">encodingSettings</a>().</p>
<!-- @@@setEncodingSettings -->
<!-- $$$setMediaObject[overload1]$$$setMediaObjectQMediaObject* -->
<h3 class="fn" id="setMediaObject"><a name="setMediaObject"></a><code>[override virtual protected] </code><span class="type">bool</span> QCameraImageCapture::<span class="name">setMediaObject</span>(<span class="type"><a href="qmediaobject.html">QMediaObject</a></span> *<i>mediaObject</i>)</h3>
<p>Reimplemented from <a href="qmediabindableinterface.html#setMediaObject">QMediaBindableInterface::setMediaObject</a>().</p>
<p><b>See also </b><a href="qcameraimagecapture.html#mediaObject">mediaObject</a>().</p>
<!-- @@@setMediaObject -->
<!-- $$$supportedBufferFormats[overload1]$$$supportedBufferFormats -->
<h3 class="fn" id="supportedBufferFormats"><a name="supportedBufferFormats"></a><span class="type">QList</span>&lt;<span class="type"><a href="qvideoframe.html#PixelFormat-enum">QVideoFrame::PixelFormat</a></span>&gt; QCameraImageCapture::<span class="name">supportedBufferFormats</span>() const</h3>
<p>Returns the list of supported buffer image capture formats.</p>
<p><b>See also </b><a href="qcameraimagecapture.html#bufferFormat">bufferFormat</a>() and <a href="qcameraimagecapture.html#setBufferFormat">setBufferFormat</a>().</p>
<!-- @@@supportedBufferFormats -->
<!-- $$$supportedImageCodecs[overload1]$$$supportedImageCodecs -->
<h3 class="fn" id="supportedImageCodecs"><a name="supportedImageCodecs"></a><span class="type">QStringList</span> QCameraImageCapture::<span class="name">supportedImageCodecs</span>() const</h3>
<p>Returns a list of supported image codecs.</p>
<!-- @@@supportedImageCodecs -->
<!-- $$$supportedResolutions[overload1]$$$supportedResolutionsconstQImageEncoderSettings&bool* -->
<h3 class="fn" id="supportedResolutions"><a name="supportedResolutions"></a><span class="type">QList</span>&lt;<span class="type">QSize</span>&gt; QCameraImageCapture::<span class="name">supportedResolutions</span>(const <span class="type"><a href="qimageencodersettings.html">QImageEncoderSettings</a></span> &amp;<i>settings</i> = QImageEncoderSettings(), <span class="type">bool</span> *<i>continuous</i> = Q_NULLPTR) const</h3>
<p>Returns a list of resolutions images can be encoded at.</p>
<p>If non null image <i>settings</i> parameter is passed, the returned list is reduced to resolution supported with partial settings like image codec or quality applied.</p>
<p>If the encoder supports arbitrary resolutions within the supported range, *<i>continuous</i> is set to true, otherwise *<i>continuous</i> is set to false.</p>
<p><b>See also </b><a href="qimageencodersettings.html#resolution">QImageEncoderSettings::resolution</a>().</p>
<!-- @@@supportedResolutions -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>