add x10tv ati remote rework, android remote rework, wintv remote tweaks
authorGood Guy <good1.2guy@gmail.com>
Sat, 11 Jan 2020 02:44:20 +0000 (19:44 -0700)
committerGood Guy <good1.2guy@gmail.com>
Sat, 11 Jan 2020 02:44:20 +0000 (19:44 -0700)
50 files changed:
CineRmt/.idea/assetWizardSettings.xml [new file with mode: 0644]
CineRmt/.idea/codeStyles/Project.xml
CineRmt/.idea/dictionaries/root.xml [new file with mode: 0644]
CineRmt/.idea/gradle.xml
CineRmt/.idea/vcs.xml [new file with mode: 0644]
CineRmt/app/release/output.json
CineRmt/app/src/main/java/com/local/cinermt/MainActivity.java
CineRmt/app/src/main/res/drawable-v24/ic_launcher_foreground.xml [deleted file]
CineRmt/app/src/main/res/drawable/ic_launcher_background.xml [deleted file]
CineRmt/app/src/main/res/layout/activity_main.xml
CineRmt/app/src/main/res/layout/content_main.xml
CineRmt/app/src/main/res/menu/menu_main.xml
CineRmt/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml [deleted file]
CineRmt/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml [deleted file]
CineRmt/app/src/main/res/mipmap-hdpi/ic_launcher.png [deleted file]
CineRmt/app/src/main/res/mipmap-hdpi/ic_launcher_round.png [deleted file]
CineRmt/app/src/main/res/mipmap-hdpi/zfigcc.png [moved from CineRmt/app/src/main/res/mipmap-hdpi/exit.png with 100% similarity]
CineRmt/app/src/main/res/mipmap-mdpi/ic_launcher.png [deleted file]
CineRmt/app/src/main/res/mipmap-mdpi/ic_launcher_round.png [deleted file]
CineRmt/app/src/main/res/mipmap-xhdpi/ic_launcher.png [deleted file]
CineRmt/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png [deleted file]
CineRmt/app/src/main/res/mipmap-xxhdpi/ic_launcher.png [deleted file]
CineRmt/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png [deleted file]
CineRmt/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png [deleted file]
CineRmt/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png [deleted file]
CineRmt/app/src/main/res/values/styles.xml
CineRmt/build.gradle
CineRmt/gradle/wrapper/gradle-wrapper.properties
cinelerra-5.1/cinelerra/Makefile
cinelerra-5.1/cinelerra/androidcontrol.C
cinelerra-5.1/cinelerra/cwindow.C
cinelerra-5.1/cinelerra/cwindow.h
cinelerra-5.1/cinelerra/cwindow.inc
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindow.h
cinelerra-5.1/cinelerra/mwindowgui.C
cinelerra-5.1/cinelerra/mwindowgui.h
cinelerra-5.1/cinelerra/record.C
cinelerra-5.1/cinelerra/record.h
cinelerra-5.1/cinelerra/record.inc
cinelerra-5.1/cinelerra/remotecontrol.C
cinelerra-5.1/cinelerra/remotecontrol.h
cinelerra-5.1/cinelerra/wintv.C
cinelerra-5.1/cinelerra/wintv.h
cinelerra-5.1/cinelerra/x10tv.C [new file with mode: 0644]
cinelerra-5.1/cinelerra/x10tv.h [new file with mode: 0644]
cinelerra-5.1/cinelerra/x10tv.inc [new file with mode: 0644]
cinelerra-5.1/configure.ac
cinelerra-5.1/guicast/bcwindowbase.C
cinelerra-5.1/guicast/keys.h

diff --git a/CineRmt/.idea/assetWizardSettings.xml b/CineRmt/.idea/assetWizardSettings.xml
new file mode 100644 (file)
index 0000000..2a9c5e0
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="WizardSettings">
+    <option name="children">
+      <map>
+        <entry key="imageWizard">
+          <value>
+            <PersistentState />
+          </value>
+        </entry>
+      </map>
+    </option>
+  </component>
+</project>
\ No newline at end of file
index 30aa626c23142d59e94cc76327172301f159b618..ae78c113ffe1ce77dc1e8b7339ce5ca70cc215db 100644 (file)
 <component name="ProjectCodeStyleConfiguration">
   <code_scheme name="Project" version="173">
-    <Objective-C-extensions>
-      <file>
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
-      </file>
-      <class>
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
-        <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
-      </class>
-      <extensions>
-        <pair source="cpp" header="h" fileNamingConvention="NONE" />
-        <pair source="c" header="h" fileNamingConvention="NONE" />
-      </extensions>
-    </Objective-C-extensions>
+    <codeStyleSettings language="XML">
+      <arrangement>
+        <rules>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>xmlns:android</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>xmlns:.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*:id</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*:name</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>name</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>style</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>ANDROID_ATTRIBUTE_ORDER</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>.*</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+        </rules>
+      </arrangement>
+    </codeStyleSettings>
   </code_scheme>
 </component>
\ No newline at end of file
diff --git a/CineRmt/.idea/dictionaries/root.xml b/CineRmt/.idea/dictionaries/root.xml
new file mode 100644 (file)
index 0000000..5023c4b
--- /dev/null
@@ -0,0 +1,7 @@
+<component name="ProjectDictionaryState">
+  <dictionary name="root">
+    <words>
+      <w>volup</w>
+    </words>
+  </dictionary>
+</component>
\ No newline at end of file
index 7ac24c777f8adde6bd57c01c1bfa1cf0143f3d77..ee635a314dc905b5dedff094688bcb5686ad367f 100644 (file)
@@ -3,6 +3,9 @@
   <component name="GradleSettings">
     <option name="linkedExternalProjectsSettings">
       <GradleProjectSettings>
+        <compositeConfiguration>
+          <compositeBuild compositeDefinitionSource="SCRIPT" />
+        </compositeConfiguration>
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
         <option name="modules">
@@ -12,6 +15,7 @@
           </set>
         </option>
         <option name="resolveModulePerSourceSet" value="false" />
+        <option name="testRunner" value="PLATFORM" />
       </GradleProjectSettings>
     </option>
   </component>
diff --git a/CineRmt/.idea/vcs.xml b/CineRmt/.idea/vcs.xml
new file mode 100644 (file)
index 0000000..6c0b863
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+  </component>
+</project>
\ No newline at end of file
index 9f0c95966bfe0ace42c2f67a988baacf7942459d..c429e316af02770605c4001328d63d2d8ada42f4 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
index dd28537b34d413d4166cffb6ba0f93ee02ff0f65..327454dfb34c4901e925e2e21b628cd82ee62938 100644 (file)
@@ -160,7 +160,11 @@ public class MainActivity extends Activity
                img.setOnClickListener(this);
                img = (ImageButton)findViewById(R.id.buttonF);
                img.setOnClickListener(this);
-               img = (ImageButton)findViewById(R.id.button_dot);
+               img = (ImageButton)findViewById(R.id.buttonDOT);
+               img.setOnClickListener(this);
+               img = (ImageButton)findViewById(R.id.buttonTV);
+               img.setOnClickListener(this);
+               img = (ImageButton)findViewById(R.id.quit);
                img.setOnClickListener(this);
                img = (ImageButton)findViewById(R.id.fast_lt);
                img.setOnClickListener(this);
@@ -190,12 +194,22 @@ public class MainActivity extends Activity
                img.setOnClickListener(this);
                img = (ImageButton)findViewById(R.id.rplay);
                img.setOnClickListener(this);
+               img = (ImageButton)findViewById(R.id.vol_dn);
+               img.setOnClickListener(this);
+               img = (ImageButton)findViewById(R.id.vol_up);
+               img.setOnClickListener(this);
+               img = (ImageButton)findViewById(R.id.mute);
+               img.setOnClickListener(this);
+               img = (ImageButton)findViewById(R.id.ch_up);
+               img.setOnClickListener(this);
+               img = (ImageButton)findViewById(R.id.ch_dn);
+               img.setOnClickListener(this);
 
                img = (ImageButton)findViewById(R.id.suspend);
                img.setOnClickListener(this);
                img = (ImageButton)findViewById(R.id.config);
                img.setOnClickListener(this);
-               img = (ImageButton)findViewById(R.id.exit);
+               img = (ImageButton)findViewById(R.id.buttonCC);
                img.setOnClickListener(this);
                img = (ImageButton)findViewById(R.id.power);
                img.setOnClickListener(this);
@@ -212,9 +226,7 @@ public class MainActivity extends Activity
        public void onClick(View v) {
         if (v instanceof ImageButton) {
             int id = ((ImageButton)v).getId();
-                       if (id == R.id.stop) { send("stop"); }
-                       else if (id == R.id.play) { send("play"); }
-                       else if (id == R.id.rplay) { send("rplay"); }
+                       if (id == R.id.menu) { send("menu"); }
                        else if (id == R.id.button0) { send("key 0"); }
                        else if (id == R.id.button1) { send("key 1"); }
                        else if (id == R.id.button2) { send("key 2"); }
@@ -230,18 +242,28 @@ public class MainActivity extends Activity
                        else if (id == R.id.buttonC) { send("key C"); }
                        else if (id == R.id.buttonD) { send("key D"); }
                        else if (id == R.id.buttonE) { send("key E"); }
-                       else if (id == R.id.buttonF) { send("key F"); }
-                       else if (id == R.id.fast_lt) { send("fast_lt"); }
-                       else if (id == R.id.media_up) { send("media_up"); }
-                       else if (id == R.id.fast_rt) { send("fast_rt"); }
-                       else if (id == R.id.menu) { send("menu"); }
+                       else if (id == R.id.buttonF) { send("book"); }
+                       else if (id == R.id.rplay) { send("rplay"); }
+                       else if (id == R.id.stop) { send("stop"); }
+                       else if (id == R.id.play) { send("play"); }
                        else if (id == R.id.media_lt) { send("media_lt"); }
-                       else if (id == R.id.pause) { send("pause"); }
                        else if (id == R.id.media_rt) { send("media_rt"); }
-                       else if (id == R.id.slow_lt) { send("slow_lt"); }
+                       else if (id == R.id.media_up) { send("media_up"); }
                        else if (id == R.id.media_dn) { send("media_dn"); }
+                       else if (id == R.id.pause) { send("pause"); }
+                       else if (id == R.id.slow_lt) { send("slow_lt"); }
                        else if (id == R.id.slow_rt) { send("slow_rt"); }
-                       else if (id == R.id.full_scr) { send("key F"); }
+                       else if (id == R.id.fast_lt) { send("fast_lt"); }
+                       else if (id == R.id.fast_rt) { send("fast_rt"); }
+                       else if (id == R.id.full_scr) { send("fscrn"); }
+                       else if (id == R.id.mute) { send("mute"); }
+                       else if (id == R.id.vol_up) { send("vol_up"); }
+                       else if (id == R.id.vol_dn) { send("vol_dn"); }
+                       else if (id == R.id.ch_up) { send("ch_up"); }
+                       else if (id == R.id.ch_dn) { send("ch_dn"); }
+                       else if (id == R.id.buttonDOT) { send("key dot"); }
+                       else if (id == R.id.buttonCC) { send("key cc"); }
+                       else if (id == R.id.buttonTV) { send("key tv"); }
                        else {
                                save_defaults();
                                if (id == R.id.config) {
@@ -251,12 +273,13 @@ public class MainActivity extends Activity
                                        it.putExtra("PORT", dport);
                                        startActivity(it);
                                }
-                               else if (id == R.id.suspend)
-                                       send("suspend");
-                               else if (id == R.id.power)
-                                       send("power");
-                               else if (id != R.id.exit)
+                               else if (id == R.id.quit) send("hand");
+                               else if (id == R.id.suspend) send("suspend");
+                               else if (id == R.id.power) send("power");
+                               else {
+                                       Toast.makeText(this, "unknown msg",Toast.LENGTH_SHORT).show();
                                        return;
+                               }
                                finish();
                        }
                }
diff --git a/CineRmt/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/CineRmt/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644 (file)
index 1f6bb29..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:aapt="http://schemas.android.com/aapt"
-    android:width="108dp"
-    android:height="108dp"
-    android:viewportWidth="108"
-    android:viewportHeight="108">
-    <path
-        android:fillType="evenOdd"
-        android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
-        android:strokeWidth="1"
-        android:strokeColor="#00000000">
-        <aapt:attr name="android:fillColor">
-            <gradient
-                android:endX="78.5885"
-                android:endY="90.9159"
-                android:startX="48.7653"
-                android:startY="61.0927"
-                android:type="linear">
-                <item
-                    android:color="#44000000"
-                    android:offset="0.0" />
-                <item
-                    android:color="#00000000"
-                    android:offset="1.0" />
-            </gradient>
-        </aapt:attr>
-    </path>
-    <path
-        android:fillColor="#FFFFFF"
-        android:fillType="nonZero"
-        android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
-        android:strokeWidth="1"
-        android:strokeColor="#00000000" />
-</vector>
diff --git a/CineRmt/app/src/main/res/drawable/ic_launcher_background.xml b/CineRmt/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644 (file)
index 0d025f9..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="108dp"
-    android:height="108dp"
-    android:viewportWidth="108"
-    android:viewportHeight="108">
-    <path
-        android:fillColor="#008577"
-        android:pathData="M0,0h108v108h-108z" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M9,0L9,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,0L19,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M29,0L29,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M39,0L39,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M49,0L49,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M59,0L59,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M69,0L69,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M79,0L79,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M89,0L89,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M99,0L99,108"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,9L108,9"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,19L108,19"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,29L108,29"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,39L108,39"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,49L108,49"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,59L108,59"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,69L108,69"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,79L108,79"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,89L108,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M0,99L108,99"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,29L89,29"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,39L89,39"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,49L89,49"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,59L89,59"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,69L89,69"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M19,79L89,79"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M29,19L29,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M39,19L39,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M49,19L49,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M59,19L59,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M69,19L69,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-    <path
-        android:fillColor="#00000000"
-        android:pathData="M79,19L79,89"
-        android:strokeWidth="0.8"
-        android:strokeColor="#33FFFFFF" />
-</vector>
index cc20cb30bf5738d0d9a8f5e559fee2cf046249d0..4d458265e68d67c7bd1726e0dc3c51dce79b6d88 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<android.support.design.widget.CoordinatorLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
index 18e0bf7eb323a1e75f0e2501dd726f41130a6d4b..fd16a3a66d15a2db2dd9d763f247b6e655ae4eca 100644 (file)
     android:clickable="true">
 
     <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical" >
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingTop="6sp"
+        android:orientation="vertical">
 
         <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
 
-            <ImageButton
-                android:id="@+id/button0"
+            <LinearLayout
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig0" />
+                android:layout_height="match_parent"
+                android:orientation="vertical"
+                android:gravity="center_vertical">
 
-            <ImageButton
-                android:id="@+id/button1"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig1" />
+                <ImageButton style="@style/btn"
+                    android:id="@+id/menu"
+                    android:src="@mipmap/menu" />
 
-            <ImageButton
-                android:id="@+id/button2"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig2" />
+                <ImageButton style="@style/btn"
+                    android:id="@+id/config"
+                    android:src="@mipmap/config" />
+            </LinearLayout>
 
-            <ImageButton
-                android:id="@+id/button3"
+            <LinearLayout
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig3" />
+                android:orientation="vertical">
 
-            <ImageButton
-                android:id="@+id/button4"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig4" />
-        </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center_horizontal">
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
+                    <ImageButton style="@style/btn"
+                        android:id="@+id/media_up"
+                        android:src="@mipmap/media_up" />
+                </LinearLayout>
 
-            <ImageButton
-                android:id="@+id/button5"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig5" />
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center_horizontal">
 
-            <ImageButton
-                android:id="@+id/button6"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig6" />
+                    <ImageButton style="@style/btn"
+                        android:id="@+id/media_lt"
+                        android:src="@mipmap/media_lt" />
 
-            <ImageButton
-                android:id="@+id/button7"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig7" />
+                    <ImageButton style="@style/btn"
+                        android:id="@+id/pause"
+                        android:src="@mipmap/pause" />
 
-            <ImageButton
-                android:id="@+id/button8"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig8" />
+                    <ImageButton style="@style/btn"
+                        android:id="@+id/media_rt"
+                        android:src="@mipmap/media_rt" />
+                </LinearLayout>
 
-            <ImageButton
-                android:id="@+id/button9"
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center_horizontal">
+
+                    <ImageButton style="@style/btn"
+                        android:id="@+id/media_dn"
+                        android:src="@mipmap/media_dn" />
+
+                </LinearLayout>
+            </LinearLayout>
+
+            <LinearLayout
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfig9" />
+                android:layout_height="match_parent"
+                android:orientation="vertical"
+                android:gravity="center_vertical">
+
+                <ImageButton style="@style/btn"
+                    android:id="@+id/power"
+                    android:src="@mipmap/power" />
+
+                <ImageButton style="@style/btn"
+                    android:id="@+id/suspend"
+                    android:src="@mipmap/suspend" />
+            </LinearLayout>
         </LinearLayout>
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content">
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:paddingTop="20sp"
+            android:gravity="center_vertical">
 
-            <ImageButton
-                android:id="@+id/buttonA"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfiga" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/fast_lt"
+                android:src="@mipmap/fast_lt" />
 
-            <ImageButton
-                android:id="@+id/buttonB"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfigb" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/rplay"
+                android:src="@mipmap/rev" />
 
-            <ImageButton
-                android:id="@+id/buttonC"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfigc" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/stop"
+                android:src="@mipmap/stop" />
 
-            <ImageButton
-                android:id="@+id/buttonD"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfigd" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/play"
+                android:src="@mipmap/play" />
 
-            <ImageButton
-                android:id="@+id/buttonE"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfige" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/fast_rt"
+                android:src="@mipmap/fast_rt" />
         </LinearLayout>
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content">
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal">
 
-            <ImageButton
-                android:id="@+id/buttonF"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfigf" />
-            
-            <ImageButton
-                android:id="@+id/button_dot"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/zfigdot" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonTV"
+                android:src="@mipmap/ztv" />
+
+            <ImageButton style="@style/btn"
+                android:id="@+id/slow_lt"
+                android:src="@mipmap/slow_lt" />
 
-            <ImageButton
+            <ImageButton style="@style/btn"
                 android:id="@+id/full_scr"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
                 android:src="@mipmap/full_scr" />
 
-            <ImageButton
-                android:id="@+id/power"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/power" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/slow_rt"
+                android:src="@mipmap/slow_rt" />
 
-            <ImageButton
-                android:id="@+id/exit"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/exit" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/quit"
+                android:src="@mipmap/zquit" />
         </LinearLayout>
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:gravity="center_horizontal">
-
-            <ImageButton
-                android:id="@+id/fast_lt"
+            android:orientation="horizontal"
+            android:paddingBottom="12sp"
+            android:gravity="top">
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:paddingBottom="12sp">
+                <ImageButton style="@style/btn"
+                    android:id="@+id/vol_up"
+                    android:src="@mipmap/zvolup" />
+            </LinearLayout>
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_gravity="center_vertical"
+                android:paddingTop="8sp">
+                <ImageButton style="@style/btn"
+                    android:id="@+id/vol_dn"
+                    android:src="@mipmap/zvoldn" />
+            </LinearLayout>
+            <LinearLayout
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/fast_lt" />
-
-            <ImageButton
-                android:id="@+id/media_up"
+                android:layout_height="match_parent"
+                android:paddingTop="12sp">
+                <ImageButton style="@style/btn"
+                    android:id="@+id/mute"
+                    android:src="@mipmap/zmute" />
+            </LinearLayout>
+            <LinearLayout
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/media_up" />
-
-            <ImageButton
-                android:id="@+id/fast_rt"
+                android:layout_height="match_parent"
+                android:paddingTop="8sp">
+                <ImageButton style="@style/btn"
+                    android:id="@+id/ch_up"
+                    android:src="@mipmap/zch_up" />
+            </LinearLayout>
+            <LinearLayout
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/fast_rt" />
+                android:layout_height="match_parent"
+                android:paddingBottom="12sp">
 
-            <ImageButton
-                android:id="@+id/menu"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/menu" />
+            <ImageButton style="@style/btn"
+                android:layout_gravity="top"
+                android:id="@+id/ch_dn"
+                android:src="@mipmap/zch_dn" />
+            </LinearLayout>
         </LinearLayout>
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:orientation="horizontal"
             android:gravity="center_horizontal">
 
-            <ImageButton
-                android:id="@+id/media_lt"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/media_lt" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonA"
+                android:src="@mipmap/zfiga" />
 
-            <ImageButton
-                android:id="@+id/pause"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/pause" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/button1"
+                android:src="@mipmap/zfig1" />
 
-            <ImageButton
-                android:id="@+id/media_rt"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/media_rt" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/button2"
+                android:src="@mipmap/zfig2" />
 
-            <ImageButton
-                android:id="@+id/suspend"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/suspend" />
-            </LinearLayout>
+            <ImageButton style="@style/btn"
+                android:id="@+id/button3"
+                android:src="@mipmap/zfig3" />
+
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonD"
+                android:src="@mipmap/zfigd" />
+        </LinearLayout>
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:orientation="horizontal"
             android:gravity="center_horizontal">
 
-            <ImageButton
-                android:id="@+id/slow_lt"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/slow_lt" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonB"
+                android:src="@mipmap/zfigb" />
 
-            <ImageButton
-                android:id="@+id/media_dn"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/media_dn" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/button4"
+                android:src="@mipmap/zfig4" />
 
-            <ImageButton
-                android:id="@+id/slow_rt"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/slow_rt" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/button5"
+                android:src="@mipmap/zfig5" />
 
-            <ImageButton
-                android:id="@+id/config"
-                android:layout_width="wrap_content"
+            <ImageButton style="@style/btn"
+                android:id="@+id/button6"
+                android:src="@mipmap/zfig6" />
+
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonE"
+                android:src="@mipmap/zfige" />
+        </LinearLayout>
+
+        <LinearLayout
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/config" />
+                android:orientation="horizontal"
+                android:gravity="center_horizontal">
+
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonC"
+                android:src="@mipmap/zfigc" />
+
+            <ImageButton style="@style/btn"
+                android:id="@+id/button7"
+                android:src="@mipmap/zfig7" />
+
+            <ImageButton style="@style/btn"
+                android:id="@+id/button8"
+                android:src="@mipmap/zfig8" />
+
+            <ImageButton style="@style/btn"
+                android:id="@+id/button9"
+                android:src="@mipmap/zfig9" />
+
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonF"
+                android:src="@mipmap/zfigf" />
         </LinearLayout>
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:orientation="horizontal"
             android:gravity="center_horizontal">
 
-            <ImageButton
-                android:id="@+id/rplay"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/rev" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonDOT"
+                android:src="@mipmap/zfigdot" />
 
-            <ImageButton
-                android:id="@+id/stop"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/stop" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/button0"
+                android:src="@mipmap/zfig0" />
 
-            <ImageButton
-                android:id="@+id/play"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:adjustViewBounds="true"
-                android:cropToPadding="false"
-                android:scaleType="fitXY"
-                android:src="@mipmap/play" />
+            <ImageButton style="@style/btn"
+                android:id="@+id/buttonCC"
+                android:src="@mipmap/zfigcc" />
         </LinearLayout>
     </LinearLayout>
-
+q
 </FrameLayout>
index 2d8b5edc0a7616bf78ded3c6184a3bda859fa359..dadc2694f61b8f65afacc272ae0f08dffdf7fabf 100644 (file)
@@ -11,7 +11,7 @@
     <item
         android:id="@+id/menu_exit"
         android:orderInCategory="100"
-        android:showAsAction="never"
+        app:showAsAction="never"
         android:title="@string/menu_exit"/>
 
 </menu>
diff --git a/CineRmt/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/CineRmt/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644 (file)
index eca70cf..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>
\ No newline at end of file
diff --git a/CineRmt/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/CineRmt/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644 (file)
index eca70cf..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@drawable/ic_launcher_background" />
-    <foreground android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>
\ No newline at end of file
diff --git a/CineRmt/app/src/main/res/mipmap-hdpi/ic_launcher.png b/CineRmt/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644 (file)
index cde69bc..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/CineRmt/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644 (file)
index dffca36..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-mdpi/ic_launcher.png b/CineRmt/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644 (file)
index c133a0c..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/CineRmt/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644 (file)
index dae5e08..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/CineRmt/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644 (file)
index bfa42f0..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/CineRmt/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644 (file)
index 14ed0af..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/CineRmt/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644 (file)
index 324e72c..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/CineRmt/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644 (file)
index d8ae031..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/CineRmt/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644 (file)
index aee44e1..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/CineRmt/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/CineRmt/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644 (file)
index beed3cd..0000000
Binary files a/CineRmt/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
index 0d653f3752079eca8c599df0a718e8abf701cf00..dfec0e487faaa0858bcd37998212b51e413b9b78 100644 (file)
@@ -7,5 +7,12 @@
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
         <item name="colorAccent">@color/colorAccent</item>
     </style>
-
+    <style name="btn">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:borderlessButtonStyle">@style/Widget.AppCompat.Button.Borderless</item>
+        <item name="android:padding">0px</item>
+        <item name="android:layout_margin">2sp</item>
+    </style>
+    
 </resources>
index 8d3ef8e5c1a6111ae2ba26ee0212ca035a39bc76..ded884a66dd071c5b12025198bd197f8aeffbaad 100644 (file)
@@ -7,7 +7,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.2.1'
+        classpath 'com.android.tools.build:gradle:3.5.3'
         
 
         // NOTE: Do not place your application dependencies here; they belong
index 9a4163a4f5ee222ba10e7c7c2f4de529dc0b52a1..21c12743361cfca400c3e71a6b62fcc2d22d1ea4 100644 (file)
@@ -1,5 +1,6 @@
+#Wed Jan 08 17:24:50 MST 2020
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
index 2efc5354712fab0a0b37d7fd81f741811e2ee771..7e69a50356b4dab42c3807de732a365155eed8a2 100644 (file)
@@ -368,6 +368,7 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/wavecache.o \
        $(OBJDIR)/wintv.o \
        $(OBJDIR)/wwindow.o \
+       $(OBJDIR)/x10tv.o \
        $(OBJDIR)/zoombar.o \
        $(OBJDIR)/zoompanel.o \
        $(OBJDIR)/zwindow.o \
index 69d0c10c65a84301dd5fa93408cba933dc0f0356..61e43c97d4294db04b07091a64dc7985fb536c43 100644 (file)
@@ -59,6 +59,8 @@ bool AndroidControl::is_msg(const char *cp)
 void AndroidControl::press(int key)
 {
 // printf("press 0x%04x\n",key);
+       if( key == KPMENU && mwindow_gui->keyev_grab_remote() )
+               printf("android grab remote\n");
        if( mwindow_gui->key_listener(key) ) return;
        mwindow_gui->remote_control->remote_key(key);
 }
@@ -96,19 +98,7 @@ void AndroidControl::run()
                if( !len || !msg_len || *pin != *msg ) continue;
                ++msg; --msg_len;
                if( msg_len <= 0 ) continue;
-               if( is_msg("stop") ) press(KPSTOP);
-               else if( is_msg("play") ) press(KPPLAY);
-               else if( is_msg("rplay") ) press(KPREV);
-               else if( is_msg("pause") ) press(' ');
-                       else if( is_msg("fast_lt") ) press(KPBACK);
-               else if( is_msg("media_up") ) press(UP);
-               else if( is_msg("fast_rt") ) press(KPFWRD);
-               else if( is_msg("menu") ) press(KPMENU);
-               else if( is_msg("media_lt") ) press(LEFT);
-               else if( is_msg("media_rt") ) press(RIGHT);
-               else if( is_msg("slow_lt") ) press(KPRECD);
-               else if( is_msg("media_dn") ) press(DOWN);
-               else if( is_msg("slow_rt") ) press(KPAUSE);
+               if( is_msg("menu") ) press(KPMENU);
                else if( is_msg("key 0") ) press('0');
                else if( is_msg("key 1") ) press('1');
                else if( is_msg("key 2") ) press('2');
@@ -124,7 +114,29 @@ void AndroidControl::run()
                else if( is_msg("key C") ) press('c');
                else if( is_msg("key D") ) press('d');
                else if( is_msg("key E") ) press('e');
-               else if( is_msg("key F") ) press('f');
+               else if( is_msg("book") ) press(KPBOOK);
+               else if( is_msg("rplay") ) press(KPREV);
+               else if( is_msg("stop") ) press(KPSTOP);
+               else if( is_msg("play") ) press(KPPLAY);
+               else if( is_msg("media_lt") ) press(LEFT);
+               else if( is_msg("media_rt") ) press(RIGHT);
+               else if( is_msg("media_up") ) press(UP);
+               else if( is_msg("media_dn") ) press(DOWN);
+               else if( is_msg("pause") ) press(' ');
+               else if( is_msg("slow_lt") ) press(KPRECD);
+               else if( is_msg("slow_rt") ) press(KPAUSE);
+                       else if( is_msg("fast_lt") ) press(KPBACK);
+               else if( is_msg("fast_rt") ) press(KPFWRD);
+               else if( is_msg("fscrn") ) press(KPFSCRN);
+               else if( is_msg("mute") ) press(KPMUTE);
+               else if( is_msg("vol_up") ) press(KPVOLUP);
+               else if( is_msg("vol_dn") ) press(KPVOLDN);
+               else if( is_msg("ch_up") ) press(KPCHUP);
+               else if( is_msg("ch_dn") ) press(KPCHDN);
+               else if( is_msg("key dot") ) press('.');
+               else if( is_msg("key cc") ) press(KPCC);
+               else if( is_msg("key tv") ) press(KPTV);
+               else if( is_msg("hand") ) press(KPHAND);
                else if( is_msg("suspend") ) {
                        system("sync; sleep 1; acpitool -s");
                }
index bb8df6eafb1c7b98ffb87045fe5124661adae0fe..4328162356a290db813da21f4faf84f50ef7fb80 100644 (file)
@@ -50,7 +50,6 @@
 #include "trackcanvas.h"
 #include "tracks.h"
 #include "transportque.h"
-#include "wintv.h"
 
 #include <unistd.h>
 
@@ -270,8 +269,8 @@ void CWindow::refresh_frame(int change_type, int dir)
        refresh_frame(change_type, mwindow->edl, dir);
 }
 
