]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/xcbgrab.c
vaapi_encode: Support VBR mode
[ffmpeg] / libavdevice / xcbgrab.c
index 356518ae5fd33c1581327d1ded83642a9bf6345f..2913df5e9423cc2d6e9db59aa49c836f31713900 100644 (file)
@@ -500,7 +500,7 @@ static int pixfmt_from_pixmap_format(AVFormatContext *s, int depth,
 
         fmt++;
     }
-    av_log(s, AV_LOG_ERROR, "Pixmap format not mappable.\n");
+    avpriv_report_missing_feature(s, "Mapping this pixmap format");
 
     return AVERROR_PATCHWELCOME;
 }
@@ -544,13 +544,12 @@ static int create_stream(AVFormatContext *s)
                                   st->avg_frame_rate.num };
     c->time_frame = av_gettime();
 
-    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_id   = AV_CODEC_ID_RAWVIDEO;
-    st->codec->width      = c->width;
-    st->codec->height     = c->height;
-    st->codec->time_base  = c->time_base;
+    st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+    st->codecpar->codec_id   = AV_CODEC_ID_RAWVIDEO;
+    st->codecpar->width      = c->width;
+    st->codecpar->height     = c->height;
 
-    ret = pixfmt_from_pixmap_format(s, geo->depth, &st->codec->pix_fmt);
+    ret = pixfmt_from_pixmap_format(s, geo->depth, &st->codecpar->format);
 
     free(geo);
 
@@ -685,7 +684,7 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
     return 0;
 }
 
-AVInputFormat ff_x11grab_xcb_demuxer = {
+AVInputFormat ff_xcbgrab_demuxer = {
     .name           = "x11grab",
     .long_name      = NULL_IF_CONFIG_SMALL("X11 screen capture, using XCB"),
     .priv_data_size = sizeof(XCBGrabContext),