Skip to content

Commit

Permalink
Merge branch 'MythTV:master' into hambre/play-audio-cd-from-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
hambre authored Jul 7, 2024
2 parents a74d70b + 9d5b6f0 commit 7a7a916
Show file tree
Hide file tree
Showing 63 changed files with 379 additions and 151 deletions.
12 changes: 12 additions & 0 deletions mythtv/configure
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,7 @@ MYTHTV_HAVE_LIST='
libudev
stdint_h
sync_file_range
close_range
sys_endian_h
'

Expand Down Expand Up @@ -5644,6 +5645,17 @@ int main(int argc, char **argv){
}
EOF

# test for close_range (linux system call since 5.9 and also FreeBSD)
check_ld "cc" <<EOF && enable close_range
#define _GNU_SOURCE
#include <unistd.h>
int main(int argc, char **argv){
close_range(0,0,0);
return 0;
}
EOF

# test for sizeof(int)
for sizeof in 1 2 4 8 16; do
check_cc <<EOF && _sizeof_int=$sizeof && break
Expand Down
9 changes: 8 additions & 1 deletion mythtv/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,19 @@ file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-create-developer-docs.cfg
#
set(SOURCES_LIST
"${CMAKE_CURRENT_SOURCE_DIR}/doxygen-architecture-document.cpp"
"${PROJECT_SOURCE_DIR}/contrib" "${PROJECT_SOURCE_DIR}/libs"
"${PROJECT_SOURCE_DIR}/libs"
"${PROJECT_SOURCE_DIR}/programs" "${PROJECT_SOURCE_DIR}/../mythplugins")
list(JOIN SOURCES_LIST " " DOXYGEN_SOURCES)

set(DOXYGEN_EXCLUDES "${PROJECT_SOURCE_DIR}/libs/libmythmpeg2")

set(DOXYGEN_STRIP_FROM_PATH "${PROJECT_SOURCE_DIR}/../")

set(STRIP_FROM_INC_PATH_LIST
"${PROJECT_SOURCE_DIR}/libs"
"${PROJECT_SOURCE_DIR}/programs" "${PROJECT_SOURCE_DIR}/../")
list(JOIN STRIP_FROM_INC_PATH_LIST " " DOXYGEN_STRIP_FROM_INC_PATH)

configure_file(doxygen-paths.cfg.inc.in doxygen-paths.cfg.inc @ONLY)

# Command to create documentation
Expand Down
6 changes: 5 additions & 1 deletion mythtv/docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
TARGETS = devdocs

DOXYGEN_SOURCES=doxygen-architecture-document.cpp ../contrib ../libs ../programs ../../mythplugins
DOXYGEN_SOURCES=doxygen-architecture-document.cpp ../libs ../programs ../../mythplugins
DOXYGEN_EXCLUDES=../libs/libmythmpeg2
DOXYGEN_STRIP_FROM_PATH=../../
DOXYGEN_STRIP_FROM_INC_PATH=../libs ../programs ../../

all: $(TARGETS)
clean:
Expand All @@ -13,6 +15,8 @@ doxygen-paths.cfg.inc: doxygen-paths.cfg.inc.in
@echo Creating doxygen-paths.cfg.inc
@sed -e "s#@DOXYGEN_SOURCES@#${DOXYGEN_SOURCES}#g" \
-e "s#@DOXYGEN_EXCLUDES@#${DOXYGEN_EXCLUDES}#g" \
-e "s#@DOXYGEN_STRIP_FROM_PATH@#${DOXYGEN_STRIP_FROM_PATH}#g" \
-e "s#@DOXYGEN_STRIP_FROM_INC_PATH@#${DOXYGEN_STRIP_FROM_INC_PATH}#g" \
doxygen-paths.cfg.inc.in > doxygen-paths.cfg.inc

devdocs: doxygen-paths.cfg.inc
Expand Down
14 changes: 8 additions & 6 deletions mythtv/docs/doxygen-architecture-document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,13 @@ state changing commands should not be issued.
\ingroup libmyth
MythPlugins are shared object files (_i.e._libraries) which are loaded
from a specific directory (_%e.g._ /usr/local/lib/mythtv/plugins).
<p>
MythPlugins are shared object files (_i.e._ libraries) which are loaded
from a specific directory (_e.g._ /usr/local/lib/mythtv/plugins).
Currently, all plugins are written in the C++ language, but there is nothing
preventing other languages being used (the functions are in the C name space).
c
</p>
int mythplugin_init(const char *libversion); is invoked whenever mythfrontend
is started. This typically handles upgrading any database records - it will be
the first method called after a new version of the plugin has been installed.
Expand Down Expand Up @@ -627,7 +629,7 @@ See mythplugins/mythweb/modules/_shared/lang/translations.txt for more info.
*/

/** \defgroup qobject_dangers QObject is dangerous for your health
/** \page qobject_dangers QObject is dangerous for your health
QObject derived classes can be quite useful, they can send and receive
signals, get keyboard events, translate strings into another language
Expand Down Expand Up @@ -744,7 +746,7 @@ wrong slots.
*/

/** \defgroup profiling_mythtv Profiling MythTV
/** \page profiling_mythtv Profiling MythTV
You can use any sampling profiler to profile %MythTV, the most
popular GPL one is OProfile and this section tells you how to
Expand Down Expand Up @@ -898,7 +900,7 @@ an annotated versions of the code, and saving results.
*/

/** \defgroup testing Testing hints and shortcuts
/** \page testing Testing hints and shortcuts
The internal video playback can be tested by the programs/mythavtest tool:
Expand Down
25 changes: 15 additions & 10 deletions mythtv/docs/doxygen-create-developer-docs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ INLINE_INHERITED_MEMB = NO
# shortest path that makes the file name unique will be used
# The default value is: YES.

FULL_PATH_NAMES = NO
FULL_PATH_NAMES = YES

# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
Expand All @@ -160,7 +160,9 @@ FULL_PATH_NAMES = NO
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH =
#Already included.
#@INCLUDE = doxygen-paths.cfg.inc
#STRIP_FROM_PATH = ../../

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand All @@ -169,7 +171,9 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.

STRIP_FROM_INC_PATH =
#Already included.
#@INCLUDE = doxygen-paths.cfg.inc
#STRIP_FROM_INC_PATH = ../libs ../programs ../../

# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
Expand Down Expand Up @@ -351,7 +355,7 @@ AUTOLINK_SUPPORT = YES
# diagrams that involve STL classes more complete and accurate.
# The default value is: NO.

BUILTIN_STL_SUPPORT = NO
BUILTIN_STL_SUPPORT = YES

# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
Expand Down Expand Up @@ -444,7 +448,7 @@ TYPEDEF_HIDES_STRUCT = NO
# the optimal cache size from a speed point of view.
# Minimum value: 0, maximum value: 9, default value: 0.

LOOKUP_CACHE_SIZE = 2
LOOKUP_CACHE_SIZE = 3

#---------------------------------------------------------------------------
# Build related configuration options
Expand Down Expand Up @@ -507,7 +511,7 @@ EXTRACT_LOCAL_METHODS = NO
# are hidden.
# The default value is: NO.

EXTRACT_ANON_NSPACES = NO
EXTRACT_ANON_NSPACES = YES

# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
# undocumented members inside documented classes or files. If set to NO these
Expand Down Expand Up @@ -891,8 +895,9 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*

EXCLUDE_PATTERNS = moc_*.cpp \
moc_*.h \
EXCLUDE_PATTERNS = */moc/* \
*/obj/* \
*/i18n/* \
*/contrib/* \
*/test/* \
*/.git
Expand Down Expand Up @@ -2480,7 +2485,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_IMAGE_FORMAT = png
DOT_IMAGE_FORMAT = svg

# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
Expand All @@ -2492,7 +2497,7 @@ DOT_IMAGE_FORMAT = png
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

INTERACTIVE_SVG = NO
INTERACTIVE_SVG = YES

# The DOT_PATH tag can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
Expand Down
21 changes: 21 additions & 0 deletions mythtv/docs/doxygen-paths.cfg.inc.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,24 @@ INPUT = @DOXYGEN_SOURCES@
# run.

EXCLUDE = @DOXYGEN_EXCLUDES@

# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
# part of the path. The tag can be used to show relative paths in the file list.
# If left blank the directory from which doxygen is run is used as the path to
# strip.
#
# Note that you can specify absolute paths here, but also relative paths, which
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH = @DOXYGEN_STRIP_FROM_PATH@

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
# header file to include in order to use a class. If left blank only the name of
# the header file containing the class definition is used. Otherwise one should
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.

STRIP_FROM_INC_PATH = @DOXYGEN_STRIP_FROM_INC_PATH@
10 changes: 5 additions & 5 deletions mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,7 @@ static const uint8_t opus_channel_map[8][8] = {
{ 0,6,1,2,3,4,5,7 },
};

int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
const uint8_t **pp, const uint8_t *desc_list_end,
Mp4Descr *mp4_descr, int mp4_descr_count, int pid,
MpegTSContext *ts)
Expand Down Expand Up @@ -2946,7 +2946,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (desc_list_end > p_end)
goto out;
for (;;) {
if (ff_parse_mpeg2_descriptor(ts->stream, st, stream_type, &p,
if (ff_mythtv_parse_mpeg2_descriptor(ts->stream, st, stream_type, &p,
desc_list_end, mp4_descr,
mp4_descr_count, pid, ts) < 0)
break;
Expand Down Expand Up @@ -4012,7 +4012,7 @@ static int64_t mpegts_get_dts(AVFormatContext *s, int stream_index,
/**************************************************************/
/* parsing functions - called from other demuxers such as RTP */

MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s)
MpegTSContext *avpriv_mythtv_mpegts_parse_open(AVFormatContext *s)
{
MpegTSContext *ts;

Expand All @@ -4034,7 +4034,7 @@ MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s)

/* return the consumed length if a packet was output, or -1 if no
* packet is output */
int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
int avpriv_mythtv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len)
{
int len1;
Expand All @@ -4059,7 +4059,7 @@ int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
return len1 - len;
}

void avpriv_mpegts_parse_close(MpegTSContext *ts)
void avpriv_mythtv_mpegts_parse_close(MpegTSContext *ts)
{
mpegts_free(ts);
av_free(ts);
Expand Down
8 changes: 4 additions & 4 deletions mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@

typedef struct MpegTSContext MpegTSContext;

MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s);
int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
MpegTSContext *avpriv_mythtv_mpegts_parse_open(AVFormatContext *s);
int avpriv_mythtv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len);
void avpriv_mpegts_parse_close(MpegTSContext *ts);
void avpriv_mythtv_mpegts_parse_close(MpegTSContext *ts);

typedef struct SLConfigDescr {
int use_au_start;
Expand Down Expand Up @@ -236,7 +236,7 @@ typedef struct DVBAC3Descriptor {
* @param desc_list_end End of buffer
* @return <0 to stop processing
*/
int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
const uint8_t **pp, const uint8_t *desc_list_end,
Mp4Descr *mp4_descr, int mp4_descr_count, int pid,
MpegTSContext *ts);
Expand Down
10 changes: 5 additions & 5 deletions mythtv/external/FFmpeg/libavformat/mpegts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ static const uint8_t opus_channel_map[8][8] = {
{ 0,6,1,2,3,4,5,7 },
};

int ff_old_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
const uint8_t **pp, const uint8_t *desc_list_end,
Mp4Descr *mp4_descr, int mp4_descr_count, int pid,
MpegTSContext *ts)
Expand Down Expand Up @@ -2504,7 +2504,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (desc_list_end > p_end)
goto out;
for (;;) {
if (ff_old_parse_mpeg2_descriptor(ts->stream, st, stream_type, &p,
if (ff_parse_mpeg2_descriptor(ts->stream, st, stream_type, &p,
desc_list_end, mp4_descr,
mp4_descr_count, pid, ts) < 0)
break;
Expand Down Expand Up @@ -3371,7 +3371,7 @@ static int64_t mpegts_get_dts(AVFormatContext *s, int stream_index,
/**************************************************************/
/* parsing functions - called from other demuxers such as RTP */

MpegTSContext *avpriv_old_mpegts_parse_open(AVFormatContext *s)
MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s)
{
MpegTSContext *ts;

Expand All @@ -3393,7 +3393,7 @@ MpegTSContext *avpriv_old_mpegts_parse_open(AVFormatContext *s)

/* return the consumed length if a packet was output, or -1 if no
* packet is output */
int avpriv_old_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len)
{
int len1;
Expand All @@ -3418,7 +3418,7 @@ int avpriv_old_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
return len1 - len;
}

void avpriv_old_mpegts_parse_close(MpegTSContext *ts)
void avpriv_mpegts_parse_close(MpegTSContext *ts)
{
mpegts_free(ts);
av_free(ts);
Expand Down
10 changes: 5 additions & 5 deletions mythtv/external/FFmpeg/libavformat/mpegts.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@

typedef struct MpegTSContext MpegTSContext;

MpegTSContext *avpriv_old_mpegts_parse_open(AVFormatContext *s);
int avpriv_old_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len);
void avpriv_old_mpegts_parse_close(MpegTSContext *ts);
MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s);
int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len);
void avpriv_mpegts_parse_close(MpegTSContext *ts);

typedef struct SLConfigDescr {
int use_au_start;
Expand Down Expand Up @@ -220,7 +220,7 @@ typedef struct DVBAC3Descriptor {
* @param desc_list_end End of buffer
* @return <0 to stop processing
*/
int ff_old_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type,
const uint8_t **pp, const uint8_t *desc_list_end,
Mp4Descr *mp4_descr, int mp4_descr_count, int pid,
MpegTSContext *ts);
Expand Down
8 changes: 4 additions & 4 deletions mythtv/external/FFmpeg/libavformat/rtpdec_mpegts.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ static void mpegts_close_context(PayloadContext *data)
if (!data)
return;
if (data->ts)
avpriv_mpegts_parse_close(data->ts);
avpriv_mythtv_mpegts_parse_close(data->ts);
}

static av_cold int mpegts_init(AVFormatContext *ctx, int st_index,
PayloadContext *data)
{
data->ts = avpriv_mpegts_parse_open(ctx);
data->ts = avpriv_mythtv_mpegts_parse_open(ctx);
if (!data->ts)
return AVERROR(ENOMEM);
return 0;
Expand All @@ -63,7 +63,7 @@ static int mpegts_handle_packet(AVFormatContext *ctx, PayloadContext *data,
if (!buf) {
if (data->read_buf_index >= data->read_buf_size)
return AVERROR(EAGAIN);
ret = avpriv_mpegts_parse_packet(data->ts, pkt, data->buf + data->read_buf_index,
ret = avpriv_mythtv_mpegts_parse_packet(data->ts, pkt, data->buf + data->read_buf_index,
data->read_buf_size - data->read_buf_index);
if (ret < 0)
return AVERROR(EAGAIN);
Expand All @@ -74,7 +74,7 @@ static int mpegts_handle_packet(AVFormatContext *ctx, PayloadContext *data,
return 0;
}

ret = avpriv_mpegts_parse_packet(data->ts, pkt, buf, len);
ret = avpriv_mythtv_mpegts_parse_packet(data->ts, pkt, buf, len);
/* The only error that can be returned from avpriv_mpegts_parse_packet
* is "no more data to return from the provided buffer", so return
* AVERROR(EAGAIN) for all errors */
Expand Down
Loading

0 comments on commit 7a7a916

Please sign in to comment.