Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b2cf0a1c5 | ||
|
|
20fab90546 | ||
|
|
0e08a1e484 | ||
|
|
e2b065bc4a | ||
|
|
c91727c086 | ||
|
|
2a26c279c5 | ||
|
|
38f8cb1357 | ||
|
|
b856db7239 | ||
|
|
b70cb2ff7c | ||
|
|
e4260dc5d5 | ||
|
|
a7af7d9844 | ||
|
|
b05004cdd8 | ||
|
|
bbf9df265e | ||
|
|
001b62917e | ||
|
|
cbc0cef95d | ||
|
|
754b3aff14 | ||
|
|
07a4293524 | ||
|
|
160e00ff43 | ||
|
|
1fd9a7a5c6 | ||
|
|
6f5326a4bf | ||
|
|
9da5285561 | ||
|
|
1966c4df4b | ||
|
|
96434f999c | ||
|
|
b3586f32f7 | ||
|
|
38a7dcd83c | ||
|
|
0c2e2b998d | ||
|
|
3513fc7809 | ||
|
|
fef75277bc | ||
|
|
5192891fc8 | ||
|
|
079fd1ea47 | ||
|
|
b814ca84df | ||
|
|
f095f61d65 | ||
|
|
69ebf8a578 | ||
|
|
067cea8674 | ||
|
|
59ffc76d4e | ||
|
|
3c702afdb0 | ||
|
|
d652e49001 | ||
|
|
7f079333dc | ||
|
|
623585c359 | ||
|
|
f0f92d9f08 | ||
|
|
04ab232a40 | ||
|
|
e55db52ed9 | ||
|
|
73ff2d730d | ||
|
|
e0c0383ab8 | ||
|
|
27366ba158 | ||
|
|
071e002d6c | ||
|
|
f6e7512c53 | ||
|
|
dd308b1634 | ||
|
|
83d5d2c779 | ||
|
|
eff48a9c39 | ||
|
|
8fb6f86021 | ||
|
|
57d68886f4 | ||
|
|
440eda15e1 | ||
|
|
78efbb3a71 | ||
|
|
ceab2b2d6f | ||
|
|
576f0b512f | ||
|
|
7492f5e807 | ||
|
|
0075b97976 | ||
|
|
a3f8239da7 | ||
|
|
6d5806ef5c | ||
|
|
3a5e065a08 | ||
|
|
620cd7b19a | ||
|
|
099b83484c | ||
|
|
dceef8f279 | ||
|
|
e26ed27575 | ||
|
|
de796552bd | ||
|
|
1330f58689 | ||
|
|
a55c177e7d | ||
|
|
3e5cf55dd8 | ||
|
|
6840a6939a | ||
|
|
a51e500584 | ||
|
|
eac38013f7 | ||
|
|
dad8ab02bd | ||
|
|
0c8144a5cd | ||
|
|
b3a1262fb8 | ||
|
|
7fcfe6945a | ||
|
|
a983b68ce6 | ||
|
|
6b422e21bf | ||
|
|
8e8b039a63 | ||
|
|
0702be86d8 | ||
|
|
0cea7fb24c |
@@ -31,6 +31,7 @@ src = [
|
||||
'src/version.c',
|
||||
'src/video_buffer.c',
|
||||
'src/util/acksync.c',
|
||||
'src/util/average.c',
|
||||
'src/util/bytebuf.c',
|
||||
'src/util/file.c',
|
||||
'src/util/intmap.c',
|
||||
@@ -136,12 +137,14 @@ else
|
||||
ffmpeg_avcodec = meson.get_cross_property('ffmpeg_avcodec')
|
||||
ffmpeg_avformat = meson.get_cross_property('ffmpeg_avformat')
|
||||
ffmpeg_avutil = meson.get_cross_property('ffmpeg_avutil')
|
||||
ffmpeg_swresample = meson.get_cross_property('ffmpeg_swresample')
|
||||
|
||||
ffmpeg = declare_dependency(
|
||||
dependencies: [
|
||||
cc.find_library(ffmpeg_avcodec, dirs: ffmpeg_bin_dir),
|
||||
cc.find_library(ffmpeg_avformat, dirs: ffmpeg_bin_dir),
|
||||
cc.find_library(ffmpeg_avutil, dirs: ffmpeg_bin_dir),
|
||||
cc.find_library(ffmpeg_swresample, dirs: ffmpeg_bin_dir),
|
||||
],
|
||||
include_directories: include_directories(ffmpeg_include_dir)
|
||||
)
|
||||
|
||||
@@ -4,11 +4,27 @@
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
/** Downcast frame_sink to sc_v4l2_sink */
|
||||
#define SC_AUDIO_PLAYER_NDEBUG // comment to debug
|
||||
|
||||
/** Downcast frame_sink to sc_audio_player */
|
||||
#define DOWNCAST(SINK) container_of(SINK, struct sc_audio_player, frame_sink)
|
||||
|
||||
#define SC_AV_SAMPLE_FMT AV_SAMPLE_FMT_S16
|
||||
#define SC_SDL_SAMPLE_FMT AUDIO_S16
|
||||
#define SC_AV_SAMPLE_FMT AV_SAMPLE_FMT_FLT
|
||||
#define SC_SDL_SAMPLE_FMT AUDIO_F32
|
||||
|
||||
#define SC_AUDIO_OUTPUT_BUFFER_SAMPLES 480 // 10ms at 48000Hz
|
||||
|
||||
// The target number of buffered samples between the producer and the consumer.
|
||||
// This value is directly use for compensation.
|
||||
#define SC_TARGET_BUFFERED_SAMPLES (3 * SC_AUDIO_OUTPUT_BUFFER_SAMPLES)
|
||||
|
||||
// If the consumer is too late, skip samples to keep at most this value
|
||||
#define SC_BUFFERED_SAMPLES_THRESHOLD 2400 // 50ms at 48000Hz
|
||||
|
||||
// Use a ring-buffer of 1 second (at 48000Hz) between the producer and the
|
||||
// consumer. It too big, but it guarantees that the producer and the consumer
|
||||
// will be able to access it in parallel without locking.
|
||||
#define SC_BYTEBUF_SIZE_IN_SAMPLES 48000
|
||||
|
||||
void
|
||||
sc_audio_player_sdl_callback(void *userdata, uint8_t *stream, int len_int) {
|
||||
@@ -20,21 +36,49 @@ sc_audio_player_sdl_callback(void *userdata, uint8_t *stream, int len_int) {
|
||||
assert(len_int > 0);
|
||||
size_t len = len_int;
|
||||
|
||||
#ifndef SC_AUDIO_PLAYER_NDEBUG
|
||||
LOGD("[Audio] SDL callback requests %" SC_PRIsizet " samples",
|
||||
len / (ap->nb_channels * ap->out_bytes_per_sample));
|
||||
#endif
|
||||
|
||||
size_t read = sc_bytebuf_read_remaining(&ap->buf);
|
||||
size_t max_buffered_bytes = SC_BUFFERED_SAMPLES_THRESHOLD
|
||||
* ap->nb_channels * ap->out_bytes_per_sample;
|
||||
if (read > max_buffered_bytes + len) {
|
||||
size_t skip = read - (max_buffered_bytes + len);
|
||||
#ifndef SC_AUDIO_PLAYER_NDEBUG
|
||||
LOGD("[Audio] Buffered samples threshold exceeded: %" SC_PRIsizet
|
||||
" bytes, skipping %" SC_PRIsizet " bytes", read, skip);
|
||||
#endif
|
||||
// After this callback, exactly max_buffered_bytes will remain
|
||||
sc_bytebuf_skip(&ap->buf, skip);
|
||||
read = max_buffered_bytes + len;
|
||||
}
|
||||
|
||||
// Number of buffered samples (may be negative on underflow)
|
||||
float buffered_samples = ((float) read - len_int)
|
||||
/ (ap->nb_channels * ap->out_bytes_per_sample);
|
||||
sc_average_push(&ap->avg_buffered_samples, buffered_samples);
|
||||
|
||||
if (read) {
|
||||
if (read > len) {
|
||||
read = len;
|
||||
}
|
||||
sc_bytebuf_read(&ap->buf, stream, read);
|
||||
}
|
||||
|
||||
if (read < len) {
|
||||
// Insert silence
|
||||
#ifndef SC_AUDIO_PLAYER_NDEBUG
|
||||
LOGD("[Audio] Buffer underflow, inserting silence: %" SC_PRIsizet
|
||||
" bytes", len - read);
|
||||
#endif
|
||||
memset(stream + read, 0, len - read);
|
||||
}
|
||||
}
|
||||
|
||||
static size_t
|
||||
sc_audio_player_get_swr_buf_size(struct sc_audio_player *ap, size_t samples) {
|
||||
sc_audio_player_get_buf_size(struct sc_audio_player *ap, size_t samples) {
|
||||
assert(ap->nb_channels);
|
||||
assert(ap->out_bytes_per_sample);
|
||||
return samples * ap->nb_channels * ap->out_bytes_per_sample;
|
||||
@@ -42,7 +86,7 @@ sc_audio_player_get_swr_buf_size(struct sc_audio_player *ap, size_t samples) {
|
||||
|
||||
static uint8_t *
|
||||
sc_audio_player_get_swr_buf(struct sc_audio_player *ap, size_t min_samples) {
|
||||
size_t min_buf_size = sc_audio_player_get_swr_buf_size(ap, min_samples);
|
||||
size_t min_buf_size = sc_audio_player_get_buf_size(ap, min_samples);
|
||||
if (min_buf_size < ap->swr_buf_alloc_size) {
|
||||
size_t new_size = min_buf_size + 4096;
|
||||
uint8_t *buf = realloc(ap->swr_buf, new_size);
|
||||
@@ -62,46 +106,20 @@ static bool
|
||||
sc_audio_player_frame_sink_open(struct sc_frame_sink *sink,
|
||||
const AVCodecContext *ctx) {
|
||||
struct sc_audio_player *ap = DOWNCAST(sink);
|
||||
|
||||
SwrContext *swr_ctx = ap->swr_ctx;
|
||||
assert(swr_ctx);
|
||||
|
||||
assert(ctx->sample_rate > 0);
|
||||
#ifdef SCRCPY_LAVU_HAS_CHLAYOUT
|
||||
assert(ctx->ch_layout.nb_channels > 0);
|
||||
assert(!av_sample_fmt_is_planar(SC_AV_SAMPLE_FMT));
|
||||
int out_bytes_per_sample = av_get_bytes_per_sample(SC_AV_SAMPLE_FMT);
|
||||
assert(out_bytes_per_sample > 0);
|
||||
|
||||
av_opt_set_chlayout(swr_ctx, "in_chlayout", &ctx->ch_layout, 0);
|
||||
av_opt_set_int(swr_ctx, "in_sample_rate", ctx->sample_rate, 0);
|
||||
av_opt_set_sample_fmt(swr_ctx, "in_sample_fmt", ctx->sample_fmt, 0);
|
||||
|
||||
av_opt_set_chlayout(swr_ctx, "out_chlayout", &ctx->ch_layout, 0);
|
||||
av_opt_set_int(swr_ctx, "out_sample_rate", ctx->sample_rate, 0);
|
||||
av_opt_set_sample_fmt(swr_ctx, "out_sample_fmt", SC_AV_SAMPLE_FMT, 0);
|
||||
|
||||
int ret = swr_init(swr_ctx);
|
||||
if (ret) {
|
||||
LOGE("Failed to initialize the resampling context");
|
||||
return false;
|
||||
}
|
||||
|
||||
ap->sample_rate = ctx->sample_rate;
|
||||
ap->nb_channels = ctx->ch_layout.nb_channels;
|
||||
ap->out_bytes_per_sample = out_bytes_per_sample;
|
||||
|
||||
size_t initial_swr_buf_size = sc_audio_player_get_swr_buf_size(ap, 4096);
|
||||
ap->swr_buf = malloc(initial_swr_buf_size);
|
||||
if (!ap->swr_buf) {
|
||||
LOG_OOM();
|
||||
return false;
|
||||
}
|
||||
unsigned nb_channels = ctx->ch_layout.nb_channels;
|
||||
#else
|
||||
int tmp = av_get_channel_layout_nb_channels(ctx->channel_layout);
|
||||
assert(tmp > 0);
|
||||
unsigned nb_channels = tmp;
|
||||
#endif
|
||||
|
||||
SDL_AudioSpec desired = {
|
||||
.freq = ctx->sample_rate,
|
||||
.format = SC_SDL_SAMPLE_FMT,
|
||||
.channels = ctx->ch_layout.nb_channels,
|
||||
.samples = 512, // ~10ms at 48000Hz
|
||||
.channels = nb_channels,
|
||||
.samples = SC_AUDIO_OUTPUT_BUFFER_SAMPLES,
|
||||
.callback = sc_audio_player_sdl_callback,
|
||||
.userdata = ap,
|
||||
};
|
||||
@@ -113,9 +131,78 @@ sc_audio_player_frame_sink_open(struct sc_frame_sink *sink,
|
||||
return false;
|
||||
}
|
||||
|
||||
SwrContext *swr_ctx = swr_alloc();
|
||||
if (!swr_ctx) {
|
||||
LOG_OOM();
|
||||
goto error_close_audio_device;
|
||||
}
|
||||
ap->swr_ctx = swr_ctx;
|
||||
|
||||
assert(ctx->sample_rate > 0);
|
||||
assert(!av_sample_fmt_is_planar(SC_AV_SAMPLE_FMT));
|
||||
|
||||
int out_bytes_per_sample = av_get_bytes_per_sample(SC_AV_SAMPLE_FMT);
|
||||
assert(out_bytes_per_sample > 0);
|
||||
|
||||
#ifdef SCRCPY_LAVU_HAS_CHLAYOUT
|
||||
av_opt_set_chlayout(swr_ctx, "in_chlayout", &ctx->ch_layout, 0);
|
||||
av_opt_set_chlayout(swr_ctx, "out_chlayout", &ctx->ch_layout, 0);
|
||||
#else
|
||||
av_opt_set_channel_layout(swr_ctx, "in_channel_layout",
|
||||
ctx->channel_layout, 0);
|
||||
av_opt_set_channel_layout(swr_ctx, "out_channel_layout",
|
||||
ctx->channel_layout, 0);
|
||||
#endif
|
||||
|
||||
av_opt_set_int(swr_ctx, "in_sample_rate", ctx->sample_rate, 0);
|
||||
av_opt_set_int(swr_ctx, "out_sample_rate", ctx->sample_rate, 0);
|
||||
|
||||
av_opt_set_sample_fmt(swr_ctx, "in_sample_fmt", ctx->sample_fmt, 0);
|
||||
av_opt_set_sample_fmt(swr_ctx, "out_sample_fmt", SC_AV_SAMPLE_FMT, 0);
|
||||
|
||||
int ret = swr_init(swr_ctx);
|
||||
if (ret) {
|
||||
LOGE("Failed to initialize the resampling context");
|
||||
goto error_free_swr_ctx;
|
||||
}
|
||||
|
||||
ap->sample_rate = ctx->sample_rate;
|
||||
ap->nb_channels = nb_channels;
|
||||
ap->out_bytes_per_sample = out_bytes_per_sample;
|
||||
|
||||
size_t bytebuf_size =
|
||||
sc_audio_player_get_buf_size(ap, SC_BYTEBUF_SIZE_IN_SAMPLES);
|
||||
|
||||
bool ok = sc_bytebuf_init(&ap->buf, bytebuf_size);
|
||||
if (!ok) {
|
||||
goto error_free_swr_ctx;
|
||||
}
|
||||
|
||||
ap->safe_empty_buffer = sc_bytebuf_write_remaining(&ap->buf);
|
||||
|
||||
size_t initial_swr_buf_size = sc_audio_player_get_buf_size(ap, 4096);
|
||||
ap->swr_buf = malloc(initial_swr_buf_size);
|
||||
if (!ap->swr_buf) {
|
||||
LOG_OOM();
|
||||
goto error_destroy_bytebuf;
|
||||
}
|
||||
ap->swr_buf_alloc_size = initial_swr_buf_size;
|
||||
|
||||
sc_average_init(&ap->avg_buffered_samples, 32);
|
||||
ap->samples_since_resync = 0;
|
||||
|
||||
SDL_PauseAudioDevice(ap->device, 0);
|
||||
|
||||
return true;
|
||||
|
||||
error_destroy_bytebuf:
|
||||
sc_bytebuf_destroy(&ap->buf);
|
||||
error_free_swr_ctx:
|
||||
swr_free(&ap->swr_ctx);
|
||||
error_close_audio_device:
|
||||
SDL_CloseAudioDevice(ap->device);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -125,6 +212,10 @@ sc_audio_player_frame_sink_close(struct sc_frame_sink *sink) {
|
||||
assert(ap->device);
|
||||
SDL_PauseAudioDevice(ap->device, 1);
|
||||
SDL_CloseAudioDevice(ap->device);
|
||||
|
||||
free(ap->swr_buf);
|
||||
sc_bytebuf_destroy(&ap->buf);
|
||||
swr_free(&ap->swr_ctx);
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -148,12 +239,12 @@ sc_audio_player_frame_sink_push(struct sc_frame_sink *sink, const AVFrame *frame
|
||||
LOGE("Resampling failed: %d", ret);
|
||||
return false;
|
||||
}
|
||||
LOGI("ret=%d dst_nb_samples=%d\n", ret, dst_nb_samples);
|
||||
|
||||
size_t swr_buf_size = sc_audio_player_get_swr_buf_size(ap, ret);
|
||||
LOGI("== swr_buf_size %lu", swr_buf_size);
|
||||
|
||||
// TODO clock drift compensation
|
||||
size_t samples_written = ret;
|
||||
size_t swr_buf_size = sc_audio_player_get_buf_size(ap, samples_written);
|
||||
#ifndef SC_AUDIO_PLAYER_NDEBUG
|
||||
LOGI("[Audio] %" SC_PRIsizet " samples written to buffer", samples_written);
|
||||
#endif
|
||||
|
||||
// It should almost always be possible to write without lock
|
||||
bool can_write_without_lock = swr_buf_size <= ap->safe_empty_buffer;
|
||||
@@ -170,36 +261,39 @@ sc_audio_player_frame_sink_push(struct sc_frame_sink *sink, const AVFrame *frame
|
||||
|
||||
// The next time, it will remain at least the current empty space
|
||||
ap->safe_empty_buffer = sc_bytebuf_write_remaining(&ap->buf);
|
||||
|
||||
// Read the value written by the SDL thread under lock
|
||||
float avg;
|
||||
bool has_avg = sc_average_get(&ap->avg_buffered_samples, &avg);
|
||||
|
||||
SDL_UnlockAudioDevice(ap->device);
|
||||
|
||||
if (has_avg) {
|
||||
ap->samples_since_resync += samples_written;
|
||||
if (ap->samples_since_resync >= ap->sample_rate) {
|
||||
// Resync every second
|
||||
ap->samples_since_resync = 0;
|
||||
|
||||
int diff = SC_TARGET_BUFFERED_SAMPLES - avg;
|
||||
#ifndef SC_AUDIO_PLAYER_NDEBUG
|
||||
LOGI("[Audio] Average buffered samples = %f, compensation %d",
|
||||
avg, diff);
|
||||
#endif
|
||||
// Compensate the diff over 3 seconds (but will be recomputed after
|
||||
// 1 second)
|
||||
int ret = swr_set_compensation(swr_ctx, diff, 3 * ap->sample_rate);
|
||||
if (ret < 0) {
|
||||
LOGW("Resampling compensation failed: %d", ret);
|
||||
// not fatal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
sc_audio_player_init(struct sc_audio_player *ap,
|
||||
const struct sc_audio_player_callbacks *cbs,
|
||||
void *cbs_userdata) {
|
||||
bool ok = sc_bytebuf_init(&ap->buf, 128 * 1024);
|
||||
if (!ok) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ap->swr_ctx = swr_alloc();
|
||||
if (!ap->swr_ctx) {
|
||||
sc_bytebuf_destroy(&ap->buf);
|
||||
LOG_OOM();
|
||||
return false;
|
||||
}
|
||||
|
||||
ap->safe_empty_buffer = sc_bytebuf_write_remaining(&ap->buf);
|
||||
|
||||
ap->swr_buf = NULL;
|
||||
ap->swr_buf_alloc_size = 0;
|
||||
|
||||
assert(cbs && cbs->on_ended);
|
||||
ap->cbs = cbs;
|
||||
ap->cbs_userdata = cbs_userdata;
|
||||
|
||||
void
|
||||
sc_audio_player_init(struct sc_audio_player *ap) {
|
||||
static const struct sc_frame_sink_ops ops = {
|
||||
.open = sc_audio_player_frame_sink_open,
|
||||
.close = sc_audio_player_frame_sink_close,
|
||||
@@ -207,12 +301,4 @@ sc_audio_player_init(struct sc_audio_player *ap,
|
||||
};
|
||||
|
||||
ap->frame_sink.ops = &ops;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
sc_audio_player_destroy(struct sc_audio_player *ap) {
|
||||
sc_bytebuf_destroy(&ap->buf);
|
||||
swr_free(&ap->swr_ctx);
|
||||
free(ap->swr_buf);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "trait/frame_sink.h"
|
||||
#include <util/average.h>
|
||||
#include <util/bytebuf.h>
|
||||
#include <util/thread.h>
|
||||
|
||||
@@ -35,6 +36,10 @@ struct sc_audio_player {
|
||||
uint8_t *swr_buf;
|
||||
size_t swr_buf_alloc_size;
|
||||
|
||||
// Number of buffered samples (may be negative on underflow)
|
||||
struct sc_average avg_buffered_samples;
|
||||
unsigned samples_since_resync;
|
||||
|
||||
const struct sc_audio_player_callbacks *cbs;
|
||||
void *cbs_userdata;
|
||||
};
|
||||
@@ -43,12 +48,7 @@ struct sc_audio_player_callbacks {
|
||||
void (*on_ended)(struct sc_audio_player *ap, bool success, void *userdata);
|
||||
};
|
||||
|
||||
bool
|
||||
sc_audio_player_init(struct sc_audio_player *ap,
|
||||
const struct sc_audio_player_callbacks *cbs,
|
||||
void *cbs_userdata);
|
||||
|
||||
void
|
||||
sc_audio_player_destroy(struct sc_audio_player *ap);
|
||||
sc_audio_player_init(struct sc_audio_player *ap);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,13 @@
|
||||
# define SCRCPY_LAVF_HAS_AVFORMATCONTEXT_URL
|
||||
#endif
|
||||
|
||||
// Not documented in ffmpeg/doc/APIchanges, but the channel_layout API
|
||||
// has been replaced by chlayout in FFmpeg commit
|
||||
// f423497b455da06c1337846902c770028760e094.
|
||||
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 23, 100)
|
||||
# define SCRCPY_LAVU_HAS_CHLAYOUT
|
||||
#endif
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 6)
|
||||
// <https://github.com/libsdl-org/SDL/commit/d7a318de563125e5bb465b1000d6bc9576fbc6fc>
|
||||
# define SCRCPY_SDL_HAS_HINT_TOUCH_MOUSE_EVENTS
|
||||
|
||||
@@ -53,8 +53,13 @@ sc_decoder_open(struct sc_decoder *decoder, const AVCodec *codec) {
|
||||
decoder->codec_ctx->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
} else {
|
||||
// Hardcoded audio properties
|
||||
#ifdef SCRCPY_LAVU_HAS_CHLAYOUT
|
||||
decoder->codec_ctx->ch_layout =
|
||||
(AVChannelLayout) AV_CHANNEL_LAYOUT_STEREO;
|
||||
#else
|
||||
decoder->codec_ctx->channel_layout = AV_CH_LAYOUT_STEREO;
|
||||
decoder->codec_ctx->channels = 2;
|
||||
#endif
|
||||
decoder->codec_ctx->sample_rate = 48000;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ decode_image(const char *path) {
|
||||
}
|
||||
|
||||
if (avformat_open_input(&ctx, path, NULL, NULL) < 0) {
|
||||
LOGE("Could not open image codec: %s", path);
|
||||
LOGE("Could not open icon image: %s", path);
|
||||
goto free_ctx;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "util/str.h"
|
||||
#endif
|
||||
#ifdef HAVE_V4L2
|
||||
# include <libavdevice/avdevice.h>
|
||||
#endif
|
||||
@@ -19,8 +15,14 @@
|
||||
#include "scrcpy.h"
|
||||
#include "usb/scrcpy_otg.h"
|
||||
#include "util/log.h"
|
||||
#include "util/net.h"
|
||||
#include "version.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "util/str.h"
|
||||
#endif
|
||||
|
||||
int
|
||||
main_scrcpy(int argc, char *argv[]) {
|
||||
#ifdef _WIN32
|
||||
@@ -69,7 +71,7 @@ main_scrcpy(int argc, char *argv[]) {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (avformat_network_init()) {
|
||||
if (!net_init()) {
|
||||
return SCRCPY_EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -82,8 +84,6 @@ main_scrcpy(int argc, char *argv[]) {
|
||||
enum scrcpy_exit_code ret = scrcpy(&args.opts);
|
||||
#endif
|
||||
|
||||
avformat_network_deinit(); // ignore failure
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,12 @@ sc_recorder_wait_audio_stream(struct sc_recorder *recorder) {
|
||||
|
||||
stream->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
stream->codecpar->codec_id = codec->id;
|
||||
#ifdef SCRCPY_LAVU_HAS_CHLAYOUT
|
||||
stream->codecpar->ch_layout.nb_channels = 2;
|
||||
#else
|
||||
stream->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
|
||||
stream->codecpar->channels = 2;
|
||||
#endif
|
||||
stream->codecpar->sample_rate = 48000;
|
||||
|
||||
recorder->audio_stream_index = stream->index;
|
||||
|
||||
@@ -217,17 +217,6 @@ sc_recorder_on_ended(struct sc_recorder *recorder, bool success,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sc_audio_player_on_ended(struct sc_audio_player *ap, bool success,
|
||||
void *userdata) {
|
||||
(void) ap;
|
||||
(void) userdata;
|
||||
|
||||
if (!success) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sc_video_demuxer_on_ended(struct sc_demuxer *demuxer, bool eos,
|
||||
void *userdata) {
|
||||
@@ -314,7 +303,6 @@ scrcpy(struct scrcpy_options *options) {
|
||||
bool file_pusher_initialized = false;
|
||||
bool recorder_initialized = false;
|
||||
bool recorder_started = false;
|
||||
bool audio_player_initialized = false;
|
||||
#ifdef HAVE_V4L2
|
||||
bool v4l2_sink_initialized = false;
|
||||
#endif
|
||||
@@ -686,15 +674,7 @@ aoa_hid_end:
|
||||
sc_decoder_add_sink(&s->video_decoder, &s->screen.frame_sink);
|
||||
|
||||
if (options->audio) {
|
||||
static const struct sc_audio_player_callbacks audio_player_cbs = {
|
||||
.on_ended = sc_audio_player_on_ended,
|
||||
};
|
||||
if (!sc_audio_player_init(&s->audio_player,
|
||||
&audio_player_cbs, NULL)) {
|
||||
goto end;
|
||||
}
|
||||
audio_player_initialized = true;
|
||||
|
||||
sc_audio_player_init(&s->audio_player);
|
||||
sc_decoder_add_sink(&s->audio_decoder, &s->audio_player.frame_sink);
|
||||
}
|
||||
}
|
||||
@@ -817,10 +797,6 @@ end:
|
||||
sc_recorder_destroy(&s->recorder);
|
||||
}
|
||||
|
||||
if (audio_player_initialized) {
|
||||
sc_audio_player_destroy(&s->audio_player);
|
||||
}
|
||||
|
||||
if (file_pusher_initialized) {
|
||||
sc_file_pusher_join(&s->file_pusher);
|
||||
sc_file_pusher_destroy(&s->file_pusher);
|
||||
|
||||
@@ -333,6 +333,7 @@ static bool
|
||||
sc_screen_frame_sink_open(struct sc_frame_sink *sink,
|
||||
const AVCodecContext *ctx) {
|
||||
assert(ctx->pix_fmt == AV_PIX_FMT_YUV420P);
|
||||
(void) ctx;
|
||||
|
||||
struct sc_screen *screen = DOWNCAST(sink);
|
||||
(void) screen;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "bytebuf.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ bool
|
||||
net_init(void) {
|
||||
#ifdef _WIN32
|
||||
WSADATA wsa;
|
||||
int res = WSAStartup(MAKEWORD(2, 2), &wsa) < 0;
|
||||
if (res < 0) {
|
||||
int res = WSAStartup(MAKEWORD(1, 1), &wsa);
|
||||
if (res) {
|
||||
LOGE("WSAStartup failed with error %d", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -158,6 +158,7 @@ sc_video_buffer_on_new_frame(struct sc_video_buffer *vb, bool previous_skipped,
|
||||
static bool
|
||||
sc_v4l2_sink_open(struct sc_v4l2_sink *vs, const AVCodecContext *ctx) {
|
||||
assert(ctx->pix_fmt == AV_PIX_FMT_YUV420P);
|
||||
(void) ctx;
|
||||
|
||||
static const struct sc_video_buffer_callbacks cbs = {
|
||||
.on_new_frame = sc_video_buffer_on_new_frame,
|
||||
@@ -338,9 +339,9 @@ sc_v4l2_sink_push(struct sc_v4l2_sink *vs, const AVFrame *frame) {
|
||||
}
|
||||
|
||||
static bool
|
||||
sc_v4l2_frame_sink_open(struct sc_frame_sink *sink) {
|
||||
sc_v4l2_frame_sink_open(struct sc_frame_sink *sink, const AVCodecContext *ctx) {
|
||||
struct sc_v4l2_sink *vs = DOWNCAST(sink);
|
||||
return sc_v4l2_sink_open(vs);
|
||||
return sc_v4l2_sink_open(vs, ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -7,7 +7,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.2.2'
|
||||
classpath 'com.android.tools.build:gradle:7.4.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
@@ -19,6 +19,7 @@ endian = 'little'
|
||||
ffmpeg_avcodec = 'avcodec-58'
|
||||
ffmpeg_avformat = 'avformat-58'
|
||||
ffmpeg_avutil = 'avutil-56'
|
||||
ffmpeg_swresample = 'swresample-3'
|
||||
prebuilt_ffmpeg = 'ffmpeg-win32-4.3.1'
|
||||
prebuilt_sdl2 = 'SDL2-2.26.1/i686-w64-mingw32'
|
||||
prebuilt_libusb_root = 'libusb-1.0.26'
|
||||
|
||||
@@ -19,6 +19,7 @@ endian = 'little'
|
||||
ffmpeg_avcodec = 'avcodec-59'
|
||||
ffmpeg_avformat = 'avformat-59'
|
||||
ffmpeg_avutil = 'avutil-57'
|
||||
ffmpeg_swresample = 'swresample-4'
|
||||
prebuilt_ffmpeg = 'ffmpeg-win64-5.1.2'
|
||||
prebuilt_sdl2 = 'SDL2-2.26.1/x86_64-w64-mingw32'
|
||||
prebuilt_libusb_root = 'libusb-1.0.26'
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
namespace 'com.genymobile.scrcpy'
|
||||
compileSdkVersion 33
|
||||
defaultConfig {
|
||||
applicationId "com.genymobile.scrcpy"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<!-- not a real Android application, it is run by app_process manually -->
|
||||
<manifest package="com.genymobile.scrcpy"/>
|
||||
<manifest />
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.genymobile.scrcpy;
|
||||
|
||||
import com.genymobile.scrcpy.wrappers.ServiceManager;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
import android.media.AudioFormat;
|
||||
import android.media.AudioRecord;
|
||||
import android.media.AudioTimestamp;
|
||||
@@ -12,6 +16,7 @@ import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.Looper;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
@@ -40,10 +45,13 @@ public final class AudioEncoder {
|
||||
}
|
||||
|
||||
private static final int SAMPLE_RATE = 48000;
|
||||
private static final int CHANNEL_CONFIG = AudioFormat.CHANNEL_IN_STEREO;
|
||||
private static final int CHANNELS = 2;
|
||||
private static final int FORMAT = AudioFormat.ENCODING_PCM_16BIT;
|
||||
private static final int BYTES_PER_SAMPLE = 2;
|
||||
|
||||
private static final int BUFFER_MS = 10; // milliseconds
|
||||
private static final int BUFFER_SIZE = SAMPLE_RATE * CHANNELS * BUFFER_MS / 1000;
|
||||
private static final int BUFFER_MS = 5; // milliseconds
|
||||
private static final int BUFFER_SIZE = SAMPLE_RATE * CHANNELS * BYTES_PER_SAMPLE * BUFFER_MS / 1000;
|
||||
|
||||
private final Streamer streamer;
|
||||
private final int bitRate;
|
||||
@@ -72,9 +80,9 @@ public final class AudioEncoder {
|
||||
|
||||
private static AudioFormat createAudioFormat() {
|
||||
AudioFormat.Builder builder = new AudioFormat.Builder();
|
||||
builder.setEncoding(AudioFormat.ENCODING_PCM_16BIT);
|
||||
builder.setEncoding(FORMAT);
|
||||
builder.setSampleRate(SAMPLE_RATE);
|
||||
builder.setChannelMask(CHANNELS == 2 ? AudioFormat.CHANNEL_IN_STEREO : AudioFormat.CHANNEL_IN_MONO);
|
||||
builder.setChannelMask(CHANNEL_CONFIG);
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@@ -88,7 +96,8 @@ public final class AudioEncoder {
|
||||
}
|
||||
builder.setAudioSource(MediaRecorder.AudioSource.REMOTE_SUBMIX);
|
||||
builder.setAudioFormat(createAudioFormat());
|
||||
builder.setBufferSizeInBytes(1024 * 1024);
|
||||
int minBufferSize = AudioRecord.getMinBufferSize(SAMPLE_RATE, CHANNEL_CONFIG, FORMAT);
|
||||
builder.setBufferSizeInBytes(minBufferSize);
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@@ -211,6 +220,32 @@ public final class AudioEncoder {
|
||||
}
|
||||
}
|
||||
|
||||
private static void startWorkaroundAndroid11() {
|
||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
|
||||
// Android 11 requires Apps to be at foreground to record audio.
|
||||
// Normally, each App has its own user ID, so Android checks whether the requesting App has the user ID that's at the foreground.
|
||||
// But Scrcpy server is NOT an App, it's a Java application started from Android shell, so it has the same user ID (2000) with Android
|
||||
// shell ("com.android.shell").
|
||||
// If there is an Activity from Android shell running at foreground, then the permission system will believe Scrcpy is also in the
|
||||
// foreground.
|
||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
intent.setComponent(new ComponentName(FakeContext.PACKAGE_NAME, "com.android.shell.HeapDumpActivity"));
|
||||
ServiceManager.getActivityManager().startActivityAsUserWithFeature(intent);
|
||||
// Wait for activity to start
|
||||
SystemClock.sleep(150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void stopWorkaroundAndroid11() {
|
||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
|
||||
ServiceManager.getActivityManager().forceStopPackage(FakeContext.PACKAGE_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
public void encode() throws IOException {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
|
||||
@@ -228,7 +263,6 @@ public final class AudioEncoder {
|
||||
try {
|
||||
Codec codec = streamer.getCodec();
|
||||
mediaCodec = createMediaCodec(codec, encoderName);
|
||||
recorder = createAudioRecord();
|
||||
|
||||
mediaCodecThread = new HandlerThread("AudioEncoder");
|
||||
mediaCodecThread.start();
|
||||
@@ -237,7 +271,19 @@ public final class AudioEncoder {
|
||||
mediaCodec.setCallback(new EncoderCallback(), new Handler(mediaCodecThread.getLooper()));
|
||||
mediaCodec.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
|
||||
|
||||
recorder.startRecording();
|
||||
startWorkaroundAndroid11();
|
||||
try {
|
||||
recorder = createAudioRecord();
|
||||
recorder.startRecording();
|
||||
} catch (UnsupportedOperationException e) {
|
||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
|
||||
Ln.e("Failed to start audio capture");
|
||||
Ln.e("On Android 11, it is only possible to capture in foreground, make sure that the device is unlocked when starting scrcpy.");
|
||||
throw new ConfigurationException("Unsupported audio capture");
|
||||
}
|
||||
} finally {
|
||||
stopWorkaroundAndroid11();
|
||||
}
|
||||
recorderStarted = true;
|
||||
|
||||
final MediaCodec mediaCodecRef = mediaCodec;
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.os.Process;
|
||||
public final class FakeContext extends ContextWrapper {
|
||||
|
||||
public static final String PACKAGE_NAME = "com.android.shell";
|
||||
public static final int ROOT_UID = 0; // Like android.os.Process.ROOT_UID, but before API 29
|
||||
|
||||
private static final FakeContext INSTANCE = new FakeContext();
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.genymobile.scrcpy;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.media.MediaFormat;
|
||||
|
||||
public enum VideoCodec implements Codec {
|
||||
H264(0x68_32_36_34, "h264", MediaFormat.MIMETYPE_VIDEO_AVC),
|
||||
H265(0x68_32_36_35, "h265", MediaFormat.MIMETYPE_VIDEO_HEVC),
|
||||
@SuppressLint("InlinedApi") // introduced in API 21
|
||||
AV1(0x00_61_76_31, "av1", MediaFormat.MIMETYPE_VIDEO_AV1);
|
||||
|
||||
private final int id; // 4-byte ASCII representation of the name
|
||||
|
||||
@@ -1,22 +1,30 @@
|
||||
package com.genymobile.scrcpy.wrappers;
|
||||
|
||||
import com.genymobile.scrcpy.FakeContext;
|
||||
import com.genymobile.scrcpy.Ln;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Intent;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
import android.os.Process;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@SuppressLint("PrivateApi,DiscouragedPrivateApi")
|
||||
public class ActivityManager {
|
||||
|
||||
private final IInterface manager;
|
||||
private Method getContentProviderExternalMethod;
|
||||
private boolean getContentProviderExternalMethodNewVersion = true;
|
||||
private Method removeContentProviderExternalMethod;
|
||||
private Method startActivityAsUserWithFeatureMethod;
|
||||
private Method forceStopPackageMethod;
|
||||
|
||||
public ActivityManager(IInterface manager) {
|
||||
this.manager = manager;
|
||||
@@ -43,16 +51,17 @@ public class ActivityManager {
|
||||
return removeContentProviderExternalMethod;
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.Q)
|
||||
private ContentProvider getContentProviderExternal(String name, IBinder token) {
|
||||
try {
|
||||
Method method = getGetContentProviderExternalMethod();
|
||||
Object[] args;
|
||||
if (getContentProviderExternalMethodNewVersion) {
|
||||
// new version
|
||||
args = new Object[]{name, Process.ROOT_UID, token, null};
|
||||
args = new Object[]{name, FakeContext.ROOT_UID, token, null};
|
||||
} else {
|
||||
// old version
|
||||
args = new Object[]{name, Process.ROOT_UID, token};
|
||||
args = new Object[]{name, FakeContext.ROOT_UID, token};
|
||||
}
|
||||
// ContentProviderHolder providerHolder = getContentProviderExternal(...);
|
||||
Object providerHolder = method.invoke(manager, args);
|
||||
@@ -85,4 +94,55 @@ public class ActivityManager {
|
||||
public ContentProvider createSettingsProvider() {
|
||||
return getContentProviderExternal("settings", new Binder());
|
||||
}
|
||||
|
||||
private Method getStartActivityAsUserWithFeatureMethod() throws NoSuchMethodException, ClassNotFoundException {
|
||||
if (startActivityAsUserWithFeatureMethod == null) {
|
||||
Class<?> iApplicationThreadClass = Class.forName("android.app.IApplicationThread");
|
||||
Class<?> profilerInfo = Class.forName("android.app.ProfilerInfo");
|
||||
startActivityAsUserWithFeatureMethod = manager.getClass()
|
||||
.getMethod("startActivityAsUserWithFeature", iApplicationThreadClass, String.class, String.class, Intent.class, String.class,
|
||||
IBinder.class, String.class, int.class, int.class, profilerInfo, Bundle.class, int.class);
|
||||
}
|
||||
return startActivityAsUserWithFeatureMethod;
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
public int startActivityAsUserWithFeature(Intent intent) {
|
||||
try {
|
||||
Method method = getStartActivityAsUserWithFeatureMethod();
|
||||
return (int) method.invoke(
|
||||
/* this */ manager,
|
||||
/* caller */ null,
|
||||
/* callingPackage */ FakeContext.PACKAGE_NAME,
|
||||
/* callingFeatureId */ null,
|
||||
/* intent */ intent,
|
||||
/* resolvedType */ null,
|
||||
/* resultTo */ null,
|
||||
/* resultWho */ null,
|
||||
/* requestCode */ 0,
|
||||
/* startFlags */ 0,
|
||||
/* profilerInfo */ null,
|
||||
/* bOptions */ null,
|
||||
/* userId */ /* UserHandle.USER_CURRENT */ -2);
|
||||
} catch (Throwable e) {
|
||||
Ln.e("Could not invoke method", e);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private Method getForceStopPackageMethod() throws NoSuchMethodException {
|
||||
if (forceStopPackageMethod == null) {
|
||||
forceStopPackageMethod = manager.getClass().getMethod("forceStopPackage", String.class, int.class);
|
||||
}
|
||||
return forceStopPackageMethod;
|
||||
}
|
||||
|
||||
public void forceStopPackage(String packageName) {
|
||||
try {
|
||||
Method method = getForceStopPackageMethod();
|
||||
method.invoke(manager, packageName, /* userId */ /* UserHandle.USER_CURRENT */ -2);
|
||||
} catch (Throwable e) {
|
||||
Ln.e("Could not invoke method", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.content.ClipData;
|
||||
import android.content.IOnPrimaryClipChangedListener;
|
||||
import android.os.Build;
|
||||
import android.os.IInterface;
|
||||
import android.os.Process;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -63,9 +62,9 @@ public class ClipboardManager {
|
||||
return (ClipData) method.invoke(manager, FakeContext.PACKAGE_NAME);
|
||||
}
|
||||
if (alternativeMethod) {
|
||||
return (ClipData) method.invoke(manager, FakeContext.PACKAGE_NAME, null, Process.ROOT_UID);
|
||||
return (ClipData) method.invoke(manager, FakeContext.PACKAGE_NAME, null, FakeContext.ROOT_UID);
|
||||
}
|
||||
return (ClipData) method.invoke(manager, FakeContext.PACKAGE_NAME, Process.ROOT_UID);
|
||||
return (ClipData) method.invoke(manager, FakeContext.PACKAGE_NAME, FakeContext.ROOT_UID);
|
||||
}
|
||||
|
||||
private static void setPrimaryClip(Method method, boolean alternativeMethod, IInterface manager, ClipData clipData)
|
||||
@@ -73,9 +72,9 @@ public class ClipboardManager {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
method.invoke(manager, clipData, FakeContext.PACKAGE_NAME);
|
||||
} else if (alternativeMethod) {
|
||||
method.invoke(manager, clipData, FakeContext.PACKAGE_NAME, null, Process.ROOT_UID);
|
||||
method.invoke(manager, clipData, FakeContext.PACKAGE_NAME, null, FakeContext.ROOT_UID);
|
||||
} else {
|
||||
method.invoke(manager, clipData, FakeContext.PACKAGE_NAME, Process.ROOT_UID);
|
||||
method.invoke(manager, clipData, FakeContext.PACKAGE_NAME, FakeContext.ROOT_UID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,9 +109,9 @@ public class ClipboardManager {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
method.invoke(manager, listener, FakeContext.PACKAGE_NAME);
|
||||
} else if (alternativeMethod) {
|
||||
method.invoke(manager, listener, FakeContext.PACKAGE_NAME, null, Process.ROOT_UID);
|
||||
method.invoke(manager, listener, FakeContext.PACKAGE_NAME, null, FakeContext.ROOT_UID);
|
||||
} else {
|
||||
method.invoke(manager, listener, FakeContext.PACKAGE_NAME, Process.ROOT_UID);
|
||||
method.invoke(manager, listener, FakeContext.PACKAGE_NAME, FakeContext.ROOT_UID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import android.content.AttributionSource;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.Process;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -139,7 +138,7 @@ public class ContentProvider implements Closeable {
|
||||
public String getValue(String table, String key) throws SettingsException {
|
||||
String method = getGetMethod(table);
|
||||
Bundle arg = new Bundle();
|
||||
arg.putInt(CALL_METHOD_USER_KEY, Process.ROOT_UID);
|
||||
arg.putInt(CALL_METHOD_USER_KEY, FakeContext.ROOT_UID);
|
||||
try {
|
||||
Bundle bundle = call(method, key, arg);
|
||||
if (bundle == null) {
|
||||
@@ -155,7 +154,7 @@ public class ContentProvider implements Closeable {
|
||||
public void putValue(String table, String key, String value) throws SettingsException {
|
||||
String method = getPutMethod(table);
|
||||
Bundle arg = new Bundle();
|
||||
arg.putInt(CALL_METHOD_USER_KEY, Process.ROOT_UID);
|
||||
arg.putInt(CALL_METHOD_USER_KEY, FakeContext.ROOT_UID);
|
||||
arg.putString(NAME_VALUE_TABLE_VALUE, value);
|
||||
try {
|
||||
call(method, key, arg);
|
||||
|
||||
BIN
u/.ninja_deps
BIN
u/.ninja_deps
Binary file not shown.
62
u/.ninja_log
62
u/.ninja_log
@@ -1,62 +0,0 @@
|
||||
# ninja log v5
|
||||
0 243 1542027815 build.ninja ef03cd8523486e97
|
||||
0 58 1542027815 app/app@@scrcpy@exe/src_str_util.c.o 2aa692e7aa83914
|
||||
0 87 1542027815 app/app@@scrcpy@exe/src_sys_unix_net.c.o 7ea14bd07e90ff97
|
||||
0 91 1542027815 app/app@@scrcpy@exe/src_sys_unix_command.c.o dd44ba15cc3d6a7e
|
||||
1 113 1542027815 app/app@@scrcpy@exe/src_command.c.o 1eaa0f061a5c0447
|
||||
0 114 1542027815 app/app@@scrcpy@exe/src_server.c.o 8b376071b5e0aaf1
|
||||
1 117 1542027815 app/app@@scrcpy@exe/src_controller.c.o 907de440054c77e7
|
||||
1 146 1542027815 app/app@@scrcpy@exe/src_control_event.c.o fcfa5a6c322ebf8b
|
||||
91 202 1542027815 app/app@@scrcpy@exe/src_device.c.o 9ac9441f4f2e4d54
|
||||
58 215 1542027815 app/app@@scrcpy@exe/src_convert.c.o 9de268e9b915094e
|
||||
115 219 1542027815 app/app@@scrcpy@exe/src_fps_counter.c.o 22b968c51acd256b
|
||||
114 235 1542027815 app/app@@scrcpy@exe/src_file_handler.c.o 11e303a26f189d9a
|
||||
117 286 1542027815 app/app@@scrcpy@exe/src_frames.c.o 3c5c4dbee035e5ab
|
||||
88 319 1542027815 app/app@@scrcpy@exe/src_decoder.c.o 60c1438cf7786895
|
||||
202 338 1542027815 app/app@@scrcpy@exe/src_lock_util.c.o 9265bcc92f144427
|
||||
215 367 1542027815 app/app@@scrcpy@exe/src_net.c.o 718f65aa73583163
|
||||
220 408 1542027815 app/app@@scrcpy@exe/src_recorder.c.o 676a7500fb0d45cb
|
||||
1 470 1542027815 app/app@@scrcpy@exe/src_tiny_xpm.c.o 91851ad29940a4b1
|
||||
286 485 1542027815 app/app@@test_control_event_queue@exe/tests_test_control_event_queue.c.o 46bff52a98c0b5ca
|
||||
319 487 1542027815 app/app@@test_control_event_queue@exe/src_control_event.c.o 76492af89a914173
|
||||
1 488 1542027815 app/app@@scrcpy@exe/src_main.c.o e7dc8583797471c5
|
||||
367 488 1542027815 app/app@@test_control_event_serialize@exe/src_control_event.c.o fcff2e1105474edf
|
||||
0 497 1542027815 app/app@@scrcpy@exe/src_screen.c.o 329c18ec2111c8ff
|
||||
408 515 1542027815 app/app@@test_strutil@exe/tests_test_strutil.c.o 15440f4bca20c50d
|
||||
338 517 1542027815 app/app@@test_control_event_serialize@exe/tests_test_control_event_serialize.c.o baa0b48891372fcc
|
||||
470 525 1542027815 app/app@@test_strutil@exe/src_str_util.c.o fcb3a91d36e23e11
|
||||
525 561 1542027815 app/test_strutil 3448478dadf99adf
|
||||
487 582 1542027815 app/test_control_event_queue bfca00bc894d3c4f
|
||||
517 606 1542027815 app/test_control_event_serialize e06ab4ce04dd4fad
|
||||
147 638 1542027815 app/app@@scrcpy@exe/src_input_manager.c.o 1fe285b256bf5908
|
||||
236 713 1542027815 app/app@@scrcpy@exe/src_scrcpy.c.o 8b0bae90b272da98
|
||||
713 891 1542027816 app/scrcpy 8fba96817bb2802c
|
||||
485 5716 1542027820 server/scrcpy-server.jar 8511d30842df298f
|
||||
0 264 1542027826 build.ninja ef03cd8523486e97
|
||||
1 31 1542027826 app/app@@scrcpy@exe/src_fps_counter.c.o 22b968c51acd256b
|
||||
1 44 1542027826 app/app@@scrcpy@exe/src_file_handler.c.o 11e303a26f189d9a
|
||||
1 47 1542027826 app/app@@scrcpy@exe/src_controller.c.o 907de440054c77e7
|
||||
2 50 1542027826 app/app@@scrcpy@exe/src_frames.c.o 3c5c4dbee035e5ab
|
||||
2 50 1542027826 app/app@@scrcpy@exe/src_recorder.c.o 676a7500fb0d45cb
|
||||
1 65 1542027826 app/app@@scrcpy@exe/src_decoder.c.o 60c1438cf7786895
|
||||
31 82 1542027826 app/app@@scrcpy@exe/src_server.c.o 8b376071b5e0aaf1
|
||||
2 108 1542027826 app/app@@scrcpy@exe/src_input_manager.c.o 1fe285b256bf5908
|
||||
2 129 1542027826 app/app@@scrcpy@exe/src_screen.c.o 329c18ec2111c8ff
|
||||
2 162 1542027826 app/app@@scrcpy@exe/src_scrcpy.c.o 8b0bae90b272da98
|
||||
1 339 1542027826 app/app@@scrcpy@exe/src_main.c.o e7dc8583797471c5
|
||||
339 538 1542027827 app/scrcpy 8fba96817bb2802c
|
||||
44 753 1542027827 server/scrcpy-server.jar 8511d30842df298f
|
||||
0 276 1542027871 build.ninja ef03cd8523486e97
|
||||
1 37 1542027872 app/app@@scrcpy@exe/src_file_handler.c.o 11e303a26f189d9a
|
||||
1 42 1542027872 app/app@@scrcpy@exe/src_controller.c.o 907de440054c77e7
|
||||
1 45 1542027872 app/app@@scrcpy@exe/src_fps_counter.c.o 22b968c51acd256b
|
||||
2 49 1542027872 app/app@@scrcpy@exe/src_recorder.c.o 676a7500fb0d45cb
|
||||
1 52 1542027872 app/app@@scrcpy@exe/src_frames.c.o 3c5c4dbee035e5ab
|
||||
0 64 1542027872 app/app@@scrcpy@exe/src_decoder.c.o 60c1438cf7786895
|
||||
37 80 1542027872 app/app@@scrcpy@exe/src_server.c.o 8b376071b5e0aaf1
|
||||
1 128 1542027872 app/app@@scrcpy@exe/src_input_manager.c.o 1fe285b256bf5908
|
||||
2 138 1542027872 app/app@@scrcpy@exe/src_screen.c.o 329c18ec2111c8ff
|
||||
2 150 1542027872 app/app@@scrcpy@exe/src_scrcpy.c.o 8b0bae90b272da98
|
||||
1 370 1542027872 app/app@@scrcpy@exe/src_main.c.o e7dc8583797471c5
|
||||
370 578 1542027872 app/scrcpy 8fba96817bb2802c
|
||||
42 688 1542027872 server/scrcpy-server.jar 8511d30842df298f
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Autogenerated by the Meson build system.
|
||||
* Do not edit, your changes will be lost.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define BUILD_DEBUG
|
||||
|
||||
#define DEFAULT_BIT_RATE 8000000
|
||||
|
||||
#define DEFAULT_LOCAL_PORT 27183
|
||||
|
||||
#define DEFAULT_MAX_SIZE 0
|
||||
|
||||
#define HIDPI_SUPPORT
|
||||
|
||||
#undef OVERRIDE_SERVER_PATH
|
||||
|
||||
#define PREFIX "/usr/local"
|
||||
|
||||
#define PREFIXED_SERVER_PATH "/share/scrcpy/scrcpy-server.jar"
|
||||
|
||||
#define SCRCPY_VERSION "1.6"
|
||||
|
||||
#define SKIP_FRAMES
|
||||
|
||||
#undef WINDOWS_NOCONSOLE
|
||||
|
||||
BIN
u/app/scrcpy
BIN
u/app/scrcpy
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
263
u/build.ninja
263
u/build.ninja
@@ -1,263 +0,0 @@
|
||||
# This is the build file for project "scrcpy"
|
||||
# It is autogenerated by the Meson build system.
|
||||
# Do not edit by hand.
|
||||
|
||||
ninja_required_version = 1.5.1
|
||||
|
||||
# Rules for compiling.
|
||||
|
||||
rule c_COMPILER
|
||||
command = ccache cc $ARGS -MD -MQ $out -MF '$DEPFILE' -o $out -c $in
|
||||
deps = gcc
|
||||
depfile = $DEPFILE
|
||||
description = Compiling C object $out.
|
||||
|
||||
rule c_PCH
|
||||
command = ccache cc $ARGS -MD -MQ $out -MF '$DEPFILE' -o $out -c $in
|
||||
deps = gcc
|
||||
depfile = $DEPFILE
|
||||
description = Precompiling header $in.
|
||||
|
||||
|
||||
# Rules for linking.
|
||||
|
||||
rule STATIC_LINKER
|
||||
command = rm -f $out && gcc-ar $LINK_ARGS $out $in
|
||||
description = Linking static target $out.
|
||||
|
||||
rule c_LINKER
|
||||
command = ccache cc $ARGS -o $out $in $LINK_ARGS $aliasing
|
||||
description = Linking target $out.
|
||||
|
||||
|
||||
rule SHSYM
|
||||
command = /usr/bin/meson --internal symbolextractor $in $out $CROSS
|
||||
restat = 1
|
||||
description = Generating symbol file $out.
|
||||
|
||||
# Other rules
|
||||
|
||||
rule CUSTOM_COMMAND
|
||||
command = $COMMAND
|
||||
description = $DESC
|
||||
restat = 1
|
||||
|
||||
rule CUSTOM_COMMAND_DEP
|
||||
command = $COMMAND
|
||||
description = $DESC
|
||||
deps = gcc
|
||||
depfile = $DEPFILE
|
||||
restat = 1
|
||||
|
||||
rule REGENERATE_BUILD
|
||||
command = /usr/bin/meson --internal regenerate /home/rom/projects/scrcpy /home/rom/projects/scrcpy/u --backend ninja
|
||||
description = Regenerating build files.
|
||||
generator = 1
|
||||
|
||||
|
||||
# Phony build target, always out of date
|
||||
build PHONY: phony
|
||||
|
||||
# Build rules for targets
|
||||
|
||||
build app/app@@scrcpy@exe/src_main.c.o: c_COMPILER ../app/src/main.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_main.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_command.c.o: c_COMPILER ../app/src/command.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_command.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_control_event.c.o: c_COMPILER ../app/src/control_event.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_control_event.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_controller.c.o: c_COMPILER ../app/src/controller.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_controller.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_convert.c.o: c_COMPILER ../app/src/convert.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_convert.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_decoder.c.o: c_COMPILER ../app/src/decoder.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_decoder.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_device.c.o: c_COMPILER ../app/src/device.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_device.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_file_handler.c.o: c_COMPILER ../app/src/file_handler.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_file_handler.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_fps_counter.c.o: c_COMPILER ../app/src/fps_counter.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_fps_counter.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_frames.c.o: c_COMPILER ../app/src/frames.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_frames.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_input_manager.c.o: c_COMPILER ../app/src/input_manager.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_input_manager.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_lock_util.c.o: c_COMPILER ../app/src/lock_util.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_lock_util.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_net.c.o: c_COMPILER ../app/src/net.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_net.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_recorder.c.o: c_COMPILER ../app/src/recorder.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_recorder.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_scrcpy.c.o: c_COMPILER ../app/src/scrcpy.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_scrcpy.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_screen.c.o: c_COMPILER ../app/src/screen.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_screen.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_server.c.o: c_COMPILER ../app/src/server.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_server.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_str_util.c.o: c_COMPILER ../app/src/str_util.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_str_util.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_tiny_xpm.c.o: c_COMPILER ../app/src/tiny_xpm.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_tiny_xpm.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_sys_unix_command.c.o: c_COMPILER ../app/src/sys/unix/command.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_sys_unix_command.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@scrcpy@exe/src_sys_unix_net.c.o: c_COMPILER ../app/src/sys/unix/net.c
|
||||
DEPFILE = app/app@@scrcpy@exe/src_sys_unix_net.c.o.d
|
||||
ARGS = -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/scrcpy: c_LINKER app/app@@scrcpy@exe/src_main.c.o app/app@@scrcpy@exe/src_command.c.o app/app@@scrcpy@exe/src_control_event.c.o app/app@@scrcpy@exe/src_controller.c.o app/app@@scrcpy@exe/src_convert.c.o app/app@@scrcpy@exe/src_decoder.c.o app/app@@scrcpy@exe/src_device.c.o app/app@@scrcpy@exe/src_file_handler.c.o app/app@@scrcpy@exe/src_fps_counter.c.o app/app@@scrcpy@exe/src_frames.c.o app/app@@scrcpy@exe/src_input_manager.c.o app/app@@scrcpy@exe/src_lock_util.c.o app/app@@scrcpy@exe/src_net.c.o app/app@@scrcpy@exe/src_recorder.c.o app/app@@scrcpy@exe/src_scrcpy.c.o app/app@@scrcpy@exe/src_screen.c.o app/app@@scrcpy@exe/src_server.c.o app/app@@scrcpy@exe/src_str_util.c.o app/app@@scrcpy@exe/src_tiny_xpm.c.o app/app@@scrcpy@exe/src_sys_unix_command.c.o app/app@@scrcpy@exe/src_sys_unix_net.c.o | /usr/lib/x86_64-linux-gnu/libavformat.so /usr/lib/x86_64-linux-gnu/libavcodec.so /usr/lib/x86_64-linux-gnu/libavutil.so /usr/lib/x86_64-linux-gnu/libSDL2.so
|
||||
LINK_ARGS = -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group /usr/lib/x86_64-linux-gnu/libavformat.so /usr/lib/x86_64-linux-gnu/libavcodec.so /usr/lib/x86_64-linux-gnu/libavutil.so /usr/lib/x86_64-linux-gnu/libSDL2.so -Wl,--end-group
|
||||
|
||||
build app/app@@test_control_event_queue@exe/tests_test_control_event_queue.c.o: c_COMPILER ../app/tests/test_control_event_queue.c
|
||||
DEPFILE = app/app@@test_control_event_queue@exe/tests_test_control_event_queue.c.o.d
|
||||
ARGS = -Iapp/app@@test_control_event_queue@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@test_control_event_queue@exe/src_control_event.c.o: c_COMPILER ../app/src/control_event.c
|
||||
DEPFILE = app/app@@test_control_event_queue@exe/src_control_event.c.o.d
|
||||
ARGS = -Iapp/app@@test_control_event_queue@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/test_control_event_queue: c_LINKER app/app@@test_control_event_queue@exe/tests_test_control_event_queue.c.o app/app@@test_control_event_queue@exe/src_control_event.c.o | /usr/lib/x86_64-linux-gnu/libavformat.so /usr/lib/x86_64-linux-gnu/libavcodec.so /usr/lib/x86_64-linux-gnu/libavutil.so /usr/lib/x86_64-linux-gnu/libSDL2.so
|
||||
LINK_ARGS = -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group /usr/lib/x86_64-linux-gnu/libavformat.so /usr/lib/x86_64-linux-gnu/libavcodec.so /usr/lib/x86_64-linux-gnu/libavutil.so /usr/lib/x86_64-linux-gnu/libSDL2.so -Wl,--end-group
|
||||
|
||||
build app/app@@test_control_event_serialize@exe/tests_test_control_event_serialize.c.o: c_COMPILER ../app/tests/test_control_event_serialize.c
|
||||
DEPFILE = app/app@@test_control_event_serialize@exe/tests_test_control_event_serialize.c.o.d
|
||||
ARGS = -Iapp/app@@test_control_event_serialize@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@test_control_event_serialize@exe/src_control_event.c.o: c_COMPILER ../app/src/control_event.c
|
||||
DEPFILE = app/app@@test_control_event_serialize@exe/src_control_event.c.o.d
|
||||
ARGS = -Iapp/app@@test_control_event_serialize@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/test_control_event_serialize: c_LINKER app/app@@test_control_event_serialize@exe/tests_test_control_event_serialize.c.o app/app@@test_control_event_serialize@exe/src_control_event.c.o | /usr/lib/x86_64-linux-gnu/libavformat.so /usr/lib/x86_64-linux-gnu/libavcodec.so /usr/lib/x86_64-linux-gnu/libavutil.so /usr/lib/x86_64-linux-gnu/libSDL2.so
|
||||
LINK_ARGS = -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group /usr/lib/x86_64-linux-gnu/libavformat.so /usr/lib/x86_64-linux-gnu/libavcodec.so /usr/lib/x86_64-linux-gnu/libavutil.so /usr/lib/x86_64-linux-gnu/libSDL2.so -Wl,--end-group
|
||||
|
||||
build app/app@@test_strutil@exe/tests_test_strutil.c.o: c_COMPILER ../app/tests/test_strutil.c
|
||||
DEPFILE = app/app@@test_strutil@exe/tests_test_strutil.c.o.d
|
||||
ARGS = -Iapp/app@@test_strutil@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/app@@test_strutil@exe/src_str_util.c.o: c_COMPILER ../app/src/str_util.c
|
||||
DEPFILE = app/app@@test_strutil@exe/src_str_util.c.o.d
|
||||
ARGS = -Iapp/app@@test_strutil@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT
|
||||
|
||||
build app/test_strutil: c_LINKER app/app@@test_strutil@exe/tests_test_strutil.c.o app/app@@test_strutil@exe/src_str_util.c.o | /usr/lib/x86_64-linux-gnu/libavformat.so /usr/lib/x86_64-linux-gnu/libavcodec.so /usr/lib/x86_64-linux-gnu/libavutil.so /usr/lib/x86_64-linux-gnu/libSDL2.so
|
||||
LINK_ARGS = -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group /usr/lib/x86_64-linux-gnu/libavformat.so /usr/lib/x86_64-linux-gnu/libavcodec.so /usr/lib/x86_64-linux-gnu/libavutil.so /usr/lib/x86_64-linux-gnu/libSDL2.so -Wl,--end-group
|
||||
|
||||
build server/scrcpy-server.jar: CUSTOM_COMMAND ../server/. | /home/rom/projects/scrcpy/server/./scripts/build-wrapper.sh PHONY
|
||||
COMMAND = /home/rom/projects/scrcpy/server/./scripts/build-wrapper.sh ../server/. server/scrcpy-server.jar debug
|
||||
description = Generating$ scrcpy-server$ with$ a$ custom$ command.
|
||||
|
||||
build meson-run: CUSTOM_COMMAND
|
||||
COMMAND = /usr/bin/meson --internal commandrunner /home/rom/projects/scrcpy /home/rom/projects/scrcpy/u '' /usr/bin/meson scripts/run-scrcpy.sh
|
||||
description = Running$ external$ command$ run.
|
||||
pool = console
|
||||
|
||||
build run: phony meson-run
|
||||
|
||||
# Test rules
|
||||
|
||||
build meson-test: CUSTOM_COMMAND all PHONY
|
||||
COMMAND = /usr/bin/meson test --no-rebuild --print-errorlogs
|
||||
DESC = Running$ all$ tests.
|
||||
pool = console
|
||||
|
||||
build test: phony meson-test
|
||||
|
||||
build meson-benchmark: CUSTOM_COMMAND all PHONY
|
||||
COMMAND = /usr/bin/meson test --benchmark --logbase benchmarklog --num-processes=1 --no-rebuild
|
||||
DESC = Running$ benchmark$ suite.
|
||||
pool = console
|
||||
|
||||
build benchmark: phony meson-benchmark
|
||||
|
||||
# Install rules
|
||||
|
||||
build meson-install: CUSTOM_COMMAND PHONY | all
|
||||
DESC = Installing$ files.
|
||||
COMMAND = /usr/bin/meson install --no-rebuild
|
||||
pool = console
|
||||
|
||||
build install: phony meson-install
|
||||
|
||||
build meson-dist: CUSTOM_COMMAND PHONY
|
||||
DESC = Creating$ source$ packages
|
||||
COMMAND = /usr/bin/meson --internal dist /home/rom/projects/scrcpy /home/rom/projects/scrcpy/u /usr/bin/meson
|
||||
pool = console
|
||||
|
||||
build dist: phony meson-dist
|
||||
|
||||
# Suffix
|
||||
|
||||
build meson-scan-build: CUSTOM_COMMAND PHONY
|
||||
COMMAND = /usr/bin/meson --internal scanbuild /home/rom/projects/scrcpy /home/rom/projects/scrcpy/u /usr/bin/meson -Dbuild_app=true -Dbuild_server=true -Dcrossbuild_windows=false -Dhidpi_support=true -Doverride_server_path= -Dprebuilt_server= -Dskip_frames=true -Dwindows_noconsole=false
|
||||
pool = console
|
||||
|
||||
build scan-build: phony meson-scan-build
|
||||
|
||||
build meson-uninstall: CUSTOM_COMMAND PHONY
|
||||
COMMAND = /usr/bin/meson --internal uninstall
|
||||
pool = console
|
||||
|
||||
build uninstall: phony meson-uninstall
|
||||
|
||||
build all: phony app/scrcpy app/test_control_event_queue app/test_control_event_serialize app/test_strutil server/scrcpy-server.jar
|
||||
|
||||
default all
|
||||
|
||||
build clean: phony meson-clean
|
||||
|
||||
build meson-clean-ctlist: CUSTOM_COMMAND PHONY
|
||||
COMMAND = /usr/bin/meson --internal cleantrees /home/rom/projects/scrcpy/u/meson-private/cleantrees.dat
|
||||
description = Cleaning$ custom$ target$ directories.
|
||||
|
||||
build clean-ctlist: phony meson-clean-ctlist
|
||||
|
||||
build meson-clean: CUSTOM_COMMAND PHONY | clean-ctlist
|
||||
COMMAND = ninja -t clean
|
||||
description = Cleaning.
|
||||
|
||||
build build.ninja: REGENERATE_BUILD ../meson.build ../app/meson.build ../server/meson.build meson-private/coredata.dat ../meson_options.txt
|
||||
pool = console
|
||||
|
||||
build reconfigure: REGENERATE_BUILD PHONY
|
||||
pool = console
|
||||
|
||||
build ../meson.build ../app/meson.build ../server/meson.build meson-private/coredata.dat ../meson_options.txt: phony
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
[
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_main.c.o' -MF 'app/app@@scrcpy@exe/src_main.c.o.d' -o 'app/app@@scrcpy@exe/src_main.c.o' -c ../app/src/main.c",
|
||||
"file": "../app/src/main.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_command.c.o' -MF 'app/app@@scrcpy@exe/src_command.c.o.d' -o 'app/app@@scrcpy@exe/src_command.c.o' -c ../app/src/command.c",
|
||||
"file": "../app/src/command.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_control_event.c.o' -MF 'app/app@@scrcpy@exe/src_control_event.c.o.d' -o 'app/app@@scrcpy@exe/src_control_event.c.o' -c ../app/src/control_event.c",
|
||||
"file": "../app/src/control_event.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_controller.c.o' -MF 'app/app@@scrcpy@exe/src_controller.c.o.d' -o 'app/app@@scrcpy@exe/src_controller.c.o' -c ../app/src/controller.c",
|
||||
"file": "../app/src/controller.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_convert.c.o' -MF 'app/app@@scrcpy@exe/src_convert.c.o.d' -o 'app/app@@scrcpy@exe/src_convert.c.o' -c ../app/src/convert.c",
|
||||
"file": "../app/src/convert.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_decoder.c.o' -MF 'app/app@@scrcpy@exe/src_decoder.c.o.d' -o 'app/app@@scrcpy@exe/src_decoder.c.o' -c ../app/src/decoder.c",
|
||||
"file": "../app/src/decoder.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_device.c.o' -MF 'app/app@@scrcpy@exe/src_device.c.o.d' -o 'app/app@@scrcpy@exe/src_device.c.o' -c ../app/src/device.c",
|
||||
"file": "../app/src/device.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_file_handler.c.o' -MF 'app/app@@scrcpy@exe/src_file_handler.c.o.d' -o 'app/app@@scrcpy@exe/src_file_handler.c.o' -c ../app/src/file_handler.c",
|
||||
"file": "../app/src/file_handler.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_fps_counter.c.o' -MF 'app/app@@scrcpy@exe/src_fps_counter.c.o.d' -o 'app/app@@scrcpy@exe/src_fps_counter.c.o' -c ../app/src/fps_counter.c",
|
||||
"file": "../app/src/fps_counter.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_frames.c.o' -MF 'app/app@@scrcpy@exe/src_frames.c.o.d' -o 'app/app@@scrcpy@exe/src_frames.c.o' -c ../app/src/frames.c",
|
||||
"file": "../app/src/frames.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_input_manager.c.o' -MF 'app/app@@scrcpy@exe/src_input_manager.c.o.d' -o 'app/app@@scrcpy@exe/src_input_manager.c.o' -c ../app/src/input_manager.c",
|
||||
"file": "../app/src/input_manager.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_lock_util.c.o' -MF 'app/app@@scrcpy@exe/src_lock_util.c.o.d' -o 'app/app@@scrcpy@exe/src_lock_util.c.o' -c ../app/src/lock_util.c",
|
||||
"file": "../app/src/lock_util.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_net.c.o' -MF 'app/app@@scrcpy@exe/src_net.c.o.d' -o 'app/app@@scrcpy@exe/src_net.c.o' -c ../app/src/net.c",
|
||||
"file": "../app/src/net.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_recorder.c.o' -MF 'app/app@@scrcpy@exe/src_recorder.c.o.d' -o 'app/app@@scrcpy@exe/src_recorder.c.o' -c ../app/src/recorder.c",
|
||||
"file": "../app/src/recorder.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_scrcpy.c.o' -MF 'app/app@@scrcpy@exe/src_scrcpy.c.o.d' -o 'app/app@@scrcpy@exe/src_scrcpy.c.o' -c ../app/src/scrcpy.c",
|
||||
"file": "../app/src/scrcpy.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_screen.c.o' -MF 'app/app@@scrcpy@exe/src_screen.c.o.d' -o 'app/app@@scrcpy@exe/src_screen.c.o' -c ../app/src/screen.c",
|
||||
"file": "../app/src/screen.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_server.c.o' -MF 'app/app@@scrcpy@exe/src_server.c.o.d' -o 'app/app@@scrcpy@exe/src_server.c.o' -c ../app/src/server.c",
|
||||
"file": "../app/src/server.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_str_util.c.o' -MF 'app/app@@scrcpy@exe/src_str_util.c.o.d' -o 'app/app@@scrcpy@exe/src_str_util.c.o' -c ../app/src/str_util.c",
|
||||
"file": "../app/src/str_util.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_tiny_xpm.c.o' -MF 'app/app@@scrcpy@exe/src_tiny_xpm.c.o.d' -o 'app/app@@scrcpy@exe/src_tiny_xpm.c.o' -c ../app/src/tiny_xpm.c",
|
||||
"file": "../app/src/tiny_xpm.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_sys_unix_command.c.o' -MF 'app/app@@scrcpy@exe/src_sys_unix_command.c.o.d' -o 'app/app@@scrcpy@exe/src_sys_unix_command.c.o' -c ../app/src/sys/unix/command.c",
|
||||
"file": "../app/src/sys/unix/command.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@scrcpy@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@scrcpy@exe/src_sys_unix_net.c.o' -MF 'app/app@@scrcpy@exe/src_sys_unix_net.c.o.d' -o 'app/app@@scrcpy@exe/src_sys_unix_net.c.o' -c ../app/src/sys/unix/net.c",
|
||||
"file": "../app/src/sys/unix/net.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@test_control_event_queue@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@test_control_event_queue@exe/tests_test_control_event_queue.c.o' -MF 'app/app@@test_control_event_queue@exe/tests_test_control_event_queue.c.o.d' -o 'app/app@@test_control_event_queue@exe/tests_test_control_event_queue.c.o' -c ../app/tests/test_control_event_queue.c",
|
||||
"file": "../app/tests/test_control_event_queue.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@test_control_event_queue@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@test_control_event_queue@exe/src_control_event.c.o' -MF 'app/app@@test_control_event_queue@exe/src_control_event.c.o.d' -o 'app/app@@test_control_event_queue@exe/src_control_event.c.o' -c ../app/src/control_event.c",
|
||||
"file": "../app/src/control_event.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@test_control_event_serialize@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@test_control_event_serialize@exe/tests_test_control_event_serialize.c.o' -MF 'app/app@@test_control_event_serialize@exe/tests_test_control_event_serialize.c.o.d' -o 'app/app@@test_control_event_serialize@exe/tests_test_control_event_serialize.c.o' -c ../app/tests/test_control_event_serialize.c",
|
||||
"file": "../app/tests/test_control_event_serialize.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@test_control_event_serialize@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@test_control_event_serialize@exe/src_control_event.c.o' -MF 'app/app@@test_control_event_serialize@exe/src_control_event.c.o.d' -o 'app/app@@test_control_event_serialize@exe/src_control_event.c.o' -c ../app/src/control_event.c",
|
||||
"file": "../app/src/control_event.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@test_strutil@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@test_strutil@exe/tests_test_strutil.c.o' -MF 'app/app@@test_strutil@exe/tests_test_strutil.c.o.d' -o 'app/app@@test_strutil@exe/tests_test_strutil.c.o' -c ../app/tests/test_strutil.c",
|
||||
"file": "../app/tests/test_strutil.c"
|
||||
},
|
||||
{
|
||||
"directory": "/home/rom/projects/scrcpy/u",
|
||||
"command": "ccache cc -Iapp/app@@test_strutil@exe -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -g -D_REENTRANT -MD -MQ 'app/app@@test_strutil@exe/src_str_util.c.o' -MF 'app/app@@test_strutil@exe/src_str_util.c.o.d' -o 'app/app@@test_strutil@exe/src_str_util.c.o' -c ../app/src/str_util.c",
|
||||
"file": "../app/src/str_util.c"
|
||||
}
|
||||
]
|
||||
@@ -1,38 +0,0 @@
|
||||
Build started at 2018-11-12T14:04:31.900569
|
||||
Main binary: /usr/bin/python3
|
||||
Python system: Linux
|
||||
The Meson build system
|
||||
Version: 0.48.1
|
||||
Source dir: /home/rom/projects/scrcpy
|
||||
Build dir: /home/rom/projects/scrcpy/u
|
||||
Build type: native build
|
||||
Project name: scrcpy
|
||||
Project version: 1.6
|
||||
Native C compiler: ccache cc (gcc 8.2.0 "cc (Debian 8.2.0-9) 8.2.0")
|
||||
Build machine cpu family: x86_64
|
||||
Build machine cpu: x86_64
|
||||
Dependency libavformat found: YES (cached)
|
||||
Dependency libavcodec found: YES (cached)
|
||||
Dependency libavutil found: YES (cached)
|
||||
Dependency sdl2 found: YES (cached)
|
||||
Configuring config.h using configuration
|
||||
Adding test "test_control_event_queue"
|
||||
Adding test "test_control_event_serialize"
|
||||
Adding test "test_strutil"
|
||||
Program ./scripts/build-wrapper.sh found: YES (/home/rom/projects/scrcpy/server/./scripts/build-wrapper.sh)
|
||||
DEPRECATION: build_always is deprecated. Combine build_by_default and build_always_stale instead.
|
||||
Build targets in project: 6
|
||||
Found ninja-1.8.2 at /usr/bin/ninja
|
||||
Running compile:
|
||||
Working directory: /tmp/tmpk1bh9k5g
|
||||
Command line: ccache cc /tmp/tmpk1bh9k5g/testfile.c -pipe -D_FILE_OFFSET_BITS=64 -c -o /tmp/tmpk1bh9k5g/output.obj -O0 --print-search-dirs
|
||||
|
||||
Code:
|
||||
|
||||
Compiler stdout:
|
||||
install: /usr/lib/gcc/x86_64-linux-gnu/8/
|
||||
programs: =/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/bin/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/bin/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/bin/
|
||||
libraries: =/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib/:/lib/x86_64-linux-gnu/8/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/8/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/:/usr/lib/
|
||||
|
||||
Compiler stderr:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
int main(int argc, char **argv) { int class=0; return class; }
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user