[vlc-commits] mmal: compilation fix
Steve Lhomme
git at videolan.org
Fri Jan 10 11:41:00 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jan 10 11:21:14 2020 +0100| [73a30d610f84347d5c94ffddadfd245e00b502f0] | committer: Steve Lhomme
mmal: compilation fix
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73a30d610f84347d5c94ffddadfd245e00b502f0
---
modules/hw/mmal/codec.c | 12 +++++++-----
modules/hw/mmal/deinterlace.c | 22 +++++++++++++---------
modules/hw/mmal/vout.c | 19 ++++++++++---------
3 files changed, 30 insertions(+), 23 deletions(-)
diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index 5386515361..4571f1d39e 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -51,8 +51,8 @@
#define MMAL_OPAQUE_TEXT N_("Decode frames directly into RPI VideoCore instead of host memory.")
#define MMAL_OPAQUE_LONGTEXT N_("Decode frames directly into RPI VideoCore instead of host memory. This option must only be used with the MMAL video output plugin.")
-static int OpenDecoder(decoder_t *dec);
-static void CloseDecoder(decoder_t *dec);
+static int OpenDecoder(vlc_object_t *);
+static void CloseDecoder(vlc_object_t *);
vlc_module_begin()
set_shortname(N_("MMAL decoder"))
@@ -97,8 +97,9 @@ static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer);
static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer);
static void output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer);
-static int OpenDecoder(decoder_t *dec)
+static int OpenDecoder(vlc_object_t *obj)
{
+ decoder_t *dec = (decoder_t *)obj;
int ret = VLC_SUCCESS;
decoder_sys_t *sys;
MMAL_STATUS_T status;
@@ -237,13 +238,14 @@ static int OpenDecoder(decoder_t *dec)
out:
if (ret != VLC_SUCCESS)
- CloseDecoder(dec);
+ CloseDecoder(obj);
return ret;
}
-static void CloseDecoder(decoder_t *dec)
+static void CloseDecoder(vlc_object_t *obj)
{
+ decoder_t *dec = (decoder_t *)obj;
decoder_sys_t *sys = dec->p_sys;
MMAL_BUFFER_HEADER_T *buffer;
diff --git a/modules/hw/mmal/deinterlace.c b/modules/hw/mmal/deinterlace.c
index 9fb254ec70..4a62912e0b 100644
--- a/modules/hw/mmal/deinterlace.c
+++ b/modules/hw/mmal/deinterlace.c
@@ -45,8 +45,8 @@
#define MMAL_DEINTERLACE_QPU_TEXT N_("Use QPUs for advanced HD deinterlacing.")
#define MMAL_DEINTERLACE_QPU_LONGTEXT N_("Make use of the QPUs to allow higher quality deinterlacing of HD content.")
-static int Open(filter_t *filter);
-static void Close(filter_t *filter);
+static int Open(vlc_object_t *);
+static void Close(vlc_object_t *);
vlc_module_begin()
set_shortname(N_("MMAL deinterlace"))
@@ -84,8 +84,9 @@ static void flush(filter_t *filter);
#define MMAL_COMPONENT_DEFAULT_DEINTERLACE "vc.ril.image_fx"
-static int Open(filter_t *filter)
+static int Open(vlc_object_t *obj)
{
+ filter_t *filter = (filter_t *)obj;
int32_t frame_duration = filter->fmt_in.video.i_frame_rate != 0 ?
vlc_tick_from_samples( filter->fmt_in.video.i_frame_rate_base,
filter->fmt_in.video.i_frame_rate ) : 0;
@@ -255,13 +256,14 @@ static int Open(filter_t *filter)
out:
if (ret != VLC_SUCCESS)
- Close(filter);
+ Close(obj);
return ret;
}
-static void Close(filter_t *filter)
+static void Close(vlc_object_t *obj)
{
+ filter_t *filter = (filter_t *)obj;
filter_sys_t *sys = filter->p_sys;
MMAL_BUFFER_HEADER_T *buffer;
@@ -319,7 +321,8 @@ static int send_output_buffer(filter_t *filter)
picture->format.i_frame_rate = filter->fmt_out.video.i_frame_rate;
picture->format.i_frame_rate_base = filter->fmt_out.video.i_frame_rate_base;
- buffer = picture->p_sys->buffer;
+ picture_sys_t *p_sys = picture->p_sys;
+ buffer = p_sys->buffer;
buffer->user_data = picture;
buffer->cmd = 0;
@@ -377,19 +380,20 @@ static picture_t *deinterlace(filter_t *filter, picture_t *picture)
fill_output_port(filter);
- buffer = picture->p_sys->buffer;
+ picture_sys_t *p_sys = picture->p_sys;
+ buffer = p_sys->buffer;
buffer->user_data = picture;
buffer->pts = picture->date;
buffer->cmd = 0;
- if (!picture->p_sys->displayed) {
+ if (!p_sys->displayed) {
status = mmal_port_send_buffer(sys->input, buffer);
if (status != MMAL_SUCCESS) {
msg_Err(filter, "Failed to send buffer to input port (status=%"PRIx32" %s)",
status, mmal_status_to_string(status));
picture_Release(picture);
} else {
- picture->p_sys->displayed = true;
+ p_sys->displayed = true;
atomic_fetch_add(&sys->input_in_transit, 1);
vlc_sem_post(&sys->sem);
}
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 1134f1eb81..02ecf60c0f 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -146,13 +146,13 @@ static const vlc_fourcc_t subpicture_chromas[] = {
/* Utility functions */
static inline uint32_t align(uint32_t x, uint32_t y);
-static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg,
+static void configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg,
const video_format_t *fmt);
/* VLC vout display callbacks */
static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count);
static void vd_prepare(vout_display_t *vd, picture_t *picture,
- subpicture_t *subpicture);
+ subpicture_t *subpicture, vlc_tick_t date);
static void vd_display(vout_display_t *vd, picture_t *picture);
static int vd_control(vout_display_t *vd, int query, va_list args);
static void vd_manage(vout_display_t *vd);
@@ -318,7 +318,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
out:
if (ret != VLC_SUCCESS)
- Close(object);
+ Close(vd);
(void) context;
return ret;
@@ -355,7 +355,8 @@ static void Close(vout_display_t *vd)
else
for (i = 0; i < sys->num_buffers; ++i)
if (sys->pictures[i]) {
- mmal_buffer_header_release(sys->pictures[i]->p_sys->buffer);
+ picture_sys_t *p_sys = sys->pictures[i]->p_sys;
+ mmal_buffer_header_release(p_sys->buffer);
picture_Release(sys->pictures[i]);
}
@@ -517,9 +518,9 @@ static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count)
sys->pictures = calloc(sys->num_buffers, sizeof(picture_t *));
for (i = 0; i < sys->num_buffers; ++i) {
- picture_res.p_sys = calloc(1, sizeof(picture_sys_t));
- picture_res.p_sys->owner = (vlc_object_t *)vd;
- picture_res.p_sys->buffer = mmal_queue_get(sys->pool->queue);
+ picture_sys_t *p_sys = picture_res.p_sys = calloc(1, sizeof(picture_sys_t));
+ p_sys->owner = (vlc_object_t *)vd;
+ p_sys->buffer = mmal_queue_get(sys->pool->queue);
sys->pictures[i] = picture_NewFromResource(&vd->fmt, &picture_res);
if (!sys->pictures[i]) {
@@ -598,7 +599,7 @@ static void vd_display(vout_display_t *vd, picture_t *picture)
pic_sys->displayed = true;
}
- display_subpicture(vd, subpicture);
+ display_subpicture(vd, NULL /*subpicture*/);
if (sys->next_phase_check == 0 && sys->adjust_refresh_rate)
maintain_phase_sync(vd);
@@ -665,7 +666,7 @@ static void vd_manage(vout_display_t *vd)
if (query_resolution(vd, &width, &height) >= 0) {
sys->display_width = width;
sys->display_height = height;
- vout_window_ReportSize(sys->last_cfg->window, width, height);
+ vout_window_ReportSize(sys->last_cfg.window, width, height);
}
sys->need_configure_display = false;
More information about the vlc-commits
mailing list