Project

General

Profile

Actions

Feature #2485

closed

Image-Plugin mit ffmpeg-3.x kompilieren

Added by anbr about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
03/26/2017
Due date:
% Done:

100%

Estimated time:

Description

--- a/liboutput/encode.c
+++ b/liboutput/encode.c
@@ -52,7 +52,7 @@
     av_register_all();
     avcodec_register_all();

-    m_pavCodec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
+    m_pavCodec = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);
     if (!m_pavCodec) {
         esyslog("imageplugin: Failed to find CODEC_ID_MPEG2VIDEO.");
           return false;
@@ -102,7 +102,7 @@
     }
     else
     {
-        pAVF = avcodec_alloc_frame();
+        pAVF = av_frame_alloc();
         if (! pAVF)
         {
             esyslog("imageplugin: Failed to alloc memory for AVFrame.");
@@ -150,7 +150,7 @@
     }
     context->max_b_frames=1;
     context->flags |= CODEC_FLAG_QSCALE;
-    context->pix_fmt = PIX_FMT_YUV420P;
+    context->pix_fmt = AV_PIX_FMT_YUV420P;
 }

 bool cEncode::ConvertImageToFrame(AVFrame *frame)
@@ -173,7 +173,7 @@
     // Convert RGB to YUV 
     if(!avpicture_fill((AVPicture*)m_pImageFilled, 
                                     m_pImageRGB, 
-                                    PIX_FMT_RGB24, m_nWidth, m_nHeight)) 
+                                    AV_PIX_FMT_RGB24, m_nWidth, m_nHeight))
     {
         esyslog("imageplugin: failed avpicture_fill");
         return false;
@@ -182,13 +182,13 @@
     {
         int result;
 #ifndef HAVE_SWSCALER
-        result=img_convert((AVPicture*)frame->data, PIX_FMT_YUV420P, 
-                       (AVPicture*)m_pImageFilled, PIX_FMT_RGB24, 
+        result=img_convert((AVPicture*)frame->data, AV_PIX_FMT_YUV420P,
+                       (AVPicture*)m_pImageFilled, AV_PIX_FMT_RGB24,
                        m_nWidth, m_nHeight);
 #else
         SwsContext* convert_ctx = sws_getContext(m_nWidth, m_nHeight, 
-                        PIX_FMT_RGB24, m_nWidth, m_nHeight, 
-                        PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
+                        AV_PIX_FMT_RGB24, m_nWidth, m_nHeight,
+                        AV_PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);

         if(!convert_ctx) {
             esyslog("imageplugin: failed to initialize swscaler context");

Quelle : http://www.vdr-portal.de/board16-video-disk-recorder/board55-vdr-plugins/p1287824-softhddevice-mit-ffmpeg-3-x/#post1287824

Actions #1

Updated by anbr about 7 years ago

  • Status changed from New to Assigned
  • Assignee set to anbr
  • Target version set to 0.5.0
  • % Done changed from 0 to 100
Actions #2

Updated by anbr about 7 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF