Opened 13 years ago

Closed 11 years ago

#2187 closed task (fixed)

libmythtv/* have too many FOURCC definitions

Reported by: Nigel Owned by: Nigel
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description (last modified by Nigel)

While fixing a Mac OS X compile bug, I happened to do:
egrep -i 'fourcc|MKTAG' *.{cpp,h}
in libmythtv. There are at least five source files where these Four Character Constants are defined. There are overlaps. MKTAG is redefined. This needs cleaning up!
I am thinking of creating libmythtv/fourcc.h with a sensible constant naming scheme, like FOURCC_IYUV

Change History (12)

comment:1 Changed 13 years ago by Nigel

Description: modified (diff)
Status: newassigned

comment:2 Changed 13 years ago by Nigel

(In [10797]) Recent change, [10782], broke OS X compilation. util-xv.h was added to videobuffers.h for some constants, but util-xv.h won't compile on non-X-Windows environments. Time for a new place for the constants. See #2187

comment:3 Changed 13 years ago by stuartm

(In [10799]) Include fourcc.h in videoout_xv.cpp. Refs #2187 Fixes #2190

comment:4 Changed 12 years ago by danielk

(In [12495]) Refs #2187. Moves IA44/AI44 fourcc definitions to fourcc.h

comment:5 Changed 12 years ago by danielk

(In [12496]) Refs #2187, reverts extra debugging accidentally added in [12495].

comment:6 Changed 12 years ago by Nigel

Type: defecttask

1) This is more of a code-review (i.e. task) than a defect.
2) I thought I would look at FFMPEG's code for direction. It also uses several different techniques, like; be2me_32(ff_get_fourcc("mjpg")), MKBETAG('m','j','p','g'), MKTAG('m', 'j', 'p', 'b'), mmioFOURCC('Z','L','I','B') 3) I am still undecided if fourcc.h should have integer constants (fast to compile, but endian issues), or use macros (easy to read). Time to flip a coin?

comment:7 Changed 12 years ago by Nigel

(In [13061]) More FourCC stuff into one file. See #2187 I also eliminated a few needlessy duplicated lines. Don't have a Windo$e build env, so I hope I haven't broken anything

comment:8 Changed 12 years ago by rich@…

Nigel,

You need to wrap the entire fourcc.h file in a conditional (#ifnef FOURCC_H ...) or the code won't compile.

comment:9 Changed 12 years ago by Nigel

(In [13065]) Move a few more MKTAG('....')s to fourcc.h - See #2187

comment:10 Changed 12 years ago by Nigel

(In [13066]) Remove unused MKTAG and V4L2_PIX_FMT. See #2187

comment:11 Changed 12 years ago by Nigel

(In [13067]) Eliminate a few more MKTAG('....')s. See #2187.

comment:12 Changed 11 years ago by Nigel

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.