22a8a5a4b3
- install version.h - H323Capabilities patch from FreeBSD - make it compile with new pwlib
78 lines
2.0 KiB
Plaintext
78 lines
2.0 KiB
Plaintext
$OpenBSD: patch-src_ffh263codec_cxx,v 1.2 2008/03/15 17:38:43 ajacoutot Exp $
|
|
--- src/ffh263codec.cxx.orig Wed Dec 8 03:03:59 2004
|
|
+++ src/ffh263codec.cxx Tue Mar 4 14:29:13 2008
|
|
@@ -142,6 +142,7 @@
|
|
*
|
|
*/
|
|
#include <ptlib.h>
|
|
+#include <ptlib/video.h>
|
|
#include "h263codec.h"
|
|
|
|
#ifdef __GNUC__
|
|
@@ -193,7 +194,7 @@ class FfmpgLink : public H323DynaLink
|
|
|
|
AVFrame *AvcodecAllocFrame(void);
|
|
|
|
- BOOL IsLoaded();
|
|
+ //BOOL IsLoaded();
|
|
|
|
int AvcodecClose(AVCodecContext *ctx);
|
|
int AvcodecDecodeVideo(AVCodecContext *ctx, AVFrame *picture, int *got_picture_ptr, BYTE *buf, int buf_size);
|
|
@@ -217,7 +218,9 @@ class FfmpgLink : public H323DynaLink
|
|
|
|
void (*Favcodec_get_context_defaults)(AVCodecContext *s);
|
|
void (*Favcodec_init)(void);
|
|
+#ifdef H323_RFC2190_AVCODEC
|
|
void (*Favcodec_set_print_fn)(void (*print_fn)(char *));
|
|
+#endif
|
|
void (*Favcodec_register_all)(void);
|
|
};
|
|
|
|
@@ -287,17 +290,21 @@ FfmpgLink::FfmpgLink()
|
|
return;
|
|
}
|
|
|
|
+#ifdef H323_RFC2190_AVCODEC
|
|
if (!GetFunction("avcodec_set_print_fn", (Function &)Favcodec_set_print_fn)) {
|
|
cerr << "Failed to load avcodec_set_print_fn" << endl;
|
|
return;
|
|
}
|
|
+#endif
|
|
|
|
/* must be called before using avcodec lib */
|
|
Favcodec_init();
|
|
|
|
Favcodec_register_all();
|
|
|
|
+#ifdef H323_RFC2190_AVCODEC
|
|
Favcodec_set_print_fn(h263_ffmpeg_printon);
|
|
+#endif
|
|
|
|
isLoadedOK = TRUE;
|
|
}
|
|
@@ -388,10 +395,12 @@ void FfmpgLink::AvcodecInit(void)
|
|
Favcodec_init();
|
|
}
|
|
|
|
+#ifdef H323_RFC2190_AVCODEC
|
|
void FfmpgLink::AvcodecSetPrintFn(void (*print_fn)(char *))
|
|
{
|
|
Favcodec_set_print_fn(print_fn);
|
|
}
|
|
+#endif
|
|
|
|
void FfmpgLink::AFavcodecRegisterAll(void)
|
|
{
|
|
@@ -614,9 +623,9 @@ void H323_FFH263Codec::InitialiseCodec()
|
|
}
|
|
|
|
#ifdef FRAME_RATE_BASE
|
|
- context->frame_rate = framesPerSec * FRAME_RATE_BASE;
|
|
+ context->time_base.den = framesPerSec * FRAME_RATE_BASE;
|
|
#else
|
|
- context->frame_rate = framesPerSec * DEFAULT_FRAME_RATE_BASE;
|
|
+ context->time_base.den = framesPerSec * DEFAULT_FRAME_RATE_BASE;
|
|
#endif
|
|
|
|
context->rtp_mode = 0;
|