Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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:
|
||||
|
||||
+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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -762,20 +762,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
|
||||
|
||||
Reference in new issue
Block a user