[libgstdshow] gstdshwvideosrc - patch to use other video size

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[libgstdshow] gstdshwvideosrc - patch to use other video size

Julien.Isorce
Hi

In the actual source code of gstdshwvideosrc.h and .c, it is not possible
to use other video size than the default (one default for each video
format rgb ,yuv..., often 320*240)

So I found a solution to use other video sizes than the default for each
video format, for example if you want use 720*576 or 1920*1080 .. and if
the default is 320*240 ...)

I join to this mail the two new files gstdshowvideosrc.c et
gstdshowvideosrc.h

In gstdshowvideosrc.c I replace :
hres = IFilterGraph_ConnectDirect (src->filter_graph,
pin_mediatype->capture_pin, input_pin, NULL);
by this one :
hres = IFilterGraph_ConnectDirect (src->filter_graph,
pin_mediatype->capture_pin, input_pin, pin_mediatype->mediatype);

Then I defined 3 more properties:
force_size (is yes, filter will use given size)
width (given frame width)
height (given frame height)

So then gst-inspect-0.10 return :
  force-size          : Use forced size
                        flags: readable, writable
                        Boolean. Default: false Current: false
  width               : Forced frame width
                        flags: readable, writable
                        Integer. Range: 80 - 1920 Default: 720 Current: 0
  height              : Forced frame height
                        flags: readable, writable
                        Integer. Range: 60 - 1080 Default: 576 Current: 0

And the command line is like this :
gst-launch-0.10 dshowvideosrc force-size=1 width = 720 height = 576 !
ffmpegcolorspace ! autovideosink
or
gst-launch-0.10 dshowvideosrc force-size=1 width = 720 height = 576 !
video/x-raw-yuv, format=(fourcc)UYVY ! ffmpegcolorspace ! autovideosink if
I want to be sure to use UYVY for example.

It is possbile to use the filter normally :
gst-launch-0.10 dshowvideosrc ! ffmpegcolorspace ! autovideosink
or
gst-launch-0.10 dshowvideosrc ! video/x-raw-yuv, format=(fourcc)UYVY,
width=320, height=240 ! ffmpegcolorspace ! autovideosink
or
gst-launch-0.10 dshowvideosrc ! video/x-raw-rgb ! ffmpegcolorspace !
autovideosink
etc...

I join to this mail the two new files gstdshowvideosrc.c et
gstdshowvideosrc.h

I am waitting your reactions.

I will be happy that my addon be in the new release !

Sincerely,

Julien Isorce

(Actually mailing list cannot accept attachements, so i cannot join the
two files !)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [libgstdshow] gstdshwvideosrc - patch to use other video size

Jan Schmidt-6

[hidden email] wrote:
> I join to this mail the two new files gstdshowvideosrc.c et
> gstdshowvideosrc.h
>  
Hi Julien,

The best way to submit patches is to file a bug in bugzilla
(http://bugzilla.gnome.org) and attach unified diffs of the files in
question. Patches sent to the mailing list have a tendency to get lost
or forgotten.

Also, I'm not sure what trouble you had sending attachments in the first
place - the list accepts attachments just fine.

- Jan.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel