~beaky/wacs/wacs-php

« back to all changes in this revision

Viewing changes to docs/programming/htmlm/re69.html

  • Committer: beaky
  • Date: 2019-11-09 22:48:29 UTC
  • Revision ID: svn-v4:4196e993-711f-0410-950c-c89e1d26c723:wacs-php:2848
Added Threesome (3) set type and updated documentation build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>media_get_attr</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Wacs Programming Guide"><link rel="up" href="ch11s02.html" title="Identification Module: Reference"><link rel="prev" href="re68.html" title="media_scan"><link rel="next" href="re70.html" title="media_thumbs"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">media_get_attr</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re68.html">Prev</a>�</td><th width="60%" align="center">Identification Module: Reference</th><td width="20%" align="right">�<a accesskey="n" href="re70.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="api-id-mediagetattr"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>media_get_attr &#8212; retrieve the requested parameter for the specified media file
2
 
</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">use Wacs;</pre><pre class="funcsynopsisinfo">use Wacs::WacsId;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">scalar <b class="fsfunc">media_get_attr</b>(</code></td><td><var class="pdparam">filename</var>, </td><td>�</td></tr><tr><td>�</td><td><var class="pdparam">attribute</var><code>)</code>;</td><td>�</td></tr></table><div class="paramdef-list"><code>scalar <var class="pdparam">filename</var></code>;<br><code>scalar <var class="pdparam">attribute</var></code>;</div><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm139958061014640"></a><h2>Parameters</h2><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>parameter</th><th>description</th></tr></thead><tbody><tr><td><em class="parameter"><code>height</code></em></td><td>The height of the video/photo in pixels</td></tr><tr><td><em class="parameter"><code>width</code></em></td><td>The width of the video/photo in pixels</td></tr><tr><td><em class="parameter"><code>format</code></em></td><td>The format of the file: JPEG, PNG, TIFF for images; MOV, MPEG, WMV,
3
 
for videos</td></tr><tr><td><em class="parameter"><code>codec</code></em></td><td>The Codec format used - Windows Media, MPEG-2, etc</td></tr><tr><td><em class="parameter"><code>duration</code></em></td><td>The running time of a video clip</td></tr><tr><td><em class="parameter"><code>creation</code></em></td><td>The creation date in the corrext format for the current database</td></tr><tr><td><em class="parameter"><code>resolution</code></em></td><td>Text name of the resolution: LD, SD, ID, HD, UHD, Mobile etc</td></tr><tr><td><em class="parameter"><code>aspectratio</code></em></td><td>The actual numeric aspect ratio as a decimal number</td></tr><tr><td><em class="parameter"><code>aspect</code></em></td><td>The generalised aspect ratio expressed as a ratio: 4:3, 16:9, etc</td></tr><tr><td><em class="parameter"><code>durhrs</code></em></td><td>The video clip duration broken up into parts - the hours component</td></tr><tr><td><em class="parameter"><code>durmin</code></em></td><td>The video clip duration - the minutes component</td></tr><tr><td><em class="parameter"><code>dursec</code></em></td><td>The video clip duration - the seconds component</td></tr></tbody></table></div></div><div class="refsect1"><a name="idm139958060989904"></a><h2>Summary</h2><p>The <code class="function">media_get_attr</code> function fetches the 
4
 
specified result (attribute) of the media file named in the filename
5
 
parameter.  This is the filename provided by a previously run call 
6
 
to media scan to perform the actual scan itself.  A number of different
7
 
media scans can be queried at the same time so long as they do not have
8
 
the same file name.  The results are all obtained and stored during the
9
 
media_scan call and are simply retrieved from a results array when
10
 
using <code class="function">media_get_attr</code>.</p></div><div class="refsect1"><a name="idm139958060986848"></a><h2>Availability</h2><p><code class="function">media_get_attr</code> is available in Wacs 0.9.2 and later.
11
 
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re68.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ch11s02.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="re70.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">media_scan�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�media_thumbs</td></tr></table></div></body></html>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>info_setexists</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Wacs Programming Guide"><link rel="up" href="ch11s02.html" title="Identification Module: Reference"><link rel="prev" href="re68.html" title="info_addupdate"><link rel="next" href="re70.html" title="media_scan"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">info_setexists</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re68.html">Prev</a>�</td><th width="60%" align="center">Identification Module: Reference</th><td width="20%" align="right">�<a accesskey="n" href="re70.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="api-id-infosetexists"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>info_setexists &#8212; reads the .info.xml file and determines if the set number mentioned
 
2
already has an entry in it or not</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">use Wacs;</pre><pre class="funcsynopsisinfo">use Wacs::WacsId</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">scalar <b class="fsfunc">info_setexists</b>(</code></td><td>...<code>)</code>;</td><td>�</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm140511291933424"></a><h2>Parameters</h2><div class="informaltable"><table class="informaltable" border="1"><colgroup><col><col></colgroup><thead><tr><th>parameter</th><th>description</th></tr></thead><tbody><tr><td><em class="parameter"><code>setno</code></em></td><td>The number of the set to be checked for.</td></tr><tr><td><em class="parameter"><code>directory</code></em></td><td>The directory which should contain the .info.xml file.</td></tr></tbody></table></div></div><div class="refsect1"><a name="idm140511291925344"></a><h2>Summary</h2><p>The <code class="function">info_setexists</code> is used to detect if a set has
 
3
already been added to the database via a simple metadata file in XML format.
 
4
This metadata file is called <code class="literal">.info.xml</code> and is intended to
 
5
superceed the previous mechanism which used individual <code class="literal">.info</code>
 
6
files within the actual photo set directory for this purpose.  This second
 
7
source of metadata provides an extremely useful tool in detecting relocations
 
8
within the filesystem of the actually media assets being managed.  At present
 
9
it is primarily manipulated by the <span class="command"><strong>wacsupdinfo</strong></span> tool, which
 
10
is in turn called by <span class="command"><strong>wacsplacemgr</strong></span> in most cases.</p><p>The <code class="function">info_setexists</code> provides a number of return
 
11
values depending on what it discovers:</p><div class="informaltable"><table class="informaltable" border="1"><colgroup><col><col></colgroup><thead><tr><th>return</th><th>description</th></tr></thead><tbody><tr><td><span class="emphasis"><em>0 (SUCCESS)</em></span></td><td>The set already exists in the .info.xml file</td></tr><tr><td><span class="emphasis"><em>1 (SUCCESS)</em></span></td><td>The set does not exist yet within the .info.xml file but everything is
 
12
OK</td></tr><tr><td><span class="emphasis"><em>-1 (FAILURE)</em></span></td><td>The file does not exist yet.</td></tr><tr><td><span class="emphasis"><em>-2 (FAILURE)</em></span></td><td>The file exists but cannot be written to - most likely permissions
 
13
</td></tr><tr><td><span class="emphasis"><em>-3 (FAILURE)</em></span></td><td>Failure - Unknown reason</td></tr></tbody></table></div></div><div class="refsect1"><a name="idm140511291908000"></a><h2>Availability</h2><p><code class="function">info_setexists</code> is available in Wacs 1.0.0 and later.
 
14
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re68.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ch11s02.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="re70.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">info_addupdate�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�media_scan</td></tr></table></div></body></html>