-CWindowRemoteHandler::
-CWindowRemoteHandler(RemoteControl *remote_control)
+CWindowKeyEvHandler::
+CWindowKeyEvHandler(RemoteControl *remote_control)
  : RemoteHandler(remote_control->gui, RED)
 {
        this->remote_control = remote_control;
@@ -280,17 +279,17 @@ CWindowRemoteHandler(RemoteControl *remote_control)
        key = -1;
 }
 
-CWindowRemoteHandler::
-~CWindowRemoteHandler()
+CWindowKeyEvHandler::
+~CWindowKeyEvHandler()
 {
 }
 
-int CWindowRemoteHandler::process_key(int key)
+int CWindowKeyEvHandler::remote_key(int key)
 {
        return remote_process_key(remote_control, key);
 }
 
-int CWindowRemoteHandler::remote_process_key(RemoteControl *remote_control, int key)
+int CWindowKeyEvHandler::remote_process_key(RemoteControl *remote_control, int key)
 {
        EDL *edl = mwindow->edl;
        if( !edl ) return 0;
@@ -326,13 +325,7 @@ int CWindowRemoteHandler::remote_process_key(RemoteControl *remote_control, int
        case 'a':  remote_control->gui->tile_windows(0);  return 1;
        case 'b':  remote_control->gui->tile_windows(1);  return 1;
        case 'c':  remote_control->gui->tile_windows(2);  return 1;
-#ifdef HAVE_DVB
-       case 'd':
-               mwindow->gui->channel_info->toggle_scan();
-               return 1;
-#endif
-       case 'e':
-               break;
+       case KPFSCRN:
        case 'f': {
                CWindowCanvas *canvas = mwindow->cwindow->gui->canvas;
                int on = canvas->get_fullscreen() ? 0 : 1;
index 643c34bc00ccc4c10ab387babbb85b5255f93ae6..449cc468ccc2b68c93305285d73def8d812a7d8e 100644 (file)
@@ -80,13 +80,14 @@ public:
        CPlayback *playback_engine;
 };
 
-class CWindowRemoteHandler : public RemoteHandler
+class CWindowKeyEvHandler : public RemoteHandler
 {
 public:
-       CWindowRemoteHandler(RemoteControl *remote_control);
-       ~CWindowRemoteHandler();
-       int process_key(int key);
+       CWindowKeyEvHandler(RemoteControl *remote_control);
+       ~CWindowKeyEvHandler();
+       int remote_key(int key);
        int remote_process_key(RemoteControl *remote_control, int key);
+       int is_keytv() { return 1; }
 
        int key, last_key;
        RemoteControl *remote_control;
index a685b0f72dcb393e770f3bbf899f2c0291f12021..a3ceb1dbcb830439596ca6f670efa034ce4d6086 100644 (file)
@@ -23,6 +23,6 @@
 #define CWINDOW_INC
 
 class CWindow;
-class CWindowRemoteHandler;
+class KeyEvCWindowHandler;
 
 #endif
index 78bc2bec395e56c3147ad3758565025fee45fa90..cf9988903e223b44a15faf73eb77086f701cd79e 100644 (file)
 #include "wavecache.h"
 #include "wintv.h"
 #include "wwindow.h"
+#include "x10tv.h"
 #include "zoombar.h"
 #include "zwindow.h"
 #include "zwindowgui.h"
@@ -244,6 +245,7 @@ MWindow::MWindow()
        beeper = 0;
        shuttle = 0;
        wintv = 0;
+       x10tv = 0;
        mixers_align = 0;
 }
 
@@ -269,6 +271,9 @@ MWindow::~MWindow()
        delete shuttle;         shuttle = 0;
 #ifdef HAVE_WINTV
        delete wintv;           wintv = 0;
+#endif
+#ifdef HAVE_X10TV
+       delete x10tv;           x10tv = 0;
 #endif
        delete batch_render;    batch_render = 0;
        delete convert_render;  convert_render = 0;
@@ -1608,6 +1613,14 @@ void MWindow::init_wintv()
                wintv->start();
 #endif
 }
+void MWindow::init_x10tv()
+{
+#ifdef HAVE_X10TV
+       x10tv = X10TV::probe(this);
+       if( x10tv )
+               x10tv->start();
+#endif
+}
 
 
 void MWindow::init_brender()
@@ -2683,7 +2696,10 @@ void MWindow::create_objects(int want_gui,
        strcat(string, "/" FONT_SEARCHPATH);
        BC_Resources::init_fontconfig(string);
        if(debug) PRINT_TRACE
-       init_wintv();
+// use if plugged
+       init_x10tv();
+       if( !x10tv )
+               init_wintv();
 
 // Default project created here
        init_edl();
index b7034d8d16a9cf51f22afea4779462947ad88b65..afbf356471ead585b07cc91929f5391c918d7792 100644 (file)
 #include "wwindow.inc"
 #include "wavecache.inc"
 #include "wintv.inc"
+#include "x10tv.inc"
 
 #define FONT_SEARCHPATH "fonts"
 
@@ -771,6 +772,7 @@ public:
        void init_signals();
        void init_shuttle();
        void init_wintv();
+       void init_x10tv();
        void init_theme();
        void init_compositor();
        void init_levelwindow();
@@ -797,6 +799,7 @@ public:
        int in_destructor;
        Shuttle *shuttle;
        WinTV *wintv;
+       X10TV *x10tv;
 };
 
 #endif
index 69204d9c4e7bae60b00ecf4e44a06f45a19e1643..0033b268950d11eec7288d1a679db956bcde672a 100644 (file)
@@ -74,6 +74,7 @@
 #include "vwindowgui.h"
 #include "vwindow.h"
 #include "wintv.h"
+#include "x10tv.h"
 #include "zoombar.h"
 
 #define PANE_DRAG_MARGIN MAX(mwindow->theme->pane_w, mwindow->theme->pane_h)
@@ -165,21 +166,26 @@ void MWindowGUI::create_objects()
        if(debug) printf("MWindowGUI::create_objects %d\n", __LINE__);
        set_icon(mwindow->theme->get_image("mwindow_icon"));
        remote_control = new RemoteControl(this);
+       cwindow_remote_handler = 0;
+       record_remote_handler = 0;
+#ifdef HAVE_X10TV
+// should be first, use if plugged
+       if( !cwindow_remote_handler && mwindow->x10tv ) {
+               cwindow_remote_handler = (RemoteHandler*)
+                       new X10TVCWindowHandler(mwindow->x10tv, remote_control);
+               record_remote_handler = (RemoteHandler*)
+                       new X10TVRecordHandler(mwindow->x10tv, remote_control);
+       }
+#endif
 #ifdef HAVE_WINTV
-       WinTV *wintv = mwindow->wintv;
-       if( wintv ) {
+       if( !cwindow_remote_handler && mwindow->wintv ) {
                cwindow_remote_handler = (RemoteHandler*)
-                       new WinTVCWindowHandler(wintv, remote_control);
+                       new WinTVCWindowHandler(mwindow->wintv, remote_control);
                record_remote_handler = (RemoteHandler*)
-                       new WinTVRecordHandler(wintv, remote_control);
+                       new WinTVRecordHandler(mwindow->wintv, remote_control);
        }
 #endif
-       if( !cwindow_remote_handler ) cwindow_remote_handler =
-               (RemoteHandler*)new CWindowRemoteHandler(remote_control);
-       if( !record_remote_handler  ) record_remote_handler =
-               (RemoteHandler*)new RecordRemoteHandler(remote_control);
        mwindow->reset_android_remote();
-
        if(debug) printf("MWindowGUI::create_objects %d\n", __LINE__);
 
        int x1 = get_w() - MainShBtns::calculate_w(-1, 0, -1) - xS(5);
@@ -1313,6 +1319,19 @@ void MWindowGUI::use_android_remote(int on)
        if( android_control ) return;
        android_control = new AndroidControl(this);
 }
+int MWindowGUI::keyev_grab_remote()
+{
+       if( cwindow_remote_handler && cwindow_remote_handler->is_keytv() &&
+           record_remote_handler  && record_remote_handler->is_keytv() )
+               return 0;
+       delete cwindow_remote_handler;
+       delete record_remote_handler;
+       cwindow_remote_handler = (RemoteHandler*)
+               new CWindowKeyEvHandler(mwindow->gui->remote_control);
+       record_remote_handler = (RemoteHandler*)
+               new RecordKeyEvHandler(mwindow->gui->remote_control);
+       return 1;
+}
 
 int MWindowGUI::close_event()
 {
index 4ac94fed5262e6bd7bd253d2c68fb32b6eff8e70..bc3aa3a65ff2d64bb5e13fd3a7ebd5a7c87b5500 100644 (file)
@@ -56,6 +56,7 @@
 #include "trackscroll.inc"
 #include "transitionpopup.inc"
 #include "wintv.inc"
+#include "x10tv.inc"
 #include "zoombar.inc"
 
 
@@ -167,6 +168,7 @@ public:
        int keyboard_listener(BC_WindowBase *wp);
        int key_listener(int key);
        void use_android_remote(int on);
+       int keyev_grab_remote();
        int close_event();
        int quit();
        void stop_drawing();
@@ -271,6 +273,7 @@ public:
        AndroidControl *android_control;
        RemoteControl *remote_control;
        WinTV *wintv;
+       X10TV *x10tv;
        RemoteHandler *cwindow_remote_handler;
        RemoteHandler *record_remote_handler;
 };
index c2aab72ba80c109872f60aadc0041131f94f0889..ad293f7b97215a183d1f860a70c5d2fce585a786 100644 (file)
@@ -76,6 +76,7 @@
 #include "videoconfig.h"
 #include "videodevice.h"
 #include "wintv.h"
+#include "x10tv.h"
 
 #include <string.h>
 #include <sys/types.h>
@@ -349,7 +350,8 @@ void Record::run()
        record_gui->show_window();
        record_gui->flush();
 
-       if( mwindow->gui->remote_control->deactivate() )
+       if( mwindow->gui->remote_control->deactivate() &&
+           mwindow->gui->record_remote_handler )
                mwindow->gui->record_remote_handler->activate();
 
        if( video_window_open ) {
@@ -388,7 +390,8 @@ void Record::run()
        stop(0);
        edl->Garbage::remove_user();
 
-       if( mwindow->gui->remote_control->deactivate() )
+       if( mwindow->gui->remote_control->deactivate() &&
+           mwindow->gui->cwindow_remote_handler )
                mwindow->gui->cwindow_remote_handler->activate();
 
 // Save everything again
@@ -1523,16 +1526,22 @@ void Record::stop_skimming() {}
 void Record::update_skimming(int v) {}
 #endif
 
-RecordRemoteHandler::RecordRemoteHandler(RemoteControl *remote_control)
+RecordKeyEvHandler::RecordKeyEvHandler(RemoteControl *remote_control)
  : RemoteHandler(remote_control->gui, GREEN)
 {
        this->remote_control = remote_control;
 }
 
-RecordRemoteHandler::~RecordRemoteHandler()
+RecordKeyEvHandler::~RecordKeyEvHandler()
 {
 }
 
+int RecordKeyEvHandler::remote_key(int key)
+{
+       Record *record = remote_control->mwindow_gui->record;
+       return record->record_process_key(remote_control, key);
+}
+
 void Record::
 display_video_text(int x, int y, const char *text, int font,
        int bg_color, int color, int alpha, double secs, double scale)
@@ -1757,34 +1766,63 @@ void Record::add_key(int ch)
                                BIGFONT, WHITE, BLACK, 0, 3., 2.);
 }
 
-int RecordRemoteHandler::process_key(int key)
-{
-       Record *record = remote_control->mwindow_gui->record;
-       return record->record_process_key(remote_control, key);
-}
-
 int Record::record_process_key(RemoteControl *remote_control, int key)
 {
        int ch = key;
 
        switch( key ) {
        case KPENTER:
-               if( last_key == KPENTER ) {
-                       set_channel_name(keybfr);
-                       clear_keybfr();
-                       break;
-               }
-               ch = '.';  // fall through
-       case '0': if( last_key == '0' && ch == '0' ) {
+               if( last_key != KPENTER ) break;
+       case KPCC:
+               set_channel_name(keybfr);
                clear_keybfr();
                break;
-       }
-       case '1': case '2': case '3': case '4':
-       case '5': case '6': case '7': case '8': case '9':
+       case '0':
+               if( last_key == '0' && ch == '0' ) {
+                       clear_keybfr();
+                       break;
+               } // fall thru
+       case '1': case '2': case '3':
+       case '4': case '5': case '6':
+       case '7': case '8': case '9':
+       case '.':
                add_key(ch);
                break;
-       //case UP: case DOWN: case LEFT: case RIGHT:
-       //case KPPLAY: case KPBACK: case KPFORW:
+       //case UP: case DOWN:
+       //case LEFT: case RIGHT:
+       //case KPPLAY: case KPFWRD:
+       case KPMUTE:
+       case 'a': // toggle mute audio
+               if( !monitor_audio ) { set_mute_gain(1);  set_play_gain(1); }
+               set_audio_monitoring(monitor_audio ? 0 : 1);
+               break;
+       case KPBACK:  case 'm': // toggle metering audio
+               set_audio_metering(metering_audio ? 0 : 1);
+               break;
+       case 'd':  case KPSLASH:
+               display_channel_info();
+               break;
+       case 'e':  case KPSTAR:
+               display_channel_schedule();
+               break;
+       case KPCHUP:  case KPPLUS:
+               channel_up();
+               break;
+       case KPCHDN:  case KPMINUS:
+               channel_down();
+               break;
+       case KPVOLUP: {
+               set_play_gain(play_gain * 1.25);
+               break; }
+       case KPVOLDN: {
+               set_play_gain(play_gain * 0.75);
+               break; }
+       case KPFSCRN:
+       case 'f': {
+               RecordMonitorCanvas *canvas = record_monitor->window->canvas;
+               int on = canvas->get_fullscreen() ? 0 : 1;
+               canvas->Canvas::set_fullscreen(on, 0);
+               break; }
 #ifdef HAVE_COMMERCIAL
        case KPRECD:  case 'c': // start capture, mark endpoint
                if( !deletions ) {
@@ -1798,43 +1836,17 @@ int Record::record_process_key(RemoteControl *remote_control, int key)
                }
                display_cut_icon(10,20);
                break;
-       case KPSTOP:  case 'd': // end capture, start cutting
+       case KPSTOP:  case 's': // end capture, start cutting
                remote_control->set_color(YELLOW);
                stop_commercial_capture(1);
                break;
        case KPAUSE:  case 'x': // ignore current commercial
                mark_commercial_capture(DEL_SKIP);
                break;
-#endif
-       case KPBACK:  case 'a': // toggle mute audio
-               if( !monitor_audio ) { set_mute_gain(1);  set_play_gain(1); }
-               set_audio_monitoring(monitor_audio ? 0 : 1);
-               break;
-       case 'm': // toggle metering audio
-               set_audio_metering(metering_audio ? 0 : 1);
-               break;
-#ifdef HAVE_COMMERCIAL
-       case KPPLAY:  case 's': // ignore previous endpoint
+       case KPPLAY:  case 'z': // ignore previous endpoint
                mark_commercial_capture(DEL_OOPS);
                break;
 #endif
-       case KPFWRD:  case KPSLASH:
-               display_channel_info();
-               break;
-       case KPMAXW:  case KPSTAR:
-               display_channel_schedule();
-               break;
-       case KPCHUP:  case KPPLUS:
-               channel_up();
-               break;
-       case KPCHDN:  case KPMINUS:
-               channel_down();
-               break;
-       case 'f': {
-               RecordMonitorCanvas *canvas = record_monitor->window->canvas;
-               int on = canvas->get_fullscreen() ? 0 : 1;
-               canvas->Canvas::set_fullscreen(on, 0);
-               break; }
        default:
                return -1;
        }
@@ -1846,7 +1858,6 @@ int Record::record_process_key(RemoteControl *remote_control, int key)
 int Record::wintv_process_code(int code)
 {
 #ifdef HAVE_WINTV
-       WinTV *wintv = (WinTV *)mwindow->gui->cwindow_remote_handler;
        switch( code ) {
        case WTV_OK:   break;
        case WTV_LT:   break;
@@ -1862,12 +1873,10 @@ int Record::wintv_process_code(int code)
                 set_audio_metering(metering_audio ? 0 : 1);
                 break;
        case WTV_VOLUP: {
-               double gain = adevice->get_play_gain() * 1.25;
-               set_play_gain(gain);
+               set_play_gain(play_gain * 1.125);
                break; }
        case WTV_VOLDN: {
-               double gain = adevice->get_play_gain() * 0.75;
-               set_play_gain(gain);
+               set_play_gain(play_gain * 0.875);
                break; }
        case WTV_CH_UP:
                 channel_up();
@@ -1875,11 +1884,14 @@ int Record::wintv_process_code(int code)
        case WTV_CH_DN:
                 channel_down();
                 break;
-       case WTV_0:
-               if( wintv->last_code == WTV_0 ) {
+       case WTV_0: {
+               WinTVRecordHandler *wintv_remote = (WinTVRecordHandler *)
+                       mwindow->gui->remote_control->handler;
+               WinTV *wintv = !wintv_remote ? 0 : wintv_remote->wintv;
+               if( !wintv || wintv->last_code == WTV_0 ) {
                        clear_keybfr();
                        break;
-               } // fall thru
+               } // fall thru
        case WTV_1: case WTV_2: case WTV_3: case WTV_4:
        case WTV_5: case WTV_6: case WTV_7: case WTV_8:
        case WTV_9: {
@@ -1920,6 +1932,94 @@ int Record::wintv_process_code(int code)
        return 0;
 }
 
+int Record::x10tv_process_code(int code)
+{
+#ifdef HAVE_X10TV
+       switch( code ) {
+       case X10_A: // toggle metering audio
+                set_audio_metering(metering_audio ? 0 : 1);
+                break;
+       case X10_B:             break;
+       case X10_POWER:         break;
+       case X10_TV:            break;
+       case X10_DVD:           break;
+       case X10_WWW:           break;
+       case X10_BOOK:          break;
+       case X10_EDIT:          break;
+       case X10_VOLUP: {
+               set_play_gain(play_gain * 1.125);
+               break; }
+       case X10_VOLDN: {
+               set_play_gain(play_gain * 0.875);
+               break; }
+       case X10_MUTE: // toggle mute audio
+               if( !monitor_audio ) {
+                       set_mute_gain(1);
+                       set_play_gain(play_gain);
+               }
+               set_audio_monitoring(monitor_audio ? 0 : 1);
+               break;
+       case X10_CH_UP:
+                channel_up();
+                break;
+       case X10_CH_DN:
+                channel_down();
+                break;
+       case X10_0: {
+               X10TVRecordHandler *x10tv_remote = (X10TVRecordHandler *)
+                       mwindow->gui->remote_control->handler;
+               X10TV *x10tv = !x10tv_remote ? 0 : x10tv_remote->x10tv;
+               if( x10tv->last_code == X10_0 ) {
+                       clear_keybfr();
+                       break;
+               } } // fall thru
+       case X10_1: case X10_2: case X10_3: case X10_4:
+       case X10_5: case X10_6: case X10_7: case X10_8:
+       case X10_9: {
+               int ch = code - X10_0 + '0';
+               add_key(ch);
+               break; }
+       case X10_MENU: // add decimal point
+               add_key('.');
+               break;
+       case X10_SETUP: // change channel
+               set_channel_name(keybfr);
+               clear_keybfr();
+               break;
+       case X10_C:
+                display_channel_schedule();
+               break;
+       case X10_UP:            break;
+       case X10_D:
+                display_channel_info();
+                break;
+       case X10_PROPS:         break;
+       case X10_LT:            break;
+       case X10_OK:            break;
+       case X10_RT:            break;
+       case X10_SCRN: {
+                RecordMonitorCanvas *canvas = record_monitor->window->canvas;
+                int on = canvas->get_fullscreen() ? 0 : 1;
+                canvas->Canvas::set_fullscreen(on, 0);
+                break; }
+       case X10_E:             break;
+       case X10_DN:            break;
+       case X10_F:             break;
+       case X10_REW:           break;
+       case X10_PLAY:          break;
+       case X10_FWD:           break;
+       case X10_REC:           break;
+       case X10_STOP:          break;
+       case X10_PAUSE:         break;
+
+       default:
+               printf("x10tv record: unknown code: %04x\n", code);
+               break;
+       }
+#endif
+       return 0;
+}
+
 #ifdef HAVE_COMMERCIAL
 int Record::start_commercial_capture()
 {
index 480b33298e78d227f7bb3ecb65fced361ab7ff79..d99a72546693f3ac6eb6b35126c8aa0b430b7a70 100644 (file)
@@ -235,6 +235,7 @@ public:
        void add_key(int ch);
        int record_process_key(RemoteControl *remote_control, int key);
        int wintv_process_code(int code);
+       int x10tv_process_code(int code);
        int spawn(const char *fmt, ...);
        void display_video_text(int x, int y, const char *text, int font,
                int bg_color, int color, int alpha, double secs, double scale);
@@ -358,14 +359,15 @@ public:
        ~RecordSchedule() { remove_all_objects(); }
 };
 
-class RecordRemoteHandler : public RemoteHandler
+class RecordKeyEvHandler : public RemoteHandler
 {
 public:
-       int process_key(int key);
+       int remote_key(int key);
        int spawn(const char *fmt, ...);
 
-       RecordRemoteHandler(RemoteControl *remote_control);
-       ~RecordRemoteHandler();
+       RecordKeyEvHandler(RemoteControl *remote_control);
+       ~RecordKeyEvHandler();
+       int is_keytv() { return 1; }
 
        RemoteControl *remote_control;
 };
index d9eba106efacf10632fdc08c05f3214ef45a5b4d..8ec8d606b86b0b3f304bfa5145c1e15bdb016ebd 100644 (file)
@@ -25,7 +25,7 @@
 class RecordMenuItem;
 class Record;
 
-class RecordRemoteHandler;
+class KeyEvRecordHandler;
 class RecordCutAdsStatus;
 class RecordBlinkStatus;
 
index de2bc271323c317ce7dd2742687bedca6de0e190..457d331395e8bf91d7462518851e211d78ea77fa 100644 (file)
@@ -53,11 +53,13 @@ RemoteControl::~RemoteControl()
 int RemoteControl::activate(RemoteHandler *handler)
 {
        int result = 0;
-       active_lock->lock("RemoteControl::activate");
-       if( !is_active() ) {
-               if( !handler ) handler = !mwindow_gui->record->running() ?
+       deactivate();
+       if( !handler )
+               handler = !mwindow_gui->record->running() ?
                        (RemoteHandler *)mwindow_gui->cwindow_remote_handler :
                        (RemoteHandler *)mwindow_gui->record_remote_handler ;
+       active_lock->lock("RemoteControl::activate");
+       if( handler ) {
                gui->lock_window("RemoteControl::activate");
                gui->set_active(handler);
                gui->set_color(handler->color);
@@ -72,19 +74,21 @@ int RemoteControl::activate(RemoteHandler *handler)
 int RemoteControl::deactivate()
 {
        int result = 0;
-       active_lock->lock("RemoteControl::deactivate");
        if( is_active() ) {
-               gui->set_inactive();
-               result = 1;
+               active_lock->lock("RemoteControl::deactivate");
+               if( is_active() ) {
+                       gui->set_inactive();
+                       result = 1;
+               }
+               active_lock->unlock();
        }
-       active_lock->unlock();
        return result;
 }
 
 int RemoteControl::remote_key(int key)
 {
        if( !is_active() ) return 0;
-       return handler->process_key(key);
+       return handler->remote_key(key);
 }
 
 void RemoteControl::set_color(int color)
@@ -182,4 +186,14 @@ RemoteHandler::~RemoteHandler()
 {
 }
 
+int RemoteHandler::remote_key(int key)
+{
+       gui->set_inactive();
+       return -1;
+}
+
+int RemoteHandler::process_key(int key)
+{
+       return -1;
+}
 
index 1a50d999d5108864ce53b85ed96d981514dd060b..81ded5831c715a0bab2f8fc1616f93515cab3ccf 100644 (file)
@@ -45,7 +45,12 @@ public:
        int color;
 
        void activate() { gui->set_active(this); }
-       virtual int process_key(int key) { return -1; }
+       virtual int remote_key(int key);
+       virtual int process_key(int key);
+
+       virtual int is_keytv() { return 0; }
+       virtual int is_wintv() { return 0; }
+       virtual int is_x10tv() { return 0; }
 
        RemoteHandler(RemoteGUI *gui, int color);
        virtual ~RemoteHandler();
index 5e067936cc15f0b4fc4925d473b12926875cd829..532a47048735d86e34f8568250247cb2e2914609 100644 (file)
@@ -75,7 +75,7 @@ int WinTV::open_usb_input(int vendor, int product, int &version)
                char path[PATH_MAX];  struct stat st;
                snprintf(path, PATH_MAX, "%s/%s", dev_input, fn);
                if( stat(path, &st) < 0 ) continue;
-               if( S_ISDIR(st.st_mode) ) continue;
+               if( !S_ISCHR(st.st_mode) ) continue;
                int fd = open(path, O_RDONLY);
                if( fd < 0 ) continue;
                if( !ioctl(fd, EVIOCGID, &dev_id) ) {
@@ -126,11 +126,11 @@ int WinTV::check_menu_keys(int code)
                break;
        case WTV_TV: {
                Record *record = mwindow->gui->record;
-                if( !record->running() )
-                        record->start();
-                else
-                        record->record_gui->interrupt_thread->start(0);
-                break; }
+               if( !record->running() )
+                       record->start();
+               else
+                       record->record_gui->interrupt_thread->start(0);
+               break; }
        case WTV_MENU:
 #ifdef HAVE_DVB
                mwindow->gui->channel_info->toggle_scan();
@@ -139,7 +139,7 @@ int WinTV::check_menu_keys(int code)
        case WTV_RED: {
                RemoteControl *remote_control = mwindow->gui->remote_control;
                if( !remote_control->deactivate() )
-                        remote_control->activate();
+                       remote_control->activate();
                break; }
        default:
                result = 0;
@@ -176,15 +176,15 @@ void WinTV::handle_event()
 
 int WinTVCWindowHandler::wintv_process_code(int code)
 {
-        MWindow *mwindow = wintv->mwindow;
-        EDL *edl = mwindow->edl;
-        if( !edl ) return 0;
-        PlayTransport *transport = mwindow->gui->mbuttons->transport;
-        if( !transport->get_edl() ) return 0;
-        PlaybackEngine *engine = transport->engine;
-        double position = engine->get_tracking_position();
-        double length = edl->tracks->total_length();
-        int next_command = -1;
+       MWindow *mwindow = wintv->mwindow;
+       EDL *edl = mwindow->edl;
+       if( !edl ) return 0;
+       PlayTransport *transport = mwindow->gui->mbuttons->transport;
+       if( !transport->get_edl() ) return 0;
+       PlaybackEngine *engine = transport->engine;
+       double position = engine->get_tracking_position();
+       double length = edl->tracks->total_length();
+       int next_command = -1;
 
        switch( code ) {
        case WTV_OK:
@@ -214,10 +214,10 @@ int WinTVCWindowHandler::wintv_process_code(int code)
        case WTV_DN:  position -= 60.0;  break;
        case WTV_BACK: return 1;
        case WTV_HOME: {
-                CWindowCanvas *canvas = mwindow->cwindow->gui->canvas;
-                int on = canvas->get_fullscreen() ? 0 : 1;
-                canvas->Canvas::set_fullscreen(on, 0);
-                return 1; }
+               CWindowCanvas *canvas = mwindow->cwindow->gui->canvas;
+               int on = canvas->get_fullscreen() ? 0 : 1;
+               canvas->Canvas::set_fullscreen(on, 0);
+               return 1; }
        case WTV_VOLUP: return 1;
        case WTV_VOLDN: return 1;
        case WTV_CH_UP: return 1;
@@ -240,7 +240,7 @@ int WinTVCWindowHandler::wintv_process_code(int code)
        if( next_command < 0 ) {
                if( position < 0 ) position = 0;
                transport->change_position(position);
-        }
+       }
        else
                transport->handle_transport(next_command);
        return 0;
index cefb6440f52ff160e5ba91d5fd1a6275d8c0d257..669cc7f9c04d00cb452ec40a4e8a5130732a4e62 100644 (file)
@@ -75,6 +75,7 @@ public:
        WinTVCWindowHandler(WinTV *wintv, RemoteControl *remote_control);
        int wintv_process_code(int code);
        int process_key(int key);
+       int is_wintv() { return 1; }
 
        WinTV *wintv;
 };
@@ -85,6 +86,7 @@ public:
        WinTVRecordHandler(WinTV *wintv, RemoteControl *remote_control);
        int wintv_process_code(int code);
        int process_key(int key);
+       int is_wintv() { return 1; }
 
        WinTV *wintv;
 };
diff --git a/cinelerra-5.1/cinelerra/x10tv.C b/cinelerra-5.1/cinelerra/x10tv.C
new file mode 100644 (file)
index 0000000..d97b745
--- /dev/null
@@ -0,0 +1,319 @@
+#ifdef HAVE_X10TV
+
+#include "channelinfo.h"
+#include "cwindow.h"
+#include "cwindowgui.h"
+#include "edl.h"
+#include "mbuttons.h"
+#include "mwindow.h"
+#include "mwindowgui.h"
+#include "language.h"
+#include "playbackengine.h"
+#include "playtransport.h"
+#include "record.h"
+#include "recordgui.h"
+#include "recordmonitor.h"
+#include "remotecontrol.h"
+#include "tracks.h"
+#include "x10tv.h"
+
+#include <dirent.h>
+#include <linux/input.h>
+
+X10TV::X10TV(MWindow *mwindow, int *fds, int nfds)
+{
+       this->mwindow = mwindow;
+       this->ifds = new int[nfds];
+       this->nfds = nfds;
+       for( int i=0; i<nfds; ++i ) this->ifds[i] = fds[i];
+
+       ev = new input_event;
+       memset(ev, 0, sizeof(*ev));
+       ev->code = -1;
+       done = -1;
+       last_code = -1;
+       code = -1;
+       FD_ZERO(&rfds);
+       mfd = -1;
+}
+
+X10TV::~X10TV()
+{
+       stop();
+       delete ev;
+}
+
+void X10TV::stop()
+{
+       done = 1;
+       for( int i=nfds; --i>=0; ) {
+               ioctl(ifds[i], EVIOCGRAB, 0);
+               close(ifds[i]);
+       }
+       nfds = 0;
+       if( running() ) {
+               cancel();
+               join();
+       }
+}
+
+void X10TV::start()
+{
+       FD_ZERO(&rfds);
+       mfd = -1;
+       for( int i=nfds; --i>=0; ) {
+               int fd = ifds[i];
+               ioctl(fd, EVIOCGRAB, 1);
+               if( fd >= mfd ) mfd = fd+1;
+               FD_SET(fd, &rfds);
+       }
+       done = 0;
+       Thread::start();
+}
+
+int X10TV::open_usb_inputs(int vendor, int product, int &version,
+               int *ifds, int mxfds)
+{
+       int ret = -1;
+       const char *dev_input = "/dev/input";
+       DIR *dir = opendir(dev_input);
+       if( !dir ) return ret;
+
+       struct dirent64 *dp;
+       struct input_id dev_id;
+       int nfds = 0;
+       while( nfds < mxfds && (dp = readdir64(dir)) != 0 ) {
+               char *fn = dp->d_name;
+               if( !strcmp(fn, ".") || !strcmp(fn, "..") ) continue;
+               char path[PATH_MAX];  struct stat st;
+               snprintf(path, PATH_MAX, "%s/%s", dev_input, fn);
+               if( stat(path, &st) < 0 ) continue;
+               if( !S_ISCHR(st.st_mode) ) continue;
+               int fd = open(path, O_RDONLY);
+               if( fd < 0 ) continue;
+               if( !ioctl(fd, EVIOCGID, &dev_id) ) {
+                       if( dev_id.bustype == BUS_USB &&
+                           dev_id.vendor == vendor &&
+                           dev_id.product == product ) {
+                               unsigned props = 0;
+                               // quirk, reports pointing_stick for keys
+                               unsigned mptrs =
+                                        (1<<INPUT_PROP_POINTING_STICK);
+                               int ret = ioctl(fd, EVIOCGPROP(sizeof(props)), &props);
+                               if( ret == sizeof(props) && (props & mptrs) ) {
+                                       version = dev_id.version;
+                                       ifds[nfds++] = fd;
+                                       continue;
+                               }
+                       }
+               }
+               close(fd);
+       }
+       closedir(dir);
+       return nfds;
+}
+
+
+X10TV *X10TV::probe(MWindow *mwindow)
+{
+       int ver = -1, ifds[16];
+       int nfds = open_usb_inputs(0x0bc7, 0x0004, ver, ifds, 16);
+       if( !nfds ) return 0;
+       printf("detected ATI X10 remote, ver=0x%04x\n", ver);
+       return new X10TV(mwindow, ifds, nfds);
+}
+
+void X10TV::run()
+{
+       enable_cancel();
+       while( !done ) {
+               fd_set rds = rfds;
+               int ret = select(mfd, &rds, 0, 0, 0);
+               if( ret < 0 ) break;
+               int fd = -1, k = ret > 0 ? nfds : 0;
+               while( --k >= 0 ) {
+                       int ifd = ifds[k];
+                       if( FD_ISSET(ifd, &rds) ) {
+                               fd = ifd;  break;
+                       }
+               }
+               if( fd < 0 ) {
+                       printf("select failed\n");
+                       usleep(100000);  continue;
+               }
+               ret = read(fd, ev, sizeof(*ev));
+               if( done ) break;
+               if( ret != sizeof(*ev) ) {
+                       if( ret < 0 ) { perror("read event"); break; }
+                       fprintf(stderr, "bad read: %d\n", ret);
+                       break;
+               }
+               handle_event(fd);
+       }
+}
+
+int X10TV::check_menu_keys(int code)
+{
+       int result = 1;
+       switch( code ) {
+       case X10_POWER:
+               mwindow->quit();
+               break;
+       case X10_TV: {
+               Record *record = mwindow->gui->record;
+               if( !record->running() )
+                       record->start();
+               else
+                       record->record_gui->interrupt_thread->start(0);
+               break; }
+       case X10_BOOK:
+#ifdef HAVE_DVB
+               mwindow->gui->channel_info->toggle_scan();
+#endif
+               break;
+       case X10_EDIT: {
+               RemoteControl *remote_control = mwindow->gui->remote_control;
+               if( !remote_control->deactivate() )
+                       remote_control->activate();
+               break; }
+       default:
+               result = 0;
+       }
+       return result;
+}
+
+void X10TV::handle_event(int fd)
+{
+       switch(ev->type) {
+       case EV_KEY: {
+               if( !ev->value ) break;
+               this->last_code = this->code;
+               this->code = ev->code;
+               if( check_menu_keys(code) ) break;
+               RemoteHandler *handler = mwindow->gui->remote_control->handler;
+               if( handler )
+                       handler->process_key(ev->code);
+               break; }
+       case EV_SYN:
+       case EV_MSC:
+               break;
+       default: {
+               time_t t = ev->time.tv_sec;
+               struct tm *tp = localtime(&t);
+               printf("x10tv event %d: %4d/%02d/%02d %02d:%02d:%02d.%03d = (%d, %d, 0x%x)\n",
+                       fd, tp->tm_year+1900, tp->tm_mon+1, tp->tm_mday,
+                       tp->tm_hour, tp->tm_min, tp->tm_sec,
+                       (int)ev->time.tv_usec/1000, ev->type, ev->code, ev->value);
+               break; }
+       }
+}
+
+
+int X10TVCWindowHandler::x10tv_process_code(int code)
+{
+       MWindow *mwindow = x10tv->mwindow;
+       EDL *edl = mwindow->edl;
+       if( !edl ) return 0;
+       PlayTransport *transport = mwindow->gui->mbuttons->transport;
+       if( !transport->get_edl() ) return 0;
+       PlaybackEngine *engine = transport->engine;
+       double position = engine->get_tracking_position();
+       double length = edl->tracks->total_length();
+       int next_command = -1;
+
+       switch( code ) {
+       case X10_A:             break;
+       case X10_B:             break;
+       case X10_POWER:         break;
+       case X10_TV:            break;
+       case X10_DVD:           break;
+       case X10_WWW:           break;
+       case X10_BOOK:          break;
+       case X10_EDIT:          break;
+       case X10_VOLDN:         return 1;
+       case X10_VOLUP:         return 1;
+       case X10_MUTE:          break;
+       case X10_CH_DN:         break;
+       case X10_CH_UP:         break;
+// select window tile config = BACK 1,2,3
+       case X10_1: case X10_2: case X10_3:
+               if( mwindow->x10tv->last_code == X10_MENU ) {
+                       RemoteGUI *rgui = mwindow->gui->cwindow_remote_handler->gui;
+                       rgui->tile_windows(code - X10_1);
+                       return 1;
+               } // fall thru
+// select asset program config = TEXT 1,2,3,4,5,6
+       case X10_4: case X10_5: case X10_6:
+               if( mwindow->x10tv->last_code == X10_SETUP ) {
+                       mwindow->select_asset(code - X10_1, 1);
+                       break;
+               } // fall thru
+       case X10_7: case X10_8: case X10_9:
+       case X10_0:
+// select position in 10 percent units
+               position = length * (code - X10_0)/10.0;
+               break;
+       case X10_MENU:          return 0;
+       case X10_SETUP:         return 0;
+       case X10_C:             return 1;
+       case X10_UP:  position += 60.0;  break;
+       case X10_D:             return 1;
+       case X10_PROPS:         return 1;
+       case X10_LT:  position -= 10.0;  break;
+       case X10_OK:            return 1;
+       case X10_RT:  position += 10.0;  break;
+       case X10_SCRN: {
+               CWindowCanvas *canvas = mwindow->cwindow->gui->canvas;
+               int on = canvas->get_fullscreen() ? 0 : 1;
+               canvas->Canvas::set_fullscreen(on, 0);
+               return 1; }
+       case X10_E:             return 1;
+       case X10_DN:  position -= 60.0;  break;
+       case X10_F:             return 1;
+       case X10_REW:   next_command = FAST_REWIND;     break;
+       case X10_PLAY:  next_command = NORMAL_FWD;      break;
+       case X10_FWD:   next_command = FAST_FWD;        break;
+       case X10_REC:   next_command = SLOW_REWIND;     break;
+       case X10_STOP:  next_command = STOP;            break;
+       case X10_PAUSE: next_command = SLOW_FWD;        break;
+
+       default:
+               printf("x10tv cwindow: unknown code: %04x\n", code);
+               return -1;
+       }
+
+       if( next_command < 0 ) {
+               if( position < 0 ) position = 0;
+               transport->change_position(position);
+       }
+       else
+               transport->handle_transport(next_command);
+       return 0;
+}
+
+int X10TVCWindowHandler::process_key(int key)
+{
+       return x10tv_process_code(key);
+}
+
+int X10TVRecordHandler::process_key(int key)
+{
+       Record *record = x10tv->mwindow->gui->record;
+       return record->x10tv_process_code(key);
+}
+
+
+X10TVRecordHandler::X10TVRecordHandler(X10TV *x10tv, RemoteControl *remote_control)
+ : RemoteHandler(remote_control->gui, GREEN)
+{
+       this->x10tv = x10tv;
+}
+
+X10TVCWindowHandler::X10TVCWindowHandler(X10TV *x10tv, RemoteControl *remote_control)
+ : RemoteHandler(remote_control->gui, BLUE)
+{
+       this->x10tv = x10tv;
+}
+
+// HAVE_X10TV
+#endif
diff --git a/cinelerra-5.1/cinelerra/x10tv.h b/cinelerra-5.1/cinelerra/x10tv.h
new file mode 100644 (file)
index 0000000..efb7fb0
--- /dev/null
@@ -0,0 +1,109 @@
+#ifndef __X10TV_H__
+#define __X10TV_H__
+#ifdef HAVE_X10TV
+
+#include "remotecontrol.h"
+#include "thread.h"
+
+#define X10_A          0x001e
+#define X10_B          0x0030
+#define X10_POWER      0x0074
+#define X10_TV         0x0179
+#define X10_DVD                0x0185
+#define X10_WWW                0x0096
+#define X10_BOOK       0x009c
+#define X10_EDIT       0x00b0
+#define X10_VOLDN      0x0072
+#define X10_VOLUP      0x0073
+#define X10_MUTE       0x0071
+#define X10_CH_DN      0x0193
+#define X10_CH_UP      0x0192
+#define X10_1          0x0201
+#define X10_2          0x0202
+#define X10_3          0x0203
+#define X10_4          0x0204
+#define X10_5          0x0205
+#define X10_6          0x0206
+#define X10_7          0x0207
+#define X10_8          0x0208
+#define X10_9          0x0209
+#define X10_MENU       0x008b
+#define X10_0          0x0200
+#define X10_SETUP      0x008d
+#define X10_C          0x002e
+#define X10_UP         0x0067
+#define X10_D          0x0020
+#define X10_PROPS      0x0082
+#define X10_LT         0x0069
+#define X10_OK         0x0160
+#define X10_RT         0x006a
+#define X10_SCRN       0x0177
+#define X10_E          0x0012
+#define X10_DN         0x006c
+#define X10_F          0x0021
+#define X10_REW                0x00a8
+#define X10_PLAY       0x00cf
+#define X10_FWD                0x00d0
+#define X10_REC                0x00a7
+#define X10_STOP       0x00a6
+#define X10_PAUSE      0x0077
+
+// unknown keysyms
+//#define X10_NEXT     0x0000
+//#define X10_PREV     0x0000
+//#define X10_INFO     0x0000
+//#define X10_HOME     0x0000
+//#define X10_END      0x0000
+//#define X10_SELECT   0x0000
+
+struct input_event;
+
+class X10TV : public Thread
+{
+public:
+       X10TV(MWindow *mwindow, int *ifd, int nfds);
+       ~X10TV();
+
+       void stop();
+       void start();
+       static int open_usb_inputs(int vendor, int product, int &version,
+                       int *ifds, int nfds);
+       static X10TV *probe(MWindow *mwindow);
+       void run();
+       void handle_event(int fd);
+       int check_menu_keys(int code);
+       virtual int process_code() { return 1; }
+
+       MWindow *mwindow;
+       input_event *ev;
+       int done;
+       int *ifds, nfds;
+       int last_code, code;
+       fd_set rfds;
+       int mfd;
+};
+
+class X10TVCWindowHandler : public RemoteHandler
+{
+public:
+       X10TVCWindowHandler(X10TV *wintv, RemoteControl *remote_control);
+       int x10tv_process_code(int code);
+       int process_key(int key);
+       int is_x10tv() { return 1; }
+
+       X10TV *x10tv;
+};
+
+class X10TVRecordHandler : public RemoteHandler
+{
+public:
+       X10TVRecordHandler(X10TV *wintv, RemoteControl *remote_control);
+       int wintv_process_code(int code);
+       int process_key(int key);
+       int is_x10tv() { return 1; }
+
+       X10TV *x10tv;
+};
+
+#endif
+#endif
diff --git a/cinelerra-5.1/cinelerra/x10tv.inc b/cinelerra-5.1/cinelerra/x10tv.inc
new file mode 100644 (file)
index 0000000..523c653
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __X10TV_INC__
+#define __X10TV_INC__
+
+class X10TV;
+class X10TVRemote;
+class X10TVCWindowHandler;
+class X10TVRecordHandler;
+
+#endif
index e2360c0a76d4e4db346d4f92cfc793ebd6ec3711..5067c68181fd0d1f0d71ae4523b73d5ff89bb2c0 100644 (file)
@@ -57,6 +57,7 @@ CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[yes])
 CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes])
 CHECK_WITH([shuttle],[shuttle device],[SHUTTLE],[yes])
 CHECK_WITH([wintv],[usb 2040:826d wintv device],[WINTV],[yes])
+CHECK_WITH([x10tv],[usb 0bc7:0004 X10 remote device],[X10TV],[yes])
 CHECK_WITH([vaapi],[video acceleration api],[VAAPI],[yes])
 CHECK_WITH([vdpau],[video decode+presentation api for unix],[VDPAU],[yes])
 CHECK_WITH([nv],[nvenc/nvdec ffnvcodec api],[NV],[yes])
@@ -887,7 +888,7 @@ fi
 for v in GL XFT XXF86VM OSS ALSA FIREWIRE DV DVB \
         VIDEO4LINUX2 ESOUND PACTL OPENEXR LV2 \
         COMMERCIAL LIBZMPEG SHUTTLE SHUTTLE_USB \
-        VAAPI VDPAU CUDA NV WINTV; do
+        VAAPI VDPAU CUDA NV WINTV X10TV; do
   eval vv="\$WANT_$v"
   if test "x$vv" != "xno"; then
     CFG_CFLAGS+=" -DHAVE_$v"
index a362095e3405c0084f0e170460465d1248076152..a12d71f66fa61ee900eaceb936753b41c2f11c4b 100644 (file)
@@ -1261,35 +1261,8 @@ if( debug && event->type != ClientMessage ) {
                case XK_F10:            key_pressed = KEY_F10;  break;
                case XK_F11:            key_pressed = KEY_F11;  break;
                case XK_F12:            key_pressed = KEY_F12;  break;
-
+// activates remote
                case XK_Menu:           key_pressed = KPMENU;   break;  /* menu */
-// remote control
-// above       case XK_KP_Enter:       key_pressed = KPENTER;  break;  /* check */
-               case XF86XK_MenuKB:     key_pressed = KPMENU;   break;  /* menu */
-// intercepted case XF86XK_PowerDown: key_pressed = KPPOWER;   break;  /* Power */
-               case XF86XK_Launch1:    key_pressed = KPTV;     break;  /* TV */
-               case XF86XK_Launch2:    key_pressed = KPDVD;    break;  /* DVD */
-// intercepted case XF86XK_WWW:        key_pressed = KPWWEB;   break;  /* WEB */
-               case XF86XK_Launch3:    key_pressed = KPBOOK;   break;  /* book */
-               case XF86XK_Launch4:    key_pressed = KPHAND;   break;  /* hand */
-               case XF86XK_Reply:      key_pressed = KPTMR;    break;  /* timer */
-               case SunXK_Front:       key_pressed = KPMAXW;   break;  /* max */
-// above       case XK_Left:           key_pressed = LEFT;     break;  /* left */
-// above       case XK_Right:          key_pressed = RIGHT;    break;  /* right */
-// above       case XK_Down:           key_pressed = DOWN;     break;  /* down */
-// above       case XK_Up:             key_pressed = UP;       break;  /* up */
-// above       case XK_SPACE:          key_pressed = KPSPACE;  break;  /* ok */
-// intercepted case XF86XK_AudioRaiseVolume: key_pressed = KPVOLU;     break;  /* VOL + */
-// intercepted case XF86XK_AudioMute: key_pressed = KPMUTE;    break;  /* MUTE */
-// intercepted case XF86XK_AudioLowerVolume: key_pressed = KPVOLD;     break;  /* VOL - */
-               case XF86XK_ScrollUp:   key_pressed = KPCHUP;   break;  /* CH + */
-               case XF86XK_ScrollDown: key_pressed = KPCHDN;   break;  /* CH - */
-               case XF86XK_AudioRecord: key_pressed = KPRECD;  break;  /* ( o) red */
-               case XF86XK_Forward:    key_pressed = KPPLAY;   break;  /* ( >) */
-               case XK_Redo:           key_pressed = KPFWRD;   break;  /* (>>) */
-               case XF86XK_Back:       key_pressed = KPBACK;   break;  /* (<<) */
-               case XK_Cancel:         key_pressed = KPSTOP;   break;  /* ([]) */
-               case XK_Pause:          key_pressed = KPAUSE;   break;  /* ('') */
 
                default:
                        key_pressed = keysym & 0xff;
index a79230b32de5820da3d14da1c42b48c67c747a29..801a75089493e4fa18f8dfcdfef32803cc8f4172 100644 (file)
 #define LEFTTAB             283
 #define DELETE              284
 
-// ati_remote key bindings
-//   requires some substitions in kernel module
-//   due to deficiencies in X evdev et al.  examples:
-//     need to know which dev created the event (duh)
-//     keycodes > 255 are dropped
-//     keycoodes are offset by 8 before xkb mapping
-//     a bunch of keycodes are intercepted by windowmanger
-// KEY_OK          = KEY_SPACE
-// KEY_CHANNELUP   = KEY_SCROLLUP
-// KEY_CHANNELDOWN = KEY_SCROLLDOWN
-// KEY_PLAY        = KEY_FORWARD
-// KEY_REWIND      = KEY_BACK
-// KEY_FORWARD     = KEY_AGAIN
-// - ati_remote.c, mapped in rc-ati-x10.c
-#if 0
-        { 0x18, KEY_KPENTER },          /* "check" */
-        { 0x16, KEY_MENU },             /* "menu" */
-        { 0x02, KEY_POWER },            /* Power */
-        { 0x03, KEY_PROG1 },            /* TV */        /* was KEY_TV */
-        { 0x04, KEY_PROG2 },            /* DVD */       /* was KEY_DVD */
-        { 0x05, KEY_WWW },              /* WEB */
-        { 0x06, KEY_PROG3 },            /* "book" */    /* was KEY_BOOKMARKS */
-        { 0x07, KEY_PROG4 },            /* "hand" */    /* was KEY_EDIT */
-        { 0x1c, KEY_REPLY },            /* "timer" */   /* was KEY_COFFEE */
-        { 0x20, KEY_FRONT },            /* "max" */
-        { 0x1d, KEY_LEFT },             /* left */
-        { 0x1f, KEY_RIGHT },            /* right */
-        { 0x22, KEY_DOWN },             /* down */
-        { 0x1a, KEY_UP },               /* up */
-        { 0x1e, KEY_SPACE },            /* "OK" */      /* was KEY_OK */
-        { 0x09, KEY_VOLUMEDOWN },       /* VOL + */
-        { 0x08, KEY_VOLUMEUP },         /* VOL - */
-        { 0x0a, KEY_MUTE },             /* MUTE  */
-        { 0x0b, KEY_SCROLLUP },         /* CH + */      /* was KEY_CHANNELUP */
-        { 0x0c, KEY_SCROLLDOWN },       /* CH - */      /* was KEY_CHANNELDOWN */
-        { 0x27, KEY_RECORD },           /* ( o) red */
-        { 0x25, KEY_FORWARD },          /* ( >) */      /* was KEY_PLAY */
-        { 0x24, KEY_BACK },             /* (<<) */      /* was KEY_REWIND */
-        { 0x26, KEY_AGAIN },            /* (>>) */      /* was KEY_FORWARD */
-        { 0x28, KEY_STOP },             /* ([]) */
-        { 0x29, KEY_PAUSE },            /* ('') */
-#endif
-#define KPREV               284
 #define KPMENU              285
 #define KPTV                286
-#define KPDVD               287
+#define KPREV               287
 #define KPBOOK              288
 #define KPHAND              289
-#define KPTMR               290
-#define KPMAXW              291
+#define KPMUTE              290
+#define KPFSCRN             291
 #define KPCHUP              292
 #define KPCHDN              293
 #define KPBACK              294
 #define KPRECD              297
 #define KPSTOP              298
 #define KPAUSE              299
+
 // function keys
 #define KEY_F1              301
 #define KEY_F2              302
 #define KEY_F10             310
 #define KEY_F11             311
 #define KEY_F12             312
+#define KPVOLUP             313
+#define KPVOLDN             314
+#define KPCC                315
 
 #define RETURN              13
 #define NEWLINE             13