Click here to Skip to main content
15,913,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get available com ports? Pin
Joel Holdsworth27-Mar-05 23:21
Joel Holdsworth27-Mar-05 23:21 
Generalplease help Pin
khyap27-Mar-05 22:55
khyap27-Mar-05 22:55 
GeneralRe: please help Pin
Joel Holdsworth27-Mar-05 22:58
Joel Holdsworth27-Mar-05 22:58 
GeneralRe: please help Pin
ThatsAlok27-Mar-05 23:11
ThatsAlok27-Mar-05 23:11 
GeneralRe: please help Pin
Alexander M.,28-Mar-05 13:44
Alexander M.,28-Mar-05 13:44 
GeneralRe: please help Pin
David Crow28-Mar-05 2:36
David Crow28-Mar-05 2:36 
GeneralAdjustTokenPrivileges failing with SE_TCB_NAME enabled - repost Pin
ruharish27-Mar-05 21:35
ruharish27-Mar-05 21:35 
GeneralVideo Broadcasting Pin
Naru Patel27-Mar-05 21:15
Naru Patel27-Mar-05 21:15 
Can anybody help me to solve the problem of video broadcasting using Windows Media format SDK 9.0 with VC++. I am a PG student doing my final semester project on video broadcasting. What I could do is capture the video using webcam and converting the capture video in IDirectDrawStreamSample and play(Run) on my screen using IMediaStream and IMMultiMediaStream. I create the sample using IDirectDrawMediaStream interface's method HRESULT CreateSample(
IDirectDrawSurface *pSurface,
const RECT *pRect,
DWORD dwFlags,
IDirectDrawStreamSample **ppSample
);

I get sample data in ppSample but for broadcasting I need them in INSSBuffer interface. Now to write a sample to Net there is one method of IWmWriter named WriteSample(...). The Windows Media Format SDK outlines following procedure for WriteSample()

To pass a sample to the writer, perform the following steps:

->Allocate a buffer and retrieve a pointer to the INSSBuffer interface by calling IWMWriter::AllocateSample.

->Retrieve the address of the buffer created in step 1 by calling INSSBuffer::GetBuffer.

->Copy your sample data to the buffer location, making sure that the sample passed will fit in the allocated buffer. You can use any memory copying function to copy your data. A common choice is memcpy, which is included in the standard C run-time library.

->Update the amount of data used in the buffer to reflect the actual size of the sample by calling INSSBuffer::SetLength.

->Pass the buffer interface to the writer along with the input number and sample time using the IWMWriter::WriteSample method. All audio samples for an input represent the same duration of content, so you can figure the sample time by adding the sample duration to a running total. For video, you need to calculate the time based on the frame rate.

->WriteSample works asynchronously and might not finish writing the data from the buffer before your application is ready to call the method again. Therefore, it is important to call AllocateSample once for each call to WriteSample. However, you can release the INSSBuffer interface immediately after calling WriteSample.

When you have finished passing samples, call IWMWriter::EndWriting.

I tried the procedure a lot of time but it does not work. I would note that it gives me no error ( either compile time or run time) and everything goes fine but When I try to access the broadcast picture using Window's Media Player it connects to the server and just keeps buffering and continues buffering forever . As player succeeds to connect to server I think Broadcasting of data happens there but what I can not understand is what it lacks that does not get media player to play it. (Later I would be developing my own client to play it rather than using Media Player). Please Help me I have rarely one month before my submission date arrives.

Any suggestions would greatly be appreciated.
Thanks in advance.


Patel Narendra
Questionhow to overwrite a string in a file in vc++? Pin
nehathoma27-Mar-05 20:22
nehathoma27-Mar-05 20:22 
AnswerRe: how to overwrite a string in a file in vc++? Pin
Aamir Butt28-Mar-05 2:16
Aamir Butt28-Mar-05 2:16 
GeneralMD5 Result Pin
Monty227-Mar-05 19:46
Monty227-Mar-05 19:46 
GeneralRe: MD5 Result Pin
Michael Dunn27-Mar-05 20:15
sitebuilderMichael Dunn27-Mar-05 20:15 
GeneralCTwain : With ActiveX control. It does not working ! . Help me please. Pin
Anand for every one27-Mar-05 18:55
Anand for every one27-Mar-05 18:55 
Generalaccess to windows desktop explorer Pin
seethat27-Mar-05 18:54
seethat27-Mar-05 18:54 
GeneralRe: access to windows desktop explorer Pin
Aamir Butt28-Mar-05 2:18
Aamir Butt28-Mar-05 2:18 
GeneralDrawing Lines Pin
frankieb27-Mar-05 18:32
frankieb27-Mar-05 18:32 
GeneralRe: Drawing Lines Pin
Joel Holdsworth27-Mar-05 22:46
Joel Holdsworth27-Mar-05 22:46 
GeneralEnable/Disable DirectX Pin
sachinsharma27-Mar-05 17:28
sachinsharma27-Mar-05 17:28 
GeneralIMAGES TO MOVIE file Pin
Emiliano27-Mar-05 14:15
Emiliano27-Mar-05 14:15 
GeneralRe: IMAGES TO MOVIE file Pin
Steve Mayfield27-Mar-05 16:33
Steve Mayfield27-Mar-05 16:33 
QuestionIs my application causing cluster server crash? Pin
adnbsn27-Mar-05 14:14
adnbsn27-Mar-05 14:14 
GeneralNested For Loop Program Pin
bigsing27-Mar-05 13:42
bigsing27-Mar-05 13:42 
GeneralRe: Nested For Loop Program Pin
Yulianto.27-Mar-05 13:57
Yulianto.27-Mar-05 13:57 
GeneralRe: Nested For Loop Program Pin
Ravi Bhavnani28-Mar-05 3:06
professionalRavi Bhavnani28-Mar-05 3:06 
GeneralRe: Nested For Loop Program Pin
bigsing29-Mar-05 14:37
bigsing29-Mar-05 14:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.