Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1472 connectés 

  FORUM HardWare.fr
  Programmation

  Movie player en c++ Help.

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Movie player en c++ Help.

n°143792
xinoef
For Adun !
Posté le 24-05-2002 à 11:24:33  profilanswer
 

Bonjour, je souhaiterai mettre dans un programme une vidéo d'intro, donc pouvoir lire un fichier video au démarage.
Quel est d'après vous le moyen le plus facile d'y arriver ?
Merci.


---------------
/* Toblerone is so gooooood 4 U */
mood
Publicité
Posté le 24-05-2002 à 11:24:33  profilanswer
 

n°143913
LetoII
Le dormeur doit se réveiller
Posté le 24-05-2002 à 13:53:27  profilanswer
 

Tu veux l'afficher comment exactement?


---------------
Le Tyran
n°143935
xinoef
For Adun !
Posté le 24-05-2002 à 14:13:13  profilanswer
 

Ben je veux mettre ma video en plein écran. Une intro quoi, comme dans quake, ou unreal , avec des images et du son...

n°144086
LetoII
Le dormeur doit se réveiller
Posté le 24-05-2002 à 15:47:29  profilanswer
 

Faut que tu passe par direct x alors. Jette un coup d'oeuil dans la doc normalement c prévu tu peux jouer des avi directement dans une surface direct draw (enfin me semble ça fait longtemps que j'ai pas fourré mon nez là dedans :D )


---------------
Le Tyran
n°144103
LetoII
Le dormeur doit se réveiller
Posté le 24-05-2002 à 15:55:18  profilanswer
 

Si non tu peux aussi passer par le controle activex du windows media player mais ça me parait moins aproprié


---------------
Le Tyran
n°144117
H4dd3R
Q2
Posté le 24-05-2002 à 15:58:58  profilanswer
 

Cherche ds les tutoriaux de dshow pour la décompression de la vidéo (avi file, recompressing an.. et links par la suite).
Par contre pour faire du plein écran je sais pas trop si c possible simplement avec dshow, ou si tu vas devoir définir une surface ddraw.. :)


---------------
Athlon64 s754 10*200MHz - R9800Pro - 512MB DDR200MHz - ZX6RR - Q2[SupOp] - Tutorial Video: multilangues, multisstitres
n°144127
youdontcar​e
Posté le 24-05-2002 à 16:04:28  profilanswer
 

letoII a écrit a écrit :

Si non tu peux aussi passer par le controle activex du windows media player mais ça me parait moins aproprié


ça me paraît au contraire plus approprié. s'il utilise les mfc, ça se rajoute en qq minutes.

n°144179
xinoef
For Adun !
Posté le 24-05-2002 à 16:48:19  profilanswer
 

D'accord, merci pour ces premiers conseil, maintenant je vais jouer le lourd : 1 c'est koi les mfc ?
2 Z'auriez pas qulques petits liens sympatoches pour trouver des tutoriels adaptés ?
Merci :jap:


---------------
/* Toblerone is so gooooood 4 U */
n°144260
LetoII
Le dormeur doit se réveiller
Posté le 24-05-2002 à 18:51:59  profilanswer
 

msdn.microsoft.com :D
 
www.google.fr
 
Désolé, pas un grand connaisseur en tutoriel :)
(tante www.developpez.com)


---------------
Le Tyran
n°144396
HelloWorld
Salut tout le monde!
Posté le 24-05-2002 à 22:57:03  profilanswer
 

Y'a la classe ANIMATE_CLASS en win32 mais bon t'as pas le son ... et c'est vraiment le truc de base.
Apres y'a aussi les truc mmedia.
Tiens, copier coller du code donné en exemple (mmedia.hlp)
 

