102 lines
21 KiB
HTML
102 lines
21 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.15"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Olive: io/proxygenerator.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Olive
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.15 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_bc161955dc3a3d2485839eba21420d01.html">io</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">proxygenerator.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="proxygenerator_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/***</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"></span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> Olive - Non-Linear Video Editor</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright (C) 2019 Olive Team</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> (at your option) any later version.</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"></span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> GNU General Public License for more details.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"></span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"></span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">***/</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#ifndef PROXYGENERATOR_H</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#define PROXYGENERATOR_H</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <QThread></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <QVector></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <QMutex></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <QWaitCondition></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="footage_8h.html">project/footage.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="struct_proxy_info.html"> 31</a></span> <span class="keyword">struct </span><a class="code" href="struct_proxy_info.html">ProxyInfo</a> {</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="struct_proxy_info.html#a07f30b94716f628294f596570c049fbb"> 32</a></span>  <a class="code" href="footage_8h.html#a1ec6462954056c51931cc6066a7d3d71">FootagePtr</a> <a class="code" href="struct_proxy_info.html#a07f30b94716f628294f596570c049fbb">footage</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="struct_proxy_info.html#a87db25840a08533a3790a469bd6dc858"> 33</a></span>  <span class="keywordtype">double</span> <a class="code" href="struct_proxy_info.html#a87db25840a08533a3790a469bd6dc858">size_multiplier</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="struct_proxy_info.html#ac20fc0846a9e29401f1a3883338c4a63"> 34</a></span>  <span class="keywordtype">int</span> <a class="code" href="struct_proxy_info.html#ac20fc0846a9e29401f1a3883338c4a63">codec_type</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="struct_proxy_info.html#a8068fe17a1b0c45f37bab85d1f7d5dd8"> 35</a></span>  QString <a class="code" href="struct_proxy_info.html#a8068fe17a1b0c45f37bab85d1f7d5dd8">path</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> };</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_proxy_generator.html"> 38</a></span> <span class="keyword">class </span><a class="code" href="class_proxy_generator.html">ProxyGenerator</a> : <span class="keyword">public</span> QThread {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  Q_OBJECT</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <a class="code" href="class_proxy_generator.html#a4a2e4d8d23d93b024123cb3b337c9d33">ProxyGenerator</a>();</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordtype">void</span> <a class="code" href="class_proxy_generator.html#a87d99a9405a771187fc7db0229c2c1ae">run</a>();</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordtype">void</span> <a class="code" href="class_proxy_generator.html#a26ed12bfe4bd5f3b44df03234fe392dc">queue</a>(<span class="keyword">const</span> <a class="code" href="struct_proxy_info.html">ProxyInfo</a>& info);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">void</span> <a class="code" href="class_proxy_generator.html#ac8172fb75376a3e35b86c795488445dd">cancel</a>();</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordtype">double</span> <a class="code" href="class_proxy_generator.html#aabfc1141be138bd822cc836c9dd92359">get_proxy_progress</a>(<a class="code" href="footage_8h.html#a1ec6462954056c51931cc6066a7d3d71">FootagePtr</a> f);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="comment">// queue of footage to process proxies for</span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="class_proxy_generator.html#a1c0010e1fc73940499ed2beaeb773458"> 48</a></span>  QVector<ProxyInfo> <a class="code" href="class_proxy_generator.html#a1c0010e1fc73940499ed2beaeb773458">proxy_queue</a>;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="comment">// threading objects</span></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_proxy_generator.html#ada485635217b7fe0808149dd84d192a0"> 51</a></span>  QWaitCondition <a class="code" href="class_proxy_generator.html#ada485635217b7fe0808149dd84d192a0">waitCond</a>;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_proxy_generator.html#a1f321a319309b2eeaf089eeed9a90c1b"> 52</a></span>  QMutex <a class="code" href="class_proxy_generator.html#a1f321a319309b2eeaf089eeed9a90c1b">mutex</a>;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// set to true if you want to permanently close ProxyGenerator</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_proxy_generator.html#aae876b2da2db698e6a2fcdfc08681671"> 55</a></span>  <span class="keywordtype">bool</span> <a class="code" href="class_proxy_generator.html#aae876b2da2db698e6a2fcdfc08681671">cancelled</a>;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="comment">// set to true if you want to abort the footage currently being processed</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_proxy_generator.html#ada904e800c9a2fb3993e2c5faf6734b5"> 58</a></span>  <span class="keywordtype">bool</span> <a class="code" href="class_proxy_generator.html#ada904e800c9a2fb3993e2c5faf6734b5">skip</a>;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="comment">// stores progress in percent of proxy currently being processed</span></div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="class_proxy_generator.html#a98200810908dc2cbc24e4053d70930c4"> 61</a></span>  <span class="keywordtype">double</span> <a class="code" href="class_proxy_generator.html#a98200810908dc2cbc24e4053d70930c4">current_progress</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="comment">// function that performs the actual transcode</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordtype">void</span> <a class="code" href="class_proxy_generator.html#a427f27fda949b606070802f77c627709">transcode</a>(<span class="keyword">const</span> <a class="code" href="struct_proxy_info.html">ProxyInfo</a>& info);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> };</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// proxy generator is a global omnipotent entity</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">extern</span> <a class="code" href="class_proxy_generator.html">ProxyGenerator</a> <a class="code" href="proxygenerator_8h.html#a42be403e92317d5c4052ab11491d41d5">proxy_generator</a>;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="preprocessor">#endif // PROXYGENERATOR_H</span></div><div class="ttc" id="class_proxy_generator_html_aae876b2da2db698e6a2fcdfc08681671"><div class="ttname"><a href="class_proxy_generator.html#aae876b2da2db698e6a2fcdfc08681671">ProxyGenerator::cancelled</a></div><div class="ttdeci">bool cancelled</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:55</div></div>
|
|
<div class="ttc" id="struct_proxy_info_html_a07f30b94716f628294f596570c049fbb"><div class="ttname"><a href="struct_proxy_info.html#a07f30b94716f628294f596570c049fbb">ProxyInfo::footage</a></div><div class="ttdeci">FootagePtr footage</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:32</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_ada485635217b7fe0808149dd84d192a0"><div class="ttname"><a href="class_proxy_generator.html#ada485635217b7fe0808149dd84d192a0">ProxyGenerator::waitCond</a></div><div class="ttdeci">QWaitCondition waitCond</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:51</div></div>
|
|
<div class="ttc" id="struct_proxy_info_html"><div class="ttname"><a href="struct_proxy_info.html">ProxyInfo</a></div><div class="ttdef"><b>Definition:</b> proxygenerator.h:31</div></div>
|
|
<div class="ttc" id="footage_8h_html_a1ec6462954056c51931cc6066a7d3d71"><div class="ttname"><a href="footage_8h.html#a1ec6462954056c51931cc6066a7d3d71">FootagePtr</a></div><div class="ttdeci">std::shared_ptr< Footage > FootagePtr</div><div class="ttdef"><b>Definition:</b> footage.h:103</div></div>
|
|
<div class="ttc" id="struct_proxy_info_html_ac20fc0846a9e29401f1a3883338c4a63"><div class="ttname"><a href="struct_proxy_info.html#ac20fc0846a9e29401f1a3883338c4a63">ProxyInfo::codec_type</a></div><div class="ttdeci">int codec_type</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:34</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_a26ed12bfe4bd5f3b44df03234fe392dc"><div class="ttname"><a href="class_proxy_generator.html#a26ed12bfe4bd5f3b44df03234fe392dc">ProxyGenerator::queue</a></div><div class="ttdeci">void queue(const ProxyInfo &info)</div><div class="ttdef"><b>Definition:</b> proxygenerator.cpp:365</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_ada904e800c9a2fb3993e2c5faf6734b5"><div class="ttname"><a href="class_proxy_generator.html#ada904e800c9a2fb3993e2c5faf6734b5">ProxyGenerator::skip</a></div><div class="ttdeci">bool skip</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:58</div></div>
|
|
<div class="ttc" id="footage_8h_html"><div class="ttname"><a href="footage_8h.html">footage.h</a></div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_a98200810908dc2cbc24e4053d70930c4"><div class="ttname"><a href="class_proxy_generator.html#a98200810908dc2cbc24e4053d70930c4">ProxyGenerator::current_progress</a></div><div class="ttdeci">double current_progress</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:61</div></div>
|
|
<div class="ttc" id="proxygenerator_8h_html_a42be403e92317d5c4052ab11491d41d5"><div class="ttname"><a href="proxygenerator_8h.html#a42be403e92317d5c4052ab11491d41d5">proxy_generator</a></div><div class="ttdeci">ProxyGenerator proxy_generator</div><div class="ttdef"><b>Definition:</b> proxygenerator.cpp:410</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_aabfc1141be138bd822cc836c9dd92359"><div class="ttname"><a href="class_proxy_generator.html#aabfc1141be138bd822cc836c9dd92359">ProxyGenerator::get_proxy_progress</a></div><div class="ttdeci">double get_proxy_progress(FootagePtr f)</div><div class="ttdef"><b>Definition:</b> proxygenerator.cpp:402</div></div>
|
|
<div class="ttc" id="struct_proxy_info_html_a8068fe17a1b0c45f37bab85d1f7d5dd8"><div class="ttname"><a href="struct_proxy_info.html#a8068fe17a1b0c45f37bab85d1f7d5dd8">ProxyInfo::path</a></div><div class="ttdeci">QString path</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:35</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_a427f27fda949b606070802f77c627709"><div class="ttname"><a href="class_proxy_generator.html#a427f27fda949b606070802f77c627709">ProxyGenerator::transcode</a></div><div class="ttdeci">void transcode(const ProxyInfo &info)</div><div class="ttdef"><b>Definition:</b> proxygenerator.cpp:43</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_a1c0010e1fc73940499ed2beaeb773458"><div class="ttname"><a href="class_proxy_generator.html#a1c0010e1fc73940499ed2beaeb773458">ProxyGenerator::proxy_queue</a></div><div class="ttdeci">QVector< ProxyInfo > proxy_queue</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:48</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html"><div class="ttname"><a href="class_proxy_generator.html">ProxyGenerator</a></div><div class="ttdef"><b>Definition:</b> proxygenerator.h:38</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_ac8172fb75376a3e35b86c795488445dd"><div class="ttname"><a href="class_proxy_generator.html#ac8172fb75376a3e35b86c795488445dd">ProxyGenerator::cancel</a></div><div class="ttdeci">void cancel()</div><div class="ttdef"><b>Definition:</b> proxygenerator.cpp:390</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_a87d99a9405a771187fc7db0229c2c1ae"><div class="ttname"><a href="class_proxy_generator.html#a87d99a9405a771187fc7db0229c2c1ae">ProxyGenerator::run</a></div><div class="ttdeci">void run()</div><div class="ttdef"><b>Definition:</b> proxygenerator.cpp:326</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_a4a2e4d8d23d93b024123cb3b337c9d33"><div class="ttname"><a href="class_proxy_generator.html#a4a2e4d8d23d93b024123cb3b337c9d33">ProxyGenerator::ProxyGenerator</a></div><div class="ttdeci">ProxyGenerator()</div><div class="ttdef"><b>Definition:</b> proxygenerator.cpp:41</div></div>
|
|
<div class="ttc" id="class_proxy_generator_html_a1f321a319309b2eeaf089eeed9a90c1b"><div class="ttname"><a href="class_proxy_generator.html#a1f321a319309b2eeaf089eeed9a90c1b">ProxyGenerator::mutex</a></div><div class="ttdeci">QMutex mutex</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:52</div></div>
|
|
<div class="ttc" id="struct_proxy_info_html_a87db25840a08533a3790a469bd6dc858"><div class="ttname"><a href="struct_proxy_info.html#a87db25840a08533a3790a469bd6dc858">ProxyInfo::size_multiplier</a></div><div class="ttdeci">double size_multiplier</div><div class="ttdef"><b>Definition:</b> proxygenerator.h:33</div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.15
|
|
</small></address>
|
|
</body>
|
|
</html>
|