directshow

BufferCB not being called by SampleGrabber

我是研究僧i 提交于 2019-12-25 02:21:34
问题 I'm using a SampleGrabber to get audio data, however my BufferCB method is not being executed. What am I doing wrong ? //add Sample Grabber IBaseFilter pSampleGrabber = (IBaseFilter)Activator.CreateInstance(Type.GetTypeFromCLSID(CLSID_SampleGrabber)); hr = pGraph.AddFilter(pSampleGrabber, "SampleGrabber"); checkHR(hr, "Can't add Sample Grabber"); AMMediaType pSampleGrabber_pmt = new AMMediaType(); //pSampleGrabber_pmt.majorType = MediaType.Audio; pSampleGrabber_pmt.subType = MediaSubType.PCM;

Direct Print webpage in PDF file

£可爱£侵袭症+ 提交于 2019-12-24 19:27:50
问题 In my site i m fetching my mysql data by using PHP. I want open that data in pdf file when i click pdf print button is it possible? 回答1: First of all, if you want a high quality professional product to do that. You want Prince XML If you are looking into some open source tool to achieve something similar. You can look into this SO question. 回答2: You could prepare static PDF form file, that just fill it in with values using PHP's FDF module. 回答3: It depends which platform are you using. This

Directshow continious capture

依然范特西╮ 提交于 2019-12-24 18:20:11
问题 I have Mp4 Capture Application in direct show. In my application i need to capture 30 min(or say some dynamic value) video continuously for the I made one WaitableTimer Routine , after 30 minutes i want to stop the capture and then start again ... but after i stop capture on next sample in start capture the stream not get added to the file. to start next capture , i have to release all the capture variables again get devices and build graph and then i can start capture. Cant i simply stop

Wrong Presentation time at H264 streams [Live555 OpenRtspClient]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 17:52:54
问题 I modify the OpenRtspClient so that Now instead of writing frames to file I collect them in a queue with incoming presenttaion times Then give the h264 frames to MP4 muxer [ Geraint Davies MP4 mux filter] Finally write muxed data to file... So I can able to save h264 stream into MP4 container... But the problem is that, some of the recorded data [NOT all of them] has wrong values for time duration: Suppose that a 10 minute record seems that it was 12 h stream... VLC play the 10 minute that

Directshow.net don't detect all mics in Windows 7

核能气质少年 提交于 2019-12-24 16:42:56
问题 I'm having problems with the Directshow.net library and Windows 7. In some PC (only if in Device Manager > Controllers Sound, video, listed: "High Definition Audio Device") only detect 1 mic when Skype, MSN, and Recording Devices, lists at least two; when executes this code: Filter audioDevice = null; if (capture != null) audioDevice = capture.AudioDevice; "audioDevice" only have the first mic (internal mic or rear mic), and don't retrieve de second mic (front mic -jack-) or vice versa.

Is there any helper tool for creating graphedit files “on the fly” (programmatically)

故事扮演 提交于 2019-12-24 16:17:11
问题 I notice that avisynth can accept as input a "live directshow source" only through a graphedit file that includes that source in it. Is there any help tool out there to create a graphedit file on the fly, given you know a capture sources name (and/or the output format you want from that pin)? ref: http://betterlogic.com/roger/2012/05/avisynth-live-capture The graphedit file syntax is described here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd388788(v=vs.85).aspx (though it

ISampleGrabber::BufferCB to IplImage; display in OpenCV shows garbled image - C++

北城余情 提交于 2019-12-24 11:36:30
问题 I'm using DirectShow to access a video stream, and then using the SampleGrabber filter and interface to get samples from each frame for further image processing. I'm using a callback, so it gets called after each new frame. I've basically just worked from the PlayCap sample application and added a sample filter to the graph. The problem I'm having is that I'm trying to display the grabbed samples on a different OpenCV window. However, when I try to cast the information in the buffer to an

directshow “Color Space Converter” filter configuration problem (VMR windowless renderer)

跟風遠走 提交于 2019-12-24 10:38:32
问题 I'm using VMR to mix a bitmap with a video stream. I run the renderer in windowless mode. Since I need to have more than 1 stream on the renderer, I add the renderer to the graph first and then use IFilterGraph2::RenderEx with AM_RENDEREX_RENDERTOEXISTINGRENDERERS. Everything works fine most of the time, but I have one .avi file that will render fine with RenderFile, but ends up displaying all black when rendered in my graph. I compared the two graphs in graphedit, and they're the same:

Programmatically get video duration

爷,独闯天下 提交于 2019-12-24 08:37:19
问题 I'd need to get the video duration of a mp4 video (video format AVC) I'm using DirectShowLib 2.1 I downloaded a couple of codecs but I'm still getting code -2147220891 (an error code that I don't know what it means) doing graphBuilder.RenderFile(filePath, null); Any idea how to get the duration of this kind of video? 回答1: -2147220891 is 0x80040265 in hex. A search for that error code revealed this thread 0x80040265 isn't really "unknown". Strictly, it is VFW_E_UNSUPPORTED_STREAM, which means

Clean up DirectShow Graph - DirectShow graph is not stopping

只愿长相守 提交于 2019-12-24 08:16:22
问题 I use DirectShowNet and when my Graph is stopped I release com objects. The problem is that while I try to release COM objects [ filters, interface] ,sometimes this cleanup cause directshow graph not STOPPED.It "suspend". If I do not make clen up [ release com objects] everthing is OK [ except i have memory leaks] ... Here is how i make clean up: if (videoWindow != nullptr) { Marshal::ReleaseComObject(videoWindow); videoWindow = nullptr; } if (mediaControl != nullptr) { Marshal: