Sound and Video in win32 api application

This is a discussion on Sound and Video in win32 api application within the C++ Programming forums, part of the General Programming Boards category; hi i m creating a simple chatting application using dev cpp i intend to develop and add voice chat and ...

  1. #1
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19

    Question Sound and Video in win32 api application

    hi
    i m creating a simple chatting application using dev cpp
    i intend to develop and add voice chat and video chat functionality to my application
    I m only a beginner but i try n learn fast.... i need to know a few things...
    1. Any leads on where to start....?
    2. How is this done usually (at a professional level)?
    3 Are there win32 api (not mfc or nythin else) libraries to do the above and if yes wt r they?
    4. if answer to 3 is no then whats the best external libs to do the same....?
    It will be a huge help if i could get these questions answered...
    thannx a lot for ur patience....

  2. #2
    Registered User
    Join Date
    Nov 2007
    Posts
    164
    I don't really know about these things. They are too much advanced stuff

    But I believe you'll have to use VoIP protocols and stuff. Google it, I'm sure you'll find helpful stuff

  3. #3
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19

    Talking tx

    tx manzoor
    Any way to do it without actually implementing a VoIP protocol.....
    some thing like basic audio stream-->buffer-->network buffer-->send.....??
    wanna do it frm the scratch actually...... mayb if someone has some idea of RTP(real time protocol)..?
    also i heard abt allegro and fmod..... will they help in this particular application...?

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,616
    1) Learn C++ first. A good book, such as Accelerated C++ is a good start.
    3) Yes. Win32 GUI Programming. Then there are Sockets programming. They are all C, though. You can perhaps find some external C++ library. For GUI, there is for example wxWidgets, which is free. Boost is another great source of many C++ libraries.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19

    Smile

    elysia..
    umm
    to get started i meant to get started with sound libraries..... c++ is no stranger to me...
    network part in c tcp/ip sock prog is easy i can handle that.....its the sound n vid part thats got me stumped.....
    wxwidget is a nice suggestion.....m checking it out now....but still doent solve prob..... mlookin for win32 API functions.....not external libraries if possible.....
    thanxx a lot fr ur interest........
    keep up the gud stuff

    PS cool sig.... :P

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,616
    Okay then. MSDN is your source for anything and everything Win32 related. If Win32 is what you really want to use.
    (I'd recommend external C++-written libraries, however, if you can find and use them, since they would be much easier to use.)
    And Win32 has little in terms of sound. But it has the mm - multimedia system.
    Also, for Vista, they invented a new technology for audio/video to replace DirectShow. Don't know exactly what it's called, but it might be worth checking out if you want to play sound and stuff.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19

    Angry

    thanx a lot elysia....
    mmm check this out Audio and Video
    i need something real fast for real time so il stick to core api....
    il try this and post code when im done.....
    i think this oughta work..


    why do we have to sleep? :x

  8. #8
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by hackterr View Post
    hi
    i m creating a simple chatting application using dev cpp
    i intend to develop and add voice chat and video chat functionality to my application
    I m only a beginner but i try n learn fast.... i need to know a few things...
    1. Any leads on where to start....?
    2. How is this done usually (at a professional level)?
    3 Are there win32 api (not mfc or nythin else) libraries to do the above and if yes wt r they?
    4. if answer to 3 is no then whats the best external libs to do the same....?
    It will be a huge help if i could get these questions answered...
    thannx a lot for ur patience....
    DirectSound, DirectShow, WinSock. You will need all 3 plus Direct3D, OpenGL, or GDI for the graphics display.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  9. #9
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,616
    Scratch GDI. It's bad. Direct2D instead if you're on Win7, or in the coming future, Vista.
    And why do we have to sleep? According to scientists, it's because the brain needs to rewire itself to accommodate everything from while we're awake. When we're awake, the brain collects information and is too busy to rewire itself. That's how I understand it anyway.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19
    thanx abachler,elysia
    goin to use directshow with opengl...... nybody know how to use glut.....?
    documentation's goin over my head............

  11. #11
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19
    take a look at this CodeProject: Capture Live Video from various Video Devices.. Free source code and programming help
    uses older directx 9.0 sdk but wrks fine......
    Its 5.50 a.m. Do you know where your stack pointer is?

  12. #12
    Professional Chef leeor_net's Avatar
    Join Date
    Apr 2004
    Location
    Charles Town, WV
    Posts
    147
    Quote Originally Posted by Elysia View Post
    Scratch GDI. It's bad. Direct2D instead if you're on Win7, or in the coming future, Vista.
    And why do we have to sleep? According to scientists, it's because the brain needs to rewire itself to accommodate everything from while we're awake. When we're awake, the brain collects information and is too busy to rewire itself. That's how I understand it anyway.
    Direct2D no longer exists and is instead emulated through Direct3D functions (although if you want to get technical you could say that it does exist because it's emulated through Direct3D functions).

    GDI is surprisingly fast on Vista/Win7 machines. Not exactly what I would choose for a game but good if you don't want to link a program with DirectX and need it in GUI Applications.

    Anyway, as far as getting sound, it's is pretty straight forward except that you're going to need compression methods if you want to have any chance of seeing network performance. That means an encoder/decoder. It could be as simple as using a basic ZIP algorithim to compress sound packets, pack them up and send them on their way but youd be better off using an open-source solution like Speex to do that for you. As far as I know Windows does not provide such API's within its core libraries.

    Same thing with video. You'll need to be able to encode the video into something that can be easily and quickly sent and can be done on-the-fly from a video recording device. As with sound, I'm not sure Windows API's provide any of that as it's very specific but meh, I'm no expert on video compression methods or the Windows API. I try to stick with cross-platform solutions.

    Good luck!
    - Leeor

  13. #13
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,616
    You obviously haven't heard of the new Direct2D introduced with Win7. It's coming to Vista, too. State of the art, fast 2D API.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19

    Thumbs up

    Tx guys......compression is a must for on the fly stuff.....
    i hv sm pretty good algos fr that....mostly self written.....
    for sending huge sensor data....but i think il have to rewrite them for sound and video.......
    My apps coming out great....... i hv got the cam preview and also the audio capture working....... lets see if i can transmit it now.........
    again ...thanx a lot .....
    Its 5.50 a.m. Do you know where your stack pointer is?

  15. #15
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    You obviously haven't heard of the new Direct2D introduced with Win7. It's coming to Vista, too. State of the art, fast 2D API.
    I believe this has been changed because it was the primary slow-down in Vista.

    For sound, OpenAL is an easy to use library that can do most of what you will need.
    For graphics you can use OpenGL or D3D or any higher level engine that uses these.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem With My Box
    By HaVoX in forum Tech Board
    Replies: 9
    Last Post: 10-15-2005, 07:38 AM
  2. MSVC++ allegro tutorial
    By bobish in forum Game Programming
    Replies: 5
    Last Post: 02-13-2002, 03:11 PM
  3. FAQ: MSVC++ allegro tutorial
    By bobish in forum FAQ Board
    Replies: 3
    Last Post: 02-09-2002, 06:48 PM
  4. Allegro tutorials
    By valar_king in forum Game Programming
    Replies: 6
    Last Post: 12-27-2001, 11:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21