Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Support #131

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f2bc052
throw out gstreamer
Aug 6, 2022
1574374
initial commit, windows activator
Aug 17, 2022
878d1ff
workflow experiment
Aug 17, 2022
e2abab5
workflow experiment
Aug 17, 2022
c40d745
workflow experiment
Aug 17, 2022
5879f33
workflow experiment
Aug 17, 2022
4eb92e5
disable tests for now
Aug 17, 2022
58107b5
disable tests for now
Aug 17, 2022
7f784ad
disable tests for now
Aug 17, 2022
22f64cf
complete impl
Aug 18, 2022
1ce9935
try fix ci
Aug 18, 2022
2ffa3b6
try fix ci
Aug 18, 2022
3bc6544
try fix ci
Aug 18, 2022
d7c507b
try fix ci
Aug 18, 2022
23f582d
try fix ci
Aug 18, 2022
91bd414
try fix ci
Aug 18, 2022
9c0cef4
try fix ci
Aug 18, 2022
776903f
artifact upload
Aug 18, 2022
aa41f1e
artifact upload
Aug 18, 2022
d9efe54
try set release build
Aug 19, 2022
1fb8485
try set release build
Aug 19, 2022
1435f6f
ignore default argument, add more verbose output
Aug 19, 2022
2986927
add init
Aug 19, 2022
1f64fce
try link lib
Aug 21, 2022
f94f493
add ls
Aug 21, 2022
30924ab
add ls
Aug 21, 2022
e21da1c
add ls
Aug 21, 2022
90c9234
add ls
Aug 21, 2022
e9b60f1
try link lib
Aug 21, 2022
3e50caa
try link lib
Aug 21, 2022
9605067
remove unused arg
Aug 21, 2022
2686edf
try link lib
Aug 21, 2022
a57ba52
try link lib
Aug 21, 2022
eeb24d5
verbose cmake
Aug 21, 2022
7c841b3
try random stuff
Aug 21, 2022
9d89870
try random stuff
Aug 21, 2022
897f4e1
try random stuff
Aug 21, 2022
b453dc9
add some line breaks
Aug 21, 2022
d108a39
add logs
Aug 21, 2022
07f6a02
add logs
Aug 21, 2022
e9f0e25
add logs
Aug 21, 2022
954ad4d
add logs
Aug 21, 2022
af3c7eb
add logs
Aug 21, 2022
18077e5
add some link
Aug 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/build-activator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on: [push]

name: Build Activator Test
jobs:
build_windows_activator:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: compile
run: |
md build
cmake -S "./" -B build
cmake --build build --target windows_activator -j 12 --config Release
dir build/Release/*
dir build/x64/Release/*
working-directory: ./windows_activator
- uses: actions/upload-artifact@v3
with:
name: my-artifact
path: ./windows_activator\build\Release\windows_activator.exe
42 changes: 0 additions & 42 deletions .github/workflows/test.yml

This file was deleted.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
[![codecov](https://codecov.io/gh/danielpaulus/quicktime_video_hack/branch/master/graph/badge.svg)](https://codecov.io/gh/danielpaulus/quicktime_video_hack)
[![Go Report](https://goreportcard.com/badge/github.com/danielpaulus/quicktime_video_hack)](https://goreportcard.com/report/github.com/danielpaulus/quicktime_video_hack)


windows notes:
https://github.com/google/gousb/issues/69


Release 0.6

- qvh without Gstreamer is finally stable on MacOSX. I ran it for 16 hours straight on parallel devices and it worked flawlessly.
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.16

require (
github.com/danielpaulus/go-ios v1.0.13
github.com/danielpaulus/gst v0.0.0-20200201205042-e6d2974fceb8
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
github.com/google/gousb v2.1.0+incompatible
github.com/lijo-jose/glib v0.0.0-20191012030101-93ee72d7d646
Expand Down
29 changes: 7 additions & 22 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bufio"
"encoding/json"
"fmt"
"github.com/danielpaulus/quicktime_video_hack/screencapture/udpsink"
stdlog "log"
"os"
"os/signal"
Expand All @@ -14,7 +15,6 @@ import (
"github.com/danielpaulus/quicktime_video_hack/screencapture"
"github.com/danielpaulus/quicktime_video_hack/screencapture/coremedia"
"github.com/danielpaulus/quicktime_video_hack/screencapture/diagnostics"
"github.com/danielpaulus/quicktime_video_hack/screencapture/gstadapter"
"github.com/docopt/docopt-go"
log "github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -112,10 +112,10 @@ The commands work as following:
return
}
if ogg {
recordAudioGst(outfile, device, gstadapter.OGG)

return
}
recordAudioGst(outfile, device, gstadapter.MP3)

return
}

Expand Down Expand Up @@ -219,16 +219,6 @@ func printExamples() {
fmt.Print(examples)
}

func recordAudioGst(outfile string, device screencapture.IosDevice, audiotype string) {
log.Debug("Starting Gstreamer with audio pipeline")
gStreamer, err := gstadapter.NewWithAudioPipeline(outfile, audiotype)
if err != nil {
printErrJSON(err, "Failed creating custom pipeline")
return
}
startWithConsumer(gStreamer, device, true)
}

func runDiagnostics(outfile string, dump bool, dumpFile string, device screencapture.IosDevice) {
log.Debugf("diagnostics mode: %s dump:%t %s device:%s", outfile, dump, dumpFile, device.SerialNumber)
metricsFile, err := os.Create(outfile)
Expand Down Expand Up @@ -272,19 +262,14 @@ func recordAudioWav(outfile string, device screencapture.IosDevice) {
}

func startGStreamerWithCustomPipeline(device screencapture.IosDevice, pipelineString string) {
log.Debug("Starting Gstreamer with custom pipeline")
gStreamer, err := gstadapter.NewWithCustomPipeline(pipelineString)
if err != nil {
printErrJSON(err, "Failed creating custom pipeline")
return
}
startWithConsumer(gStreamer, device, false)

}

func startGStreamer(device screencapture.IosDevice) {
log.Debug("Starting Gstreamer")
gStreamer := gstadapter.New()
startWithConsumer(gStreamer, device, false)
//gStreamer := gstadapter.New()
udpsink := udpsink.New("localhost:10001", "localhost:10000")
startWithConsumer(udpsink, device, false)
}

// Just dump a list of what was discovered to the console
Expand Down
10 changes: 7 additions & 3 deletions screencapture/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ func findIosDevices(ctx *gousb.Context, validDeviceChecker func(desc *gousb.Devi
return validDeviceChecker(desc)
})
if err != nil {
return nil, err
log.Warnf("OpenDevices showed some errors, this might be a problem: %v %v", err, devices)
}
iosDevices, err := mapToIosDevice(devices)
if err != nil {
return nil, err
return nil, fmt.Errorf("mapToIosDevice: %w", err)
}

return iosDevices, nil
Expand Down Expand Up @@ -163,10 +163,14 @@ func PrintDeviceDetails(devices []IosDevice) []map[string]interface{} {
}

func isValidIosDevice(desc *gousb.DeviceDesc) bool {
muxConfigIndex, _ := findConfigurations(desc)
log.Infof("descriptor: %+v", desc)
muxConfigIndex, qtConfig := findConfigurations(desc)
log.Infof("configs: %d %d", muxConfigIndex, qtConfig)
if muxConfigIndex == -1 {
log.Infof("don't open")
return false
}
log.Infof("open")
return true
}

Expand Down
Loading