Code :
  1. The following example shows how to use the MCI_OPEN command to set a parent window and create a child of that window.
  2. MCI_DGV_OPEN_PARMS    mciOpen; 
  3. mciOpen.lpstrElementName = lpstrFile;  // Set the filename.
  4. mciOpen.dwStyle = WS_CHILD;            // Set the style.  
  5. mciOpen.hWndParent = hWnd;             // Give a window handle.  
  6. if (mciSendCommand(0, MCI_OPEN,
  7.    (DWORD)(MCI_OPEN_ELEMENT|MCI_DGV_OPEN_PARENT|MCI_DGV_OPEN),
  8.    (DWORD)(LPSTR)&mciOpen) == 0)
  9. {
  10.     // Open operation is successful. Continue.  
  11. }
  12. The following example finds the dimensions needed to play an AVI file, creates a window corresponding to that size, and plays the file in the window by using the MCIAVI driver.
  13. HWND hwnd; 
  14. MCI_DGV_RECT_PARMS mciRect;
  15. // Get the movie dimensions with MCI_WHERE.  
  16. mciSendCommand(wDeviceID, MCI_WHERE, MCI_DGV_WHERE_SOURCE,
  17.     (DWORD)(LPSTR)&mciRect);
  18. // Create the playback window. Make it bigger for the border.  
  19. // Note that the right and bottom members of RECT structures in MCI  
  20. // are unusual; rc.right is set to the rectangle's width, and  
  21. // rc.bottom is set to the rectangle's height.
  22. hwndMovie = CreateWindow("mywindow", "Playback",
  23.     WS_CHILD|WS_BORDER, 0,0,
  24.     mciRect.rc.right+(2*GetSystemMetric(SM_CXBORDER)),
  25.     mciRect.rc.bottom+(2*GetSystemMetric(SM_CYBORDER)),
  26.     hwndParent, hInstApp, NULL);
  27. if (hwndMovie){
  28.     // Window created OK; make it the playback window.  
  29.     MCI_DGV_WINDOW_PARMS mciWindow;
  30.     mciWindow.hWnd = hwndMovie;
  31.     mciSendCommand(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND,
  32.         (DWORD)(LPSTR)&mciWindow);
  33. }
  34. Before using the mciSendCommand function to send the MCI_PLAY command, your application allocates the memory for the structure, initializes the members it will use, and sets the flags corresponding to the members used in the structure. (If your application does not set a flag for a structure member, MCI drivers ignore the member.) For example, the following example plays a movie from the starting position specified by dwFrom to the ending position specified by dwTo. (If either position is zero, the example is written so that the position is not used.)
  35. DWORD PlayMovie(WORD wDevID, DWORD dwFrom, DWORD dwTo) 
  36. {
  37.     MCI_DGV_PLAY_PARMS mciPlay;    // play parameters  
  38.     DWORD dwFlags = 0;
  39.     // Check dwFrom. If it is != 0 then set parameters and flags.  
  40.     if (dwFrom){
  41.         mciPlay.dwFrom = dwFrom; // set parameter  
  42.         dwFlags |= MCI_FROM;     // set flag to validate member  
  43.     }
  44.     // Check dwTo. If it is != 0 then set parameters and flags.  
  45.     if (dwTo){
  46.         mciPlay.dwTo = dwTo;    // set parameter  
  47.         dwFlags |= MCI_TO;      // set flag to validate member  
  48.     }
  49.     // Send the MCI_PLAY command and return the result.  
  50.     return mciSendCommand(wDevID, MCI_PLAY, dwFlags,
  51.        (DWORD)(LPVOID)&mciPlay);
  52. }


 
Ca semble bien plus complet ...
la suite sur www.google.com


---------------
FAQ fclc++ - FAQ C++ - C++ FAQ Lite

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  Movie player en c++ Help.

 

Sujets relatifs
att prbl un peu hors normes help ![PHP] help qqn peut-il me corriger mon expression régulière svp ?
[VC++] recuperation de counters HELP!!!!Code Javascript [Problème] >>Newbie inside need Help!!
<sys/socket.h> HELP*** Les interruptions en C *** HELP !!!
Help! Comment créer un ActiveX sous C++ Builder?linux, interruption et c : help !!
[ prog systeme Unix inside !] help !! mémoire partagée, je galère !Rich text box??? help
Plus de sujets relatifs à : Movie player en c++ Help.


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR