5 changes: 2 additions & 3 deletions mythtv/libs/libmythtv/visualisations/goom/ifs.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@

#include "goomconfig.h"

typedef struct _ifsPoint
struct IFSPoint
{
gint32 x, y;
}
IFSPoint;
};

// init ifs for a (width)x(height) output.
void init_ifs (int width, int height);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/visualisations/goom/ifs_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void ifs_update (guint32 * data, const guint32 * back, int width, int height,
cycle10 = 7 - s_cycle / 10;

{
unsigned char *tmp = (unsigned char *) &couleursl;
auto *tmp = (unsigned char *) &couleursl;

for (int i = 0; i < 4; i++) {
*tmp = (*tmp) >> cycle10;
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/visualisations/goom/lines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ lighten (unsigned char value, float power)
static void
lightencolor (int *col, float power)
{
unsigned char *color = (unsigned char *) col;
auto *color = (unsigned char *) col;
*color = lighten (*color, power);
color++;
*color = lighten (*color, power);
Expand Down Expand Up @@ -117,8 +117,8 @@ goom_lines_move (GMLine * l)
(l->points2[i].angle + 39.0F * l->points[i].angle) / 40.0F;
}

unsigned char *c1 = (unsigned char *) &l->color;
unsigned char *c2 = (unsigned char *) &l->color2;
auto *c1 = (unsigned char *) &l->color;
auto *c2 = (unsigned char *) &l->color2;
for (int i = 0; i < 4; i++) {
int cc1 = *c1;
int cc2 = *c2;
Expand Down Expand Up @@ -161,7 +161,7 @@ goom_lines_init (int rx, int ry,
//unsigned char *color;
//unsigned char power = 4;

GMLine *l = (GMLine *) malloc (sizeof (GMLine));
auto *l = (GMLine *) malloc (sizeof (GMLine));

l->points = (GMUnitPointer *) malloc (512 * sizeof (GMUnitPointer));
l->points2 = (GMUnitPointer *) malloc (512 * sizeof (GMUnitPointer));
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/visualisations/goom/lines.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
#include "graphic.h"
#include "goomconfig.h"

typedef struct _GMUNITPOINTER
struct GMUnitPointer
{
float x;
float y;
float angle;
} GMUnitPointer;
};

// tableau de points
typedef struct _GMLINE
struct GMLine
{
GMUnitPointer *points;
GMUnitPointer *points2;
Expand All @@ -35,7 +35,7 @@ typedef struct _GMLINE

float power;
float powinc;
} GMLine;
};

// les ID possibles
#define GML_CIRCLE 0
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/visualisations/goom/surf3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void grid3d_free(grid3d **grid)
grid3d *grid3d_new (int sizex, int defx, int sizez, int defz, v3d center) {
int x = defx;
int y = defz;
grid3d *g = (grid3d*)malloc (sizeof(grid3d));
auto *g = (grid3d*)malloc (sizeof(grid3d));
surf3d *s = &(g->surf);
s->nbvertex = x*y;
s->vertex = (v3d*)malloc (x*y*sizeof(v3d));
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/visualisations/goom/surf3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@

#include "v3d.h"

typedef struct {
struct surf3d {
v3d *vertex;
v3d *svertex;
int nbvertex;

v3d center;
} surf3d;
};

typedef struct {
struct grid3d {
surf3d surf;

int defx;
int sizex;
int defz;
int sizez;
int mode;
} grid3d;
};

/* hi-level */

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/visualisations/goom/tentacle3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ lighten (unsigned char value, float power)
static void
lightencolor (int *col, float power)
{
unsigned char *color = (unsigned char *) col;
auto *color = (unsigned char *) col;
*color = lighten (*color, power);
color++;
*color = lighten (*color, power);
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/visualisations/goom/v3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

#include "mathtools.h"

typedef struct {
struct v3d {
float x,y,z;
} v3d;
};

typedef struct {
struct v2d {
int x,y;
} v2d;
};

/*
* projete le vertex 3D sur le plan d'affichage
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/platforms/mythxdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ QSize MythXDisplay::GetDisplaySize(void)
{
LOG(VB_GENERAL, LOG_ERR, "X11 ModeLine query failed");
// Fallback to old display size code - which is not updated for mode switches
return QSize(DisplayWidth(m_disp, m_screenNum),
DisplayHeight(m_disp, m_screenNum));
return {DisplayWidth(m_disp, m_screenNum),
DisplayHeight(m_disp, m_screenNum)};
}

return { mode.hdisplay, mode.vdisplay };
Expand Down
9 changes: 4 additions & 5 deletions mythtv/programs/mythtranscode/external/replex/element.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ enum {
NONE=0,AC3, MPEG_AUDIO, LPCM, MAX_TYPES
};

typedef struct sequence_s{
struct sequence_t {
int set;
int ext_set;
uint16_t h_size;
Expand All @@ -103,10 +103,9 @@ typedef struct sequence_s{
uint8_t pulldown;
uint8_t current_frame;
uint8_t current_tmpref;
} sequence_t;
};

typedef
struct audio_frame_s{
struct audio_frame_t {
int set;
int layer;
uint32_t bit_rate;
Expand All @@ -118,7 +117,7 @@ struct audio_frame_s{
uint32_t frametime;
uint32_t off;
char language[4];
} audio_frame_t;
};

void pts2time(uint64_t pts, uint8_t *buf, int len);
int find_audio_sync(ringbuffer *rbuf, uint8_t *buf, int off, int type, int le);
Expand Down
8 changes: 4 additions & 4 deletions mythtv/programs/mythtranscode/external/replex/mpg_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@



typedef struct index_unit_s{
struct index_unit {
uint8_t active;
uint32_t length;
uint32_t start;
Expand All @@ -49,9 +49,9 @@ typedef struct index_unit_s{
uint8_t err;
uint32_t framesize;
uint64_t ptsrate;
} index_unit;
};

typedef struct extdata_s{
struct extdata_t {
index_unit iu;
uint64_t pts;
uint64_t pts_off;
Expand All @@ -60,7 +60,7 @@ typedef struct extdata_s{
int frmperpkt;
char language[4];
dummy_buffer dbuf;
} extdata_t;
};


#define NO_ERR 0
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythtranscode/external/replex/multiplex.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define N_AUDIO 32
#define N_AC3 8

typedef struct multiplex_s{
struct multiplex_t {
int fd_out;
#define REPLEX_MPEG2 0
#define REPLEX_DVD 1
Expand Down Expand Up @@ -81,7 +81,7 @@ typedef struct multiplex_s{

int (*fill_buffers)(void *p, int f);
void *priv;
} multiplex_t;
};

void check_times( multiplex_t *mx, int *video_ok, int *ext_ok, int *start);
void write_out_packs( multiplex_t *mx, int video_ok, int *ext_ok);
Expand Down
10 changes: 4 additions & 6 deletions mythtv/programs/mythtranscode/external/replex/pes.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
#define MAX_PTS (0x0000000200000000ULL)
#define MAX_PTS2 (300* MAX_PTS)

typedef
struct ps_packet_{
struct ps_packet {
uint8_t scr[6];
uint8_t mux_rate[3];
uint8_t stuff_length;
Expand All @@ -65,11 +64,10 @@ struct ps_packet_{
uint8_t video_bound;
uint8_t reserved;
int npes;
} ps_packet;
};


typedef
struct pes_in_s{
struct pes_in_t {
int type;
unsigned int found;
int withbuf;
Expand All @@ -89,7 +87,7 @@ struct pes_in_s{
int done;
int which;
void *priv;
} pes_in_t;
};


void init_pes_in(pes_in_t *p, int type, ringbuffer *rb, int wi);
Expand Down
8 changes: 4 additions & 4 deletions mythtv/programs/mythtranscode/external/replex/ringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@

#define FULL_BUFFER (-1000)
#define EMPTY_BUFFER (-1000)
typedef struct ringbuffer {
struct ringbuffer {
int read_pos;
int write_pos;
uint32_t size;
uint8_t *buffer;
} ringbuffer;
};


#define DBUF_INDEX 10000

typedef struct dummy_buffer_s {
struct dummy_buffer {
uint32_t size;
uint32_t fill;
ringbuffer time_index;
ringbuffer data_index;
} dummy_buffer;
};


int ring_init (ringbuffer *rbuf, int size);
Expand Down