{"id":481,"date":"2014-01-09T21:11:51","date_gmt":"2014-01-09T12:11:51","guid":{"rendered":"http:\/\/iphone-users.ddo.jp\/wordpress\/?p=481"},"modified":"2014-01-13T11:49:07","modified_gmt":"2014-01-13T02:49:07","slug":"ubuntu12-04%e3%81%abair-video-server%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/iphone-users.ddo.jp\/wordpress\/?p=481","title":{"rendered":"ubuntu12.04\u306bAir Video Server\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002"},"content":{"rendered":"<p>\n\t\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u306e\uff13\u3064\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3002\n<\/p>\n<p>\n\tadd-apt-repository ppa:rubiojr\/airvideo\n<\/p>\n<p>\n\tapt-get update\n<\/p>\n<p>\n\tapt-get install airvideo-server\n<\/p>\n<p>\n\t<iframe loading=\"lazy\" allowfullscreen=\"\" frameborder=\"0\" height=\"315\" src=\"\/\/www.youtube.com\/embed\/yzvXSq1Se9Q\" width=\"420\"><\/iframe>\n<\/p>\n<p>\n\t\u91cd\u8981\u306a\u306e\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u4f5c\u6210\u3055\u308c\u305f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4f7f\u308f\u305a\u306b\/opt\/airvideo-server\u5185\u306btray\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u3001\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u30920755\u306b\u8a2d\u5b9a\u3057\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u8d77\u52d5\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n\t<span style=\"color:#FF0000;\">\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u3066java -jar \/opt\/airvideo-server\/AirVideoServerLinux.jar \/opt\/airvideo-server\/AirVideoServerLinux.properties\u3092\u5b9f\u884c\u3057\u3066\u3082\u52d5\u4f5c\u3057\u307e\u3059\u304c\u30b5\u30fc\u30d0\u30fc\u306e\u8d77\u52d5\u30fb\u505c\u6b62\u304c\u3067\u304d\u306a\u3044\u306e\u3067tray\u3092\u4f5c\u6210\u3057\u305f\u65b9\u304c\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002\uff082014\/1\/13\u8ffd\u52a0\uff09<\/span>\n<\/p>\n<p>\n\t#!\/usr\/bin\/env ruby<br \/>\n\trequire &#39;Qt4&#39;\n<\/p>\n<p>\n\tclass Tray &lt; Qt::SystemTrayIcon<br \/>\n\t&nbsp;&nbsp; &nbsp;<br \/>\n\t&nbsp;&nbsp;&nbsp; slots :startStopAction, :quit\n<\/p>\n<p>\n\t&nbsp;&nbsp;&nbsp; def initialize(parent = nil)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super(parent)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @serverThread = nil<br \/>\n\t&nbsp;&nbsp; &nbsp;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @serverRunning = false<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @startStopAction = Qt::Action.new(tr(&quot;&amp;Start Server&quot;), self)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect(@startStopAction, SIGNAL(:triggered), self, SLOT(:startStopAction))<br \/>\n\t&nbsp;&nbsp; &nbsp;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @quitAction = Qt::Action.new(tr(&quot;&amp;Quit&quot;), self)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect(@quitAction, SIGNAL(:triggered), self, SLOT(:quit))<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @trayIconMenu = Qt::Menu.new(nil) do |t|<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.addAction(@startStopAction)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.addSeparator()<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.addAction(@quitAction)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.contextMenu = @trayIconMenu<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.icon = Qt::Icon.new(&quot;#{File.dirname(__FILE__)}\/airvideo-tray-off.png&quot;)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.toolTip = &#39;AirVideo Server&#39;<br \/>\n\t&nbsp;&nbsp;&nbsp; end\n<\/p>\n<p>\n\t&nbsp;&nbsp;&nbsp; def quit<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if @serverThread<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Process.kill(9, @serverThread)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $qApp.quit<br \/>\n\t&nbsp;&nbsp;&nbsp; end\n<\/p>\n<p>\n\t&nbsp;&nbsp;&nbsp; def startStopAction<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if @serverRunning<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @startStopAction.text = &#39;Start Server&#39;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @serverRunning = false<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if @serverThread<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Process.kill(9, @serverThread)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.icon = Qt::Icon.new(&quot;#{File.dirname(__FILE__)}\/airvideo-tray-off.png&quot;)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @startStopAction.text = &#39;Stop Server&#39;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @serverRunning = true<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd = &#39;java -jar \/opt\/airvideo-server\/AirVideoServerLinux.jar \/opt\/airvideo-server\/AirVideoServerLinux.properties&#39;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @serverThread = fork { exec cmd }<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.icon = Qt::Icon.new(&quot;#{File.dirname(__FILE__)}\/airvideo-tray.png&quot;)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<br \/>\n\t&nbsp;&nbsp;&nbsp; end<br \/>\n\t&nbsp;&nbsp; &nbsp;<br \/>\n\t&nbsp;&nbsp;&nbsp; def createTrayIcon()<br \/>\n\t&nbsp;&nbsp;&nbsp; end<br \/>\n\tend\n<\/p>\n<p>\n\tapp = Qt::Application.new(ARGV)\n<\/p>\n<p>\n\tif !Qt::SystemTrayIcon.isSystemTrayAvailable<br \/>\n\t&nbsp;&nbsp;&nbsp; Qt::MessageBox.critical(nil, Qt::Object.tr(&quot;Systray&quot;),<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Qt::Object.tr(&quot;I couldn&#39;t detect any system tray &quot; \\<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;on this system.&quot;))<br \/>\n\t&nbsp;&nbsp;&nbsp; exit 1<br \/>\n\tend\n<\/p>\n<p>\n\ttray = Tray.new<br \/>\n\ttray.show<br \/>\n\tapp.exec\n<\/p>\n<p>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u306e\uff13\u3064\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3002 add-apt-repository ppa:rubiojr\/airvideo apt-get update apt-get install airvideo-server \u91cd\u8981\u306a &#8230;<\/p>\n<p><a href=\"https:\/\/iphone-users.ddo.jp\/wordpress\/?p=481\" class=\"more-link\">Continue reading &lsquo;ubuntu12.04\u306bAir Video Server\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=481"}],"version-history":[{"count":5,"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/481\/revisions"}],"predecessor-version":[{"id":483,"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/481\/revisions\/483"}],"wp:attachment":[{"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iphone-users.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}