|
|
|
|
- Presentación
- Abrir y reproducir un vídeo en una control Imagen
- Abrir un archivo de vídeo
- Reproducción de un archivo de vídeo
- Pausar o detener el vídeo
- Detener el vídeo
- detenerse
- Control del volumen
Reproducción de un vídeo con las funciones MCI
Las funciones MCI se utilizan para facilitar los archivos multimedia de manipular. Esta ayuda Page presenta las diferentes operaciones que pueden realizar las funciones MCI. Para manipular fácilmente un video en WINDEV, todo lo que tienes que hacer es usar un control Imagen. Se pueden realizar las siguientes operaciones: - Abre y reproduce un video en un control Imagen,
- Haga una pausa o detenga el video,
- control el volumen.
Abrir y reproducir un vídeo en una control Imagen Abrir un archivo de vídeo Para abrir un archivo de vídeo, basta con llamar a MCIOpen. La mayoría de los archivos de vídeo pueden ser manejados por las funciones MCI. Ejemplo: // Select the video file sFile is string sFile = fSelect(EDT_FILE, "Select a video file...",... "Video files (*.avi)"+ TAB + "*.avi" + CR + ... "MPEG video files (*.mpg)" + TAB + "*.mpg" + CR + ... "Quick Time files (*.mov)" + TAB + "*.mov" + CR + ... "All files (*.*)" + TAB + "*.*", ... "*", fselOpen + fselExist) // If a file was selected IF sFile <> "" THEN EDT_FILE = sFile // Close the previous Video file if there is one // No action otherwise MCIClose("MyVideo") // Open the selected Video file // "MyVideo" is the logical name (alias) chosen arbitrarily // this name will be used to handle the file thereafter // IMG_VIDEO is the Image control where the video will be displayed MCIOpen(EDT_FILE, "MyVideo", MciStyleChild, IMG_VIDEO) // If the opening failed IF ErrorOccurred = True THEN // Display the status report Error(ErrorInfo()) END END
Reproducción de un archivo de vídeo Para reproducir un archivo de vídeo, basta con utilizar MCIPlay. // Play the selected video // Reminder: "MyVideo" is the logical name chosen for this file when it is opened MCIPlay("MyVideo") Observación: Para reproducir el vídeo (tipo AVI) en bucle, utilice MCIEjecutar y especifique "reproducir repetición AVI" en el comando Line: // Play the AVI video in loop MCIExécute("play AVI repeat")
Pausar o detener el vídeo Detener el vídeo Para pausar el vídeo, basta con llamar a MCIPause. // Pause the selected video // Reminder: "MyVideo" is the logical name chosen for this file when it is opened MCIPause("MyVideo") detenerse // Stop the selected video // Reminder: "MyVideo" is the logical name chosen for this file when it is opened MCIStopPlaying("MyVideo") Consejo: No olvides reposicionar el vídeo al principio del archivo. Por lo tanto, el vídeo comenzará desde el principio la próxima vez que se reproduzca. // Reposition at the beginning of the file // When the user asks to read the file again, the read operation will start from the beginning MCIBegining("MyVideo")
Para control el volumen, basta con llamar a Volumen de MCI. El volumen derecho, el volumen izquierdo, el volumen de los agudos y el volumen de los graves se pueden subir y bajar.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|