mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
build with ffmpeg version > 59.0.100
Origin commit data
------------------
Branch: master
Commit: 6898f3599d
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2021-08-29 (Sun, 29 Aug 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -242,7 +242,11 @@ void write_frame(AVFrame *in_frame, int fd)
|
|||||||
return;
|
return;
|
||||||
static const unsigned char pes_header[] = {0x0, 0x0, 0x1, 0xe0, 0x00, 0x00, 0x80, 0x80, 0x5, 0x21, 0x0, 0x1, 0x0, 0x1};
|
static const unsigned char pes_header[] = {0x0, 0x0, 0x1, 0xe0, 0x00, 0x00, 0x80, 0x80, 0x5, 0x21, 0x0, 0x1, 0x0, 0x1};
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
|
||||||
AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);
|
AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);
|
||||||
|
#else
|
||||||
|
const AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);
|
||||||
|
#endif
|
||||||
if (codec)
|
if (codec)
|
||||||
{
|
{
|
||||||
AVCodecContext *codec_context = avcodec_alloc_context3(codec);
|
AVCodecContext *codec_context = avcodec_alloc_context3(codec);
|
||||||
@@ -354,7 +358,11 @@ int decode_frame(AVCodecContext *codecContext, AVPacket &packet, int fd)
|
|||||||
|
|
||||||
AVCodecContext *open_codec(AVMediaType mediaType, AVFormatContext *formatContext)
|
AVCodecContext *open_codec(AVMediaType mediaType, AVFormatContext *formatContext)
|
||||||
{
|
{
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
|
||||||
AVCodec *codec = NULL;
|
AVCodec *codec = NULL;
|
||||||
|
#else
|
||||||
|
const AVCodec *codec = NULL;
|
||||||
|
#endif
|
||||||
AVCodecContext *codecContext = NULL;
|
AVCodecContext *codecContext = NULL;
|
||||||
int stream_index;
|
int stream_index;
|
||||||
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57,25,101)
|
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57,25,101)
|
||||||
@@ -1475,4 +1483,4 @@ int cVideo::GetAudioDestination()
|
|||||||
void cVideo::SetAudioDestination(int audio_dest)
|
void cVideo::SetAudioDestination(int audio_dest)
|
||||||
{
|
{
|
||||||
hdmi_cec::getInstance()->SetAudioDestination(audio_dest);
|
hdmi_cec::getInstance()->SetAudioDestination(audio_dest);
|
||||||
}
|
}
|
||||||
|
@@ -1829,7 +1829,9 @@ int32_t container_ffmpeg_init_av_context(Context_t *context, char *filename, uin
|
|||||||
}
|
}
|
||||||
if (avContextTab[AVIdx] != NULL)
|
if (avContextTab[AVIdx] != NULL)
|
||||||
{
|
{
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
|
||||||
avContextTab[AVIdx]->iformat->flags |= AVFMT_SEEK_TO_PTS;
|
avContextTab[AVIdx]->iformat->flags |= AVFMT_SEEK_TO_PTS;
|
||||||
|
#endif
|
||||||
avContextTab[AVIdx]->flags = AVFMT_FLAG_GENPTS;
|
avContextTab[AVIdx]->flags = AVFMT_FLAG_GENPTS;
|
||||||
}
|
}
|
||||||
printf("minimal Probe: %d\n", context->playback->noprobe);
|
printf("minimal Probe: %d\n", context->playback->noprobe);
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
// mpeg4-part2 in mipsel receivers
|
// mpeg4-part2 in mipsel receivers
|
||||||
// http://forums.openpli.org/topic/39326-gstreamer10-and-mpeg4-part2/?hl=%2Bmpeg4+%2Bpart2
|
// http://forums.openpli.org/topic/39326-gstreamer10-and-mpeg4-part2/?hl=%2Bmpeg4+%2Bpart2
|
||||||
//
|
//
|
||||||
|
#include <libavcodec/bsf.h>
|
||||||
|
|
||||||
// mpeg4_unpack_bframes
|
// mpeg4_unpack_bframes
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@@ -3,6 +3,8 @@
|
|||||||
* allows to compile and use exteplayer3
|
* allows to compile and use exteplayer3
|
||||||
* with old ffmpeg libs
|
* with old ffmpeg libs
|
||||||
*/
|
*/
|
||||||
|
#include <libavcodec/avcodec.h>
|
||||||
|
|
||||||
static void wrapped_frame_free(void *param)
|
static void wrapped_frame_free(void *param)
|
||||||
{
|
{
|
||||||
#if (LIBAVCODEC_VERSION_MAJOR >= 55)
|
#if (LIBAVCODEC_VERSION_MAJOR >= 55)
|
||||||
|
@@ -36,6 +36,7 @@ extern "C" {
|
|||||||
#include <libavutil/opt.h>
|
#include <libavutil/opt.h>
|
||||||
#include <libavutil/samplefmt.h>
|
#include <libavutil/samplefmt.h>
|
||||||
#include <libswresample/swresample.h>
|
#include <libswresample/swresample.h>
|
||||||
|
#include <libavcodec/avcodec.h>
|
||||||
#include <ao/ao.h>
|
#include <ao/ao.h>
|
||||||
}
|
}
|
||||||
/* ffmpeg buf 2k */
|
/* ffmpeg buf 2k */
|
||||||
@@ -351,9 +352,14 @@ void cAudio::run()
|
|||||||
av_register_all();
|
av_register_all();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AVCodec *codec;
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
|
||||||
AVFormatContext *avfc = NULL;
|
|
||||||
AVInputFormat *inp;
|
AVInputFormat *inp;
|
||||||
|
AVCodec *codec;
|
||||||
|
#else
|
||||||
|
const AVInputFormat *inp;
|
||||||
|
const AVCodec *codec;
|
||||||
|
#endif
|
||||||
|
AVFormatContext *avfc = NULL;
|
||||||
AVFrame *frame;
|
AVFrame *frame;
|
||||||
uint8_t *inbuf = (uint8_t *)av_malloc(INBUF_SIZE);
|
uint8_t *inbuf = (uint8_t *)av_malloc(INBUF_SIZE);
|
||||||
AVPacket avpkt;
|
AVPacket avpkt;
|
||||||
|
@@ -33,6 +33,7 @@ extern "C" {
|
|||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
#include <libavutil/imgutils.h>
|
#include <libavutil/imgutils.h>
|
||||||
#include <libswscale/swscale.h>
|
#include <libswscale/swscale.h>
|
||||||
|
#include <libavcodec/avcodec.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ffmpeg buf 32k */
|
/* ffmpeg buf 32k */
|
||||||
@@ -259,7 +260,7 @@ bool cVideo::ShowPicture(const char *fname)
|
|||||||
AVFormatContext *avfc = NULL;
|
AVFormatContext *avfc = NULL;
|
||||||
AVCodecContext *c = NULL;
|
AVCodecContext *c = NULL;
|
||||||
AVCodecParameters *p = NULL;
|
AVCodecParameters *p = NULL;
|
||||||
AVCodec *codec;
|
const AVCodec *codec;
|
||||||
AVFrame *frame, *rgbframe;
|
AVFrame *frame, *rgbframe;
|
||||||
AVPacket avpkt;
|
AVPacket avpkt;
|
||||||
|
|
||||||
@@ -495,11 +496,16 @@ static int my_read(void *, uint8_t *buf, int buf_size)
|
|||||||
void cVideo::run(void)
|
void cVideo::run(void)
|
||||||
{
|
{
|
||||||
hal_info("====================== start decoder thread ================================\n");
|
hal_info("====================== start decoder thread ================================\n");
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
|
||||||
|
AVInputFormat *inp;
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
|
#else
|
||||||
|
const AVInputFormat *inp;
|
||||||
|
const AVCodec *codec;
|
||||||
|
#endif
|
||||||
AVCodecParameters *p = NULL;
|
AVCodecParameters *p = NULL;
|
||||||
AVCodecContext *c = NULL;
|
AVCodecContext *c = NULL;
|
||||||
AVFormatContext *avfc = NULL;
|
AVFormatContext *avfc = NULL;
|
||||||
AVInputFormat *inp;
|
|
||||||
AVFrame *frame, *rgbframe;
|
AVFrame *frame, *rgbframe;
|
||||||
uint8_t *inbuf = (uint8_t *)av_malloc(INBUF_SIZE);
|
uint8_t *inbuf = (uint8_t *)av_malloc(INBUF_SIZE);
|
||||||
AVPacket avpkt;
|
AVPacket avpkt;
|
||||||
|
Reference in New Issue
Block a user