You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2020/02/02 14:39:53 UTC

[GitHub] [guacamole-server] sreid8 commented on a change in pull request #159: GUACAMOLE-465: beginning to support new codecs and containers

sreid8 commented on a change in pull request #159: GUACAMOLE-465: beginning to support new codecs and containers
URL: https://github.com/apache/guacamole-server/pull/159#discussion_r373850956
 
 

 ##########
 File path: src/guacenc/ffmpeg-compat.c
 ##########
 @@ -165,3 +194,56 @@ int guacenc_avcodec_encode_video(guacenc_video* video, AVFrame* frame) {
 #endif
 }
 
+AVCodecContext* guacenc_build_avcodeccontext(AVStream* stream, AVCodec* codec, 
+        int bitrate, int width, int height, int gop_size, int qmax, int qmin,
+        int pix_fmt, AVRational time_base) {
+
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 33, 100)
+    stream->codec->bit_rate = bitrate;
+    stream->codec->width = width;
+    stream->codec->height = height;
+    stream->codec->gop_size = gop_size;
+    stream->codec->qmax = qmax;
+    stream->codec->qmin = qmin;
+    stream->codec->pix_fmt = pix_fmt;
+    stream->codec->time_base = time_base;
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55, 44, 100)
+    stream->codec->time_base = time_base;
 
 Review comment:
   After looking at it, it seems like the `#else` is the only really important part, so I re-did the boolean so that there was no duplicated line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services