Skip to content

Commit

Permalink
Port video capture to AVFoundation (#222)
Browse files Browse the repository at this point in the history
Minor changes, to non-core feature.
  • Loading branch information
johnno1962 authored May 2, 2020
1 parent 9c09321 commit 946442d
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 25 deletions.
8 changes: 7 additions & 1 deletion InjectionIII/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class AppDelegate : NSObject, NSApplicationDelegate {
@IBOutlet weak var enabledTDDItem: NSMenuItem!
@IBOutlet weak var enableVaccineItem: NSMenuItem!
@IBOutlet weak var windowItem: NSMenuItem!
@IBOutlet weak var remoteItem: NSMenuItem!
@IBOutlet weak var frontItem: NSMenuItem!
@IBOutlet var statusItem: NSStatusItem!

Expand Down Expand Up @@ -189,7 +190,12 @@ class AppDelegate : NSObject, NSApplicationDelegate {

@IBAction func startRemote(_ sender: NSMenuItem) {
RMWindowController.startServer(sender)
sender.state = .on
remoteItem.state = .on
}

@IBAction func stopRemote(_ sender: NSMenuItem) {
RMWindowController.stopServer()
remoteItem.state = .off
}

@IBAction func traceApp(_ sender: NSMenuItem) {
Expand Down
50 changes: 32 additions & 18 deletions InjectionIII/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<outlet property="enableWatcher" destination="0iA-WA-gxc" id="vVT-sI-q78"/>
<outlet property="enabledTDDItem" destination="Mdd-tb-kGc" id="ccs-nb-DKk"/>
<outlet property="frontItem" destination="wFq-Rv-gfa" id="MPU-fL-HYl"/>
<outlet property="remoteItem" destination="of9-Ja-9Yf" id="z57-Ut-oxK"/>
<outlet property="startItem" destination="vsd-ll-3nr" id="ODN-wa-BTp"/>
<outlet property="statusMenu" destination="V8Q-mq-A2f" id="Epo-HD-J21"/>
<outlet property="traceItem" destination="Kkx-ex-NCv" id="EXz-O7-K34"/>
Expand Down Expand Up @@ -737,34 +738,47 @@
<action selector="traceApp:" target="Voe-Tx-rLC" id="5zd-Ho-CaT"/>
</connections>
</menuItem>
<menuItem title="Remote" toolTip="Control device from desktop" id="K4h-UZ-IzJ">
<menuItem title="Remote" id="of9-Ja-9Yf">
<modifierMask key="keyEquivalentModifierMask"/>
<accessibility description="Trace App"/>
<connections>
<action selector="startRemote:" target="Voe-Tx-rLC" id="43L-Ge-CuP"/>
</connections>
</menuItem>
<menuItem title="Window" id="aUF-d1-5bR">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
<menu key="submenu" title="Remote" id="eGx-OC-usD">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
<menuItem title="Start Server" toolTip="Control device from desktop" id="7Om-BV-MqZ">
<modifierMask key="keyEquivalentModifierMask"/>
<accessibility description="Trace App"/>
<connections>
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
<action selector="startRemote:" target="Voe-Tx-rLC" id="odg-2Q-T1g"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="R4o-n2-Eq4">
<menuItem title="Stop Server" id="Fa8-hf-Yom">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
<action selector="stopRemote:" target="Voe-Tx-rLC" id="Fbl-rZ-MWg"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<menuItem title="Window" id="aUF-d1-5bR">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
</connections>
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
<connections>
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="R4o-n2-Eq4">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
Expand Down
2 changes: 1 addition & 1 deletion InjectionIII/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>2643</string>
<string>2670</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,13 @@ onto if they are running InjectionIII.) You can also use a machine's hostname
RemoteCapture.start("192.168.1.14")
#endif
```
When InjectionIII is running, select the "Remote" menu item to start the server
and then run your app. It should connect to the server which will pop up a
When InjectionIII is running, select the "Remote/Start Server" menu item to start the
server and then run your app. It should connect to the server which will pop up a
window showing the device display and accepting tap events. Events can be
saved as `macros` and replayed. If you include a snapshot in a macro this will
be compared against the device display (within a tolerance) when your replay
the macro for automated testing.
be compared against the device display (within an editable tolerance) when your
replay the macro for automated testing. As it operates over the network, `Remote`
isn't fast enough to capture animationed transitions.

## SwiftEval - Yes, it's eval() for Swift

Expand Down

0 comments on commit 946442d

Please sign in to comment.