Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df20f8fc06 | ||
|
|
c47bf17c0f | ||
|
|
64faa8c66b | ||
|
|
2f26f0b052 | ||
|
|
4fef2097ce | ||
|
|
669f5d42f0 | ||
|
|
f0d245ce4b | ||
|
|
815ad3f011 | ||
|
|
69d46b1d95 | ||
|
|
0440561c99 | ||
|
|
2a172a98fd | ||
|
|
421eebc8f1 | ||
|
|
ab3bafc750 | ||
|
|
d3f7248ca9 |
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ in the list. Suboptions are optional and can mostly be omitted.
|
||||
.. admonition:: Examples
|
||||
|
||||
- ``--ao=alsa,oss,`` Try the ALSA driver, then the OSS driver, then others.
|
||||
- ``--ao=alsa:noblock:device=[hw:0,3]`` Sets noblock-mode and the
|
||||
- ``--ao=alsa:no-block:device=[hw:0,3]`` Sets noblock-mode and the
|
||||
device-name as first card, fourth device.
|
||||
|
||||
Available audio output drivers are:
|
||||
|
||||
@@ -316,7 +316,7 @@ Optional features:
|
||||
--disable-bluray disable Blu-ray support [autodetect]
|
||||
--disable-dvdread disable libdvdread [autodetect]
|
||||
--disable-enca disable ENCA charset oracle library [autodetect]
|
||||
--enable-macosx-bundle enable Mac OS X bundle file locations [autodetect]
|
||||
--enable-macosx-bundle enable Mac OS X bundle file locations [disabled]
|
||||
--disable-pthreads disable Posix threads support [autodetect]
|
||||
--disable-libass disable subtitle rendering with libass [autodetect]
|
||||
--disable-libass-osd disable OSD rendering with libass [autodetect]
|
||||
@@ -474,7 +474,7 @@ _cdda=auto
|
||||
_coreaudio=auto
|
||||
_corevideo=auto
|
||||
_cocoa=auto
|
||||
_macosx_bundle=auto
|
||||
_macosx_bundle=no
|
||||
_enca=auto
|
||||
_pthreads=auto
|
||||
_ass=auto
|
||||
@@ -709,7 +709,6 @@ for ac_option do
|
||||
--enable-cocoa) _cocoa=yes ;;
|
||||
--disable-cocoa) _cocoa=no ;;
|
||||
--enable-macosx-bundle) _macosx_bundle=yes ;;
|
||||
--disable-macosx-bundle) _macosx_bundle=no ;;
|
||||
|
||||
--enable-manpage) _build_man=yes ;;
|
||||
--disable-manpage) _build_man=no ;;
|
||||
@@ -1550,11 +1549,11 @@ echores "$_sys_sysinfo"
|
||||
if darwin; then
|
||||
|
||||
echocheck "Mac OS X Bundle file locations"
|
||||
def_macosx_bundle='#undef CONFIG_MACOSX_BUNDLE'
|
||||
test "$_macosx_bundle" = auto
|
||||
if test "$_macosx_bundle" = yes ; then
|
||||
extra_ldflags="$extra_ldflags -headerpad_max_install_names"
|
||||
def_macosx_bundle='#define CONFIG_MACOSX_BUNDLE 1'
|
||||
else
|
||||
def_macosx_bundle='#undef CONFIG_MACOSX_BUNDLE'
|
||||
fi
|
||||
echores "$_macosx_bundle"
|
||||
|
||||
|
||||
+1
-1
@@ -466,7 +466,7 @@ struct demux_packet *demux_read_packet(struct sh_stream *sh)
|
||||
// packets from the queue.
|
||||
double demux_get_next_pts(struct sh_stream *sh)
|
||||
{
|
||||
if (sh) {
|
||||
if (sh && sh->ds->selected) {
|
||||
ds_get_packets(sh);
|
||||
if (sh->ds->head)
|
||||
return sh->ds->head->pts;
|
||||
|
||||
+4
-1
@@ -35,6 +35,7 @@
|
||||
|
||||
struct priv {
|
||||
int frame_size;
|
||||
int read_frames;
|
||||
double frame_rate;
|
||||
};
|
||||
|
||||
@@ -107,6 +108,7 @@ static int demux_rawaudio_open(demuxer_t *demuxer, enum demux_check check)
|
||||
*p = (struct priv) {
|
||||
.frame_size = samplesize * sh_audio->channels.num,
|
||||
.frame_rate = samplerate,
|
||||
.read_frames = samplerate,
|
||||
};
|
||||
|
||||
return 0;
|
||||
@@ -191,6 +193,7 @@ static int demux_rawvideo_open(demuxer_t *demuxer, enum demux_check check)
|
||||
*p = (struct priv) {
|
||||
.frame_size = imgsize,
|
||||
.frame_rate = fps,
|
||||
.read_frames = 1,
|
||||
};
|
||||
|
||||
return 0;
|
||||
@@ -203,7 +206,7 @@ static int raw_fill_buffer(demuxer_t *demuxer)
|
||||
if (demuxer->stream->eof)
|
||||
return 0;
|
||||
|
||||
struct demux_packet *dp = new_demux_packet(p->frame_size);
|
||||
struct demux_packet *dp = new_demux_packet(p->frame_size * p->read_frames);
|
||||
dp->pos = stream_tell(demuxer->stream) - demuxer->movi_start;
|
||||
dp->pts = (dp->pos / p->frame_size) / p->frame_rate;
|
||||
|
||||
|
||||
@@ -1269,6 +1269,8 @@ static struct cmd_bind *find_any_bind_for_key(struct input_ctx *ictx,
|
||||
struct active_section *s = &ictx->active_sections[i];
|
||||
struct cmd_bind *bind = find_bind_for_key_section(ictx, s->name, n, keys);
|
||||
if (bind) {
|
||||
if (bind->is_builtin && !ictx->default_bindings)
|
||||
goto skip;
|
||||
struct cmd_bind_section *bs = bind->owner;
|
||||
for (int x = 0; x < n; x++) {
|
||||
if (MP_KEY_DEPENDS_ON_MOUSE_POS(keys[x]) && bs->mouse_area_set &&
|
||||
|
||||
@@ -651,6 +651,7 @@ const m_option_type_t m_option_type_double = {
|
||||
.pretty_print = print_double_f3,
|
||||
.copy = copy_opt,
|
||||
.clamp = clamp_double,
|
||||
.add = add_double,
|
||||
};
|
||||
|
||||
#undef VAL
|
||||
|
||||
+14
-4
@@ -72,6 +72,8 @@ typedef struct vf_priv_s {
|
||||
unsigned buf_w[3];
|
||||
unsigned buf_h[3];
|
||||
unsigned char *buf[3];
|
||||
|
||||
int gamma_i, contrast_i, brightness_i, saturation_i;
|
||||
} vf_eq2_t;
|
||||
|
||||
|
||||
@@ -381,18 +383,22 @@ int control (vf_instance_t *vf, int request, void *data)
|
||||
|
||||
if (strcmp (eq->item, "gamma") == 0) {
|
||||
set_gamma (vf->priv, exp (log (8.0) * eq->value / 100.0));
|
||||
vf->priv->gamma_i = eq->value;
|
||||
return CONTROL_TRUE;
|
||||
}
|
||||
else if (strcmp (eq->item, "contrast") == 0) {
|
||||
set_contrast (vf->priv, (1.0 / 100.0) * (eq->value + 100));
|
||||
vf->priv->contrast_i = eq->value;
|
||||
return CONTROL_TRUE;
|
||||
}
|
||||
else if (strcmp (eq->item, "brightness") == 0) {
|
||||
set_brightness (vf->priv, (1.0 / 100.0) * eq->value);
|
||||
vf->priv->brightness_i = eq->value;
|
||||
return CONTROL_TRUE;
|
||||
}
|
||||
else if (strcmp (eq->item, "saturation") == 0) {
|
||||
set_saturation (vf->priv, (double) (eq->value + 100) / 100.0);
|
||||
vf->priv->saturation_i = eq->value;
|
||||
return CONTROL_TRUE;
|
||||
}
|
||||
break;
|
||||
@@ -400,19 +406,19 @@ int control (vf_instance_t *vf, int request, void *data)
|
||||
case VFCTRL_GET_EQUALIZER:
|
||||
eq = (vf_equalizer_t *) data;
|
||||
if (strcmp (eq->item, "gamma") == 0) {
|
||||
eq->value = (int) (100.0 * log (vf->priv->gamma) / log (8.0));
|
||||
eq->value = vf->priv->gamma_i;
|
||||
return CONTROL_TRUE;
|
||||
}
|
||||
else if (strcmp (eq->item, "contrast") == 0) {
|
||||
eq->value = (int) (100.0 * vf->priv->contrast) - 100;
|
||||
eq->value = vf->priv->contrast_i;
|
||||
return CONTROL_TRUE;
|
||||
}
|
||||
else if (strcmp (eq->item, "brightness") == 0) {
|
||||
eq->value = (int) (100.0 * vf->priv->brightness);
|
||||
eq->value = vf->priv->brightness_i;
|
||||
return CONTROL_TRUE;
|
||||
}
|
||||
else if (strcmp (eq->item, "saturation") == 0) {
|
||||
eq->value = (int) (100.0 * vf->priv->saturation) - 100;
|
||||
eq->value = vf->priv->saturation_i;
|
||||
return CONTROL_TRUE;
|
||||
}
|
||||
break;
|
||||
@@ -503,9 +509,13 @@ int vf_open(vf_instance_t *vf, char *args)
|
||||
eq2->gamma_weight = par[7];
|
||||
|
||||
set_gamma (eq2, par[0]);
|
||||
eq2->gamma_i = (int) (100.0 * log (vf->priv->gamma) / log (8.0));
|
||||
set_contrast (eq2, par[1]);
|
||||
eq2->contrast_i = (int) (100.0 * vf->priv->contrast) - 100;
|
||||
set_brightness (eq2, par[2]);
|
||||
eq2->brightness_i = (int) (100.0 * vf->priv->brightness);
|
||||
set_saturation (eq2, par[3]);
|
||||
eq2->saturation_i = (int) (100.0 * vf->priv->saturation) - 100;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
+12
-13
@@ -523,7 +523,7 @@ int vo_cocoa_check_events(struct vo *vo)
|
||||
|
||||
void vo_cocoa_fullscreen(struct vo *vo)
|
||||
{
|
||||
if (![NSThread isMainThread]) {
|
||||
if (![NSThread isMainThread] && resize_callback_registered(vo)) {
|
||||
// This is the secondary thread, unlock since we are going to invoke a
|
||||
// method synchronously on the GUI thread using Cocoa.
|
||||
vo_cocoa_set_current_context(vo, false);
|
||||
@@ -535,7 +535,7 @@ void vo_cocoa_fullscreen(struct vo *vo)
|
||||
waitUntilDone:YES];
|
||||
|
||||
|
||||
if (![NSThread isMainThread]) {
|
||||
if (![NSThread isMainThread] && resize_callback_registered(vo)) {
|
||||
// Now lock again!
|
||||
vo_cocoa_set_current_context(vo, true);
|
||||
}
|
||||
@@ -657,7 +657,11 @@ int vo_cocoa_cgl_color_size(struct vo *vo)
|
||||
NSApplicationPresentationDefault;
|
||||
|
||||
if ([s->fs_screen hasMenubar])
|
||||
popts |= NSApplicationPresentationAutoHideMenuBar;
|
||||
// Cocoa raises an exception when autohiding the menubar but
|
||||
// not the dock. They probably got bored while programming the
|
||||
// multi screen support and took some shortcuts (tested on 10.8).
|
||||
popts |= NSApplicationPresentationAutoHideMenuBar |
|
||||
NSApplicationPresentationAutoHideDock;
|
||||
|
||||
if ([s->fs_screen hasDock])
|
||||
popts |= NSApplicationPresentationAutoHideDock;
|
||||
@@ -762,20 +766,15 @@ int vo_cocoa_cgl_color_size(struct vo *vo)
|
||||
CGFloat dx = (f.size.width - ns.width) / 2;
|
||||
CGFloat dy = (f.size.height - ns.height - [self titleHeight]) / 2;
|
||||
NSRect nf = NSRectFromCGRect(CGRectInset(NSRectToCGRect(f), dx, dy));
|
||||
|
||||
struct vo *vo = self.videoOutput;
|
||||
if (!(vo && !vo->opts->border)) {
|
||||
NSRect s = [[self screen] visibleFrame];
|
||||
if (nf.origin.y + nf.size.height > s.origin.y + s.size.height)
|
||||
nf.origin.y = s.size.height - nf.size.height;
|
||||
}
|
||||
|
||||
[self setFrame:nf display:NO animate:NO];
|
||||
}
|
||||
|
||||
- (NSRect)constrainFrameRect:(NSRect)rect toScreen:(NSScreen *)screen
|
||||
- (NSRect)constrainFrameRect:(NSRect)nf toScreen:(NSScreen *)screen
|
||||
{
|
||||
return rect;
|
||||
NSRect s = [[self screen] visibleFrame];
|
||||
if (nf.origin.y + nf.size.height > s.origin.y + s.size.height)
|
||||
nf.origin.y = s.origin.y + s.size.height - nf.size.height;
|
||||
return nf;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+10
-4
@@ -433,7 +433,6 @@ static bool fbotex_init(struct gl_video *p, struct fbotex *fbo, int w, int h,
|
||||
GL *gl = p->gl;
|
||||
bool res = true;
|
||||
|
||||
assert(gl->mpgl_caps & MPGL_CAP_FB);
|
||||
assert(!fbo->fbo);
|
||||
assert(!fbo->texture);
|
||||
|
||||
@@ -446,6 +445,9 @@ static bool fbotex_init(struct gl_video *p, struct fbotex *fbo, int w, int h,
|
||||
|
||||
MP_VERBOSE(p, "Create FBO: %dx%d\n", fbo->tex_w, fbo->tex_h);
|
||||
|
||||
if (!(gl->mpgl_caps & MPGL_CAP_FB))
|
||||
return false;
|
||||
|
||||
gl->GenFramebuffers(1, &fbo->fbo);
|
||||
gl->GenTextures(1, &fbo->texture);
|
||||
gl->BindTexture(GL_TEXTURE_2D, fbo->texture);
|
||||
@@ -1499,6 +1501,10 @@ static bool get_image(struct gl_video *p, struct mp_image *mpi)
|
||||
|
||||
struct video_image *vimg = &p->image;
|
||||
|
||||
// See comments in init_video() about odd video sizes.
|
||||
// The normal upload path does this too, but less explicit.
|
||||
mp_image_set_size(mpi, vimg->planes[0].w, vimg->planes[0].h);
|
||||
|
||||
for (int n = 0; n < p->plane_count; n++) {
|
||||
struct texplane *plane = &vimg->planes[n];
|
||||
mpi->stride[n] = mpi->plane_w[n] * p->image_desc.bytes[n];
|
||||
@@ -1709,10 +1715,10 @@ static void check_gl_features(struct gl_video *p)
|
||||
}
|
||||
|
||||
// fruit dithering mode and the 3D lut use this texture format
|
||||
if ((p->opts.dither_depth >= 0 && p->opts.dither_algo == 0) ||
|
||||
p->use_lut_3d)
|
||||
if (have_fbo && ((p->opts.dither_depth >= 0 && p->opts.dither_algo == 0) ||
|
||||
p->use_lut_3d))
|
||||
{
|
||||
// doesn't disalbe anything; it's just for the log
|
||||
// doesn't disable anything; it's just for the log
|
||||
MP_VERBOSE(p, "Testing GL_R16 FBO (dithering/LUT)\n");
|
||||
test_fbo(p, GL_R16);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user