]> git.sesse.net Git - mlt/commitdiff
Add support for pix_fmt on avformat resource URL.
authorDan Dennedy <dan@dennedy.org>
Sat, 26 Feb 2011 05:10:10 +0000 (21:10 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 26 Feb 2011 05:10:10 +0000 (21:10 -0800)
For example, libdc1394:/dev/raw1394?frame_rate:15\&pix_fmt:yuv422
makes a Firewire digital camera (not DV camcorder) on Linux work.

src/modules/avformat/producer_avformat.c

index b1c6302ff9e9a29d0546612a28c6836791fe337c..b9dbbeca2f2221cafd73e79fdbfdfb039b070e66 100644 (file)
@@ -518,7 +518,6 @@ static int producer_open( producer_avformat this, mlt_profile profile, char *fil
                        params->width = 640;
                        params->height = 480;
                        params->time_base= (AVRational){1,25};
-                       // params->device = file;
                        params->channels = 2;
                        params->sample_rate = 48000;
                }
@@ -547,6 +546,8 @@ static int producer_open( producer_avformat this, mlt_profile profile, char *fil
                                        params->channel = atoi( value );
                                else if ( !strcmp( name, "channels" ) )
                                        params->channels = atoi( value );
+                               else if ( !strcmp( name, "pix_fmt" ) )
+                                       params->pix_fmt = av_get_pix_fmt( value );
                                else if ( !strcmp( name, "width" ) )
                                        params->width = atoi( value );
                                else if ( !strcmp( name, "height" ) )