[FFmpeg-devel] [PATCH][GSoC] dshow add support for saving and loading of capture devices

Máté Sebők smfinc.org at gmail.com
Wed Apr 22 18:42:39 CEST 2015


Of course can it be only in the error block - just deleted the other
releases.
Also no need for NULL-ing either in this case.

On Wed, Apr 22, 2015 at 6:26 PM, Roger Pack <rogerdpack2 at gmail.com> wrote:

> On 4/22/15, Máté Sebők <smfinc.org at gmail.com> wrote:
> > Added NULL-ing after release on load and save, lower-cased the #include
> > "shlwapi.h" and added release of pers_stream in the error handler.
>
> OK the crash is gone now.
> I'd like to have the IStream_Release only in one section, however.
> Would it be possible to remove the Release's and *only* release in the
> error block please?
>
> > There is no other pers_stream, only in the save because the
> > OleLoadFromStream loads directly to the described object.
>
> OK point taken.  I'd like to see the IPersistStream Release only
> called in the error block as well.  Just to match the existing code
> style.  It's practically there, thank you!
> -roger-
>
> > On Wed, Apr 22, 2015 at 4:46 PM, Roger Pack <rogerdpack2 at gmail.com>
> wrote:
> >
> >> On 4/22/15, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > On Wed, Apr 22, 2015 at 01:40:03PM +0200, Hendrik Leppkes wrote:
> >> >> On Wed, Apr 22, 2015 at 1:12 PM, Michael Niedermayer
> >> >> <michaelni at gmx.at>
> >> >> wrote:
> >> >> > On Wed, Apr 22, 2015 at 12:47:59PM +0200, Máté Sebők wrote:
> >> >> >> Indeed, sorry i've forgotten to change the Eclipse' EOL to unix--
> >> >> >> now
> >> >> >> fixed.
> >> >> >>
> >> >> >> Error handler fixed.
> >> >> >>
> >> >> >> Parameter names changed to audio(/video)_device_load(/save) as I
> >> think
> >> >> >> the
> >> >> >> to_file and from_file is evident and is specified in the help.
> >> >> >>
> >> >> >> About the "fake" input:  by loading a device filter from file, in
> >> >> >> the
> >> >> >> dshow_open_device() it loads the device object from file instead
> of
> >> >> >> searching it by name. So as long as the dshow_open_device() get
> >> called
> >> >> >> it
> >> >> >> will load the device -- however to get called it is required to
> >> >> >> have
> >> a
> >> >> >> not
> >> >> >> NULL input name .. aka any fake text would do the trick (eg: -i
> >> video="
> >> >> >> " )
> >> >> >> If you have better suggestion for the description, please tell me.
> >> >> >>
> >> >> >> Here is the fixed patch.
> >> >> >
> >> >> > [...]
> >> >> >
> >> >> >> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> >> >> >> index d03670e..9ac28c5 100644
> >> >> >> --- a/libavdevice/dshow.c
> >> >> >> +++ b/libavdevice/dshow.c
> >> >> >> @@ -27,6 +27,8 @@
> >> >> >>  #include "libavformat/riff.h"
> >> >> >>  #include "avdevice.h"
> >> >> >>  #include "libavcodec/raw.h"
> >> >> >> +#include "objidl.h"
> >> >> >
> >> >> >> +#include "Shlwapi.h"
> >> >> >
> >> >> > this header does not exist, it must be lowwer case or it will break
> >> >> > build on linux-mingw
> >> >> >
> >> >>
> >> >> That is the proper capitalization of the header in the MS Windows
> SDK.
> >> >> If mingw has it all lower-cased, its technically a bug in mingw.
> >> >
> >> > hmm i wasnt aware of that but yes
> >> >  locate Shlwapi.h confirms that theres no such header in ubuntu mingw*
> >> >
> >> > so this definitly needs some configure check so it doesnt break build
> >>
> >> Interesting.  After doing some research (in my own cross compiler, I
> >> only have "shlwapi.h" and not "Shlwapi.h"), it appears that the
> >> mingw-gcc cross compilers are themselves "filename case insensitive"
> >> even on linux with case sensitive underlying file systems.  So I guess
> >> as long as "shlwapi.h" is common we should be ok.  Unexpected for
> >> sure.
> >> _______________________________________________
> >> ffmpeg-devel mailing list
> >> ffmpeg-devel at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dshow-add-capture-device-save-and-load.patch
Type: application/octet-stream
Size: 8822 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150422/a038df98/attachment.obj>


More information about the ffmpeg-devel mailing list