Origin commit data
------------------
Branch: master
Commit: 53ca350af4
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-11-07 (Sun, 07 Nov 2021)

Origin message was:
------------------
- re-formatting code using astyle; see https://github.com/neutrino-images/ni-buildsystem/blob/master/support/scripts/astyle.sh

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-11-07 21:22:27 +01:00
parent 37d5fc0f21
commit 9d9bd38d6a
12 changed files with 88 additions and 62 deletions

View File

@@ -391,11 +391,11 @@ void cAudio::run()
#endif
inp = av_find_input_format("mpegts");
AVIOContext *pIOCtx = avio_alloc_context(inbuf, INBUF_SIZE, // internal Buffer and its size
0, // bWriteable (1=true,0=false)
NULL, // user data; will be passed to our callback functions
_my_read, // read callback
NULL, // write callback
NULL); // seek callback
0, // bWriteable (1=true,0=false)
NULL, // user data; will be passed to our callback functions
_my_read, // read callback
NULL, // write callback
NULL); // seek callback
avfc = avformat_alloc_context();
avfc->pb = pIOCtx;
avfc->iformat = inp;
@@ -473,9 +473,9 @@ void cAudio::run()
av_get_sample_fmt_string(tmp, sizeof(tmp), c->sample_fmt);
hal_info("decoding %s, sample_fmt %d (%s) sample_rate %d channels %d\n", avcodec_get_name(p->codec_id), c->sample_fmt, tmp, p->sample_rate, p->channels);
swr = swr_alloc_set_opts(swr,
o_layout, AV_SAMPLE_FMT_S16, o_sr, /* output */
p->channel_layout, c->sample_fmt, p->sample_rate, /* input */
0, NULL);
o_layout, AV_SAMPLE_FMT_S16, o_sr, /* output */
p->channel_layout, c->sample_fmt, p->sample_rate, /* input */
0, NULL);
if (! swr)
{
hal_info("could not alloc resample context\n");

View File

@@ -203,7 +203,8 @@ int cDemux::Read(unsigned char *buff, int len, int timeout)
* return from read(), so as a "emergency exit" for e.g. NIT scan, set a (long)
* timeout here */
int to = timeout;
if (dmx_type == DMX_PSI_CHANNEL && timeout <= 0){
if (dmx_type == DMX_PSI_CHANNEL && timeout <= 0)
{
to = 60 * 1000;
}
@@ -363,13 +364,16 @@ bool cDemux::sectionFilter(unsigned short _pid, const unsigned char *const filte
if (debuglevel == 2)
{
fprintf(stderr, "filt: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.filter[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.filter[i]);
fprintf(stderr, "\n");
fprintf(stderr, "mask: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.mask[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.mask[i]);
fprintf(stderr, "\n");
fprintf(stderr, "mode: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.mode[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.mode[i]);
fprintf(stderr, "\n");
}

View File

@@ -349,8 +349,8 @@ bool cVideo::ShowPicture(const char *fname)
{
unsigned int need = av_image_get_buffer_size(VDEC_PIXFMT, c->width, c->height, 1);
struct SwsContext *convert = sws_getContext(c->width, c->height, c->pix_fmt,
c->width, c->height, VDEC_PIXFMT,
SWS_BICUBIC, 0, 0, 0);
c->width, c->height, VDEC_PIXFMT,
SWS_BICUBIC, 0, 0, 0);
if (!convert)
hal_info("%s: ERROR setting up SWS context\n", __func__);
else
@@ -541,11 +541,11 @@ void cVideo::run(void)
#endif
inp = av_find_input_format("mpegts");
AVIOContext *pIOCtx = avio_alloc_context(inbuf, INBUF_SIZE, // internal Buffer and its size
0, // bWriteable (1=true,0=false)
NULL, // user data; will be passed to our callback functions
my_read, // read callback
NULL, // write callback
NULL); // seek callback
0, // bWriteable (1=true,0=false)
NULL, // user data; will be passed to our callback functions
my_read, // read callback
NULL, // write callback
NULL); // seek callback
avfc = avformat_alloc_context();
avfc->pb = pIOCtx;
avfc->iformat = inp;
@@ -639,9 +639,9 @@ void cVideo::run(void)
{
unsigned int need = av_image_get_buffer_size(VDEC_PIXFMT, c->width, c->height, 1);
convert = sws_getCachedContext(convert,
c->width, c->height, c->pix_fmt,
c->width, c->height, VDEC_PIXFMT,
SWS_BICUBIC, 0, 0, 0);
c->width, c->height, c->pix_fmt,
c->width, c->height, VDEC_PIXFMT,
SWS_BICUBIC, 0, 0, 0);
if (!convert)
hal_info("%s: ERROR setting up SWS context\n", __func__);
else
@@ -701,7 +701,7 @@ void cVideo::run(void)
#else
frame->best_effort_timestamp
#endif
);
);
}
else
hal_debug("%s: got_frame: %d stillpicture: %d\n", __func__, got_frame, stillpicture);