|
Hi!
I'm developing an app that should capture stream from a webcam, capture audio, mux it in a FLV(maybe other container, e.g. mp4) and then stream it over a network. As I found in MS SDK, I can do it using a DirectShow, but the only option I have is to write a muxed stream to a file. So is there any options to write it to a memory buffer for furhter writing to a socket?
Ofcourse there are some tricks like a continuous reading from a muxed file, but it looks too ugly.
Another question is - can I split icoming muxed stream into frames? I mean if I have a 24 fps live source, is it possible to capture a muxed frame (audio + video), so I could drop some frames in case there is a really bad latency.
Thanks in advance!
|
|
|
|
|
If you want to write your own communication code, you can use custom DirectShow filters to
access the streams.
Real time multimedia streaming is no simple task. The most difficult issues IMO are dealing
with jitter and clock drift.
The Windows Media Format SDK has the ability to stream over a network and it integrates with
DirectShow relatively easily. There are some issues there. First, by definition, it works
mostly with Windows Media Format (ASF) streams. Second, there's no low-latency audio codecs
suitable for real-time communications (low latency/low bandwidth).
Ethemind wrote: can I split icoming muxed stream into frames? I mean if I have a 24 fps live source, is it possible to capture a muxed frame (audio + video), so I could drop some frames in case there is a really bad latency.
You have no choice. To deal with jitter and clock drift, you'll HAVE to add/remove samples in realtime to keep
everything in sync.
Just my 2 cents,
Mark
|
|
|
|
|
Hi,
I am createing new ListBox on dialog box at runtime.
it's creating fine but I want to handle the events over that.
I want to Handle event as
ON_LBN_SELCHANGE(IDC_PREVIEW_LIST, OnSelchangeList)
in message map.
but id IDC_PREVIEW_LIST is passed by me at run time in as
CListBox m_PreviewList;
m_PreviewList.Create(WS_CHILD|LVS_ICON|WS_VISIBLE|WS_BORDER|LBS_OWNERDRAWFIXED|LBS_MULTICOLUMN, rect, this, IDC_PREVIEW_LIST);
and it's not know in messge map.
So please guid me how to handle dynamically created window events.
|
|
|
|
|
|
Please can you explain with simple code?
|
|
|
|
|
Handling events of dynamically created controls are not that hard. It should work. Please ensure that IDC_PREVIEW_LIST is #define-d in some header file and included in this source file.
Do more work
Make more mistakes
Learn more things
|
|
|
|
|
You can declare each event that you need for your dynamic listbox on the message map.
|
|
|
|
|
Hi all,
I have made a dialog based application.
In that i have made a static text box. What i want to know is how to increase font size of text written in static text box....
Thanks in advanvce
|
|
|
|
|
What is static Text Box?
Nigah M Manzoor
|
|
|
|
|
Hi, please have a look to Hans Dietrich's XColorStatic[^] class.
Regards,
Mihai Moga
|
|
|
|
|
I assume that you are mentioning about changing the font size of the STATIC control. You can simply use SetFont() function on the Static controls.
CFont font;
font.CreateFont( 50, 0, 0, 0, FW_BOLD, 0, 0, 0, 0, 0, 0, 0, 0, _T("Times New Roman") );
CWnd* pWnd = GetDlgItem( IDC_STATIC1 );
if( pWnd )
{
pWnd->SetFont( &font );
font.Detach();
}
Do more work
Make more mistakes
Learn more things
modified on Saturday, June 28, 2008 12:15 PM
|
|
|
|
|
I think this[^] article is helpfuls for you.
|
|
|
|
|
Hi
I have been writing this piece of code which will search for all the possible video capture devices on the machine using the Windows DirectShow API.
But no matter what I do I can't get this block of code to return the list of devices in a suitable format back to my VB.NET code.
I keep getting the error pInvoke Restriction:Can't return a variant.
Is there away to convert possibly the variant to a char array, and return the array back to the vb.NET GUI?
The code I have is as follows :
extern "C" __declspec(dllexport) VARIANT __cdecl getDevice()
{
hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL,
CLSCTX_INPROC_SERVER, IID_ICreateDevEnum,
reinterpret_cast<void**>(&pDevEnum));
if (SUCCEEDED(hr))
{
hr = pDevEnum->CreateClassEnumerator(
CLSID_VideoInputDeviceCategory,
&pEnum, 0);
}
while (pEnum->Next(1, &pMoniker, NULL) == S_OK)
{
IPropertyBag *pPropBag;
hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag,
(void**)(&pPropBag));
if (FAILED(hr))
{
pMoniker->Release();
continue;
}
extern VARIANT varName;
VariantInit(&varName);
hr = pPropBag->Read(L"FriendlyName", &varName, 0);
pPropBag->Release();
pMoniker->Release();
}
return varName;
}
Any feedback would be greatly appreciated
Cheers
Boyindie
|
|
|
|
|
hi,,,,,
I have Pixel information for all letters in one Font(xxxxx Font).
I want to make BITMAP FONT using pixel information....
How can i move forward!!!!!!
Any sugestions!!!
Thank u....
|
|
|
|
|
|
How? =/
I'd appreciate a tut or an article...
Fratelli
|
|
|
|
|
|
Sorry about the delay in the response, but I didn't receive an e-mail notification of your reply. What I'd like to know is a way to profile C++ code using VS 2005.. Can't find a nice tutorial =)
Best regards
Fratelli
|
|
|
|
|
How to connect sql server using ODBC in a MFC application?
Sql server is on the another computer in the same LAN.
|
|
|
|
|
|
Hi, thank you for helping me!
I have visited the website.
The string "Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;" is useful.
I tried , I got it
thank you ...
|
|
|
|
|
|
|
Hello,
I am working with Visual C++ 6.0
I know how to spawn an external program from my c++ app.
What I am trying to figure out how to do is this:
1. MyApp calls testprog.exe
2. testprog.exe does it's thing while MyApp waits
3. when testprog.exe is FINISHED, it will return a value
4. MyApp should then do something useful based on that value
So, in a nutshell, my program needs to call an external program (which I can do), wait for it to finish, and then do something useful with the value returned by the spawned program. I am having trouble figuring out exactly HOW I can get the spwaned program's ACTUAL return value (not the value returned because the program was started successfully.
Trying to clarify more:
1. Start MyApp
2. MyApp calls TestProg
3. TestProg is finished
4. Return value from TestProg is (DWORD)0xe0018d06
5. *PROBLEM HERE* MyApp needs to retrieve (DWORD)0xe0018d06 that was returned by TestProg, then resume execution and perform actions based on whether TestProg returned (DWORD)0xe0018d06 or 0x00000000
Any help would be IMMENSELY appreciated!
Thanks in advance!
-Steve
|
|
|
|
|
You may use CreateProcess to start TestProg and then WaitForSingleObject on TestProg handle.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|