Solved

Use mmio to handle multiple files played by MCI?

Posted on 1997-07-31
3
211 Views
Last Modified: 2013-12-03
Hi,
  I try to play video from a CDrom using MCI commands, Under VC++4.2 and Win95. I know the MCI driver I have uses mmio functions to read data. My question is, since there are more than one video file in a disk(like a Video CD), how I can play video seamlessly? I know I need to define my own mmio procedure(mmioProc), but does one mmioProc only refers to one opened mmio file? Because the handle is in the MMIOINFO. In order to handle multiple file, which is the right approch?
a. detecting the end of file, close mmio then open the next file. I think it's too slow.
b. open all video files, each has its own handle, while changing file, assign the new handle to MMIOINFO, then call mmioProc.
c. other method. Please do tell me more.
I am a newbie in this area, please help.
0
Comment
Question by:danli020797
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
vinniew earned 100 total points
ID: 1402557
b. is the correct answer as long as you are not talking about an obscene number of video files.


0
 

Author Comment

by:danli020797
ID: 1402558
One more thing. Do you think this will work in terms of seamless playing? Since the only way I can detect the end of the file is either setup a multimedia timer or notify by MCI, I don't want the user to notify any difference while playing between two files. Do you know any other way to accomplish that. Also if I open all file at once( as many as about 100), will that take lost of resources?
Thank you
0
 
LVL 3

Expert Comment

by:vinniew
ID: 1402559
If you buffer things correctly, you shouldn't have any problems opening that many files.  If you have the time to program, however, I would think about just keeping 3 or 4 open at once.  Then you could just start a thread to open up another one while you were playing.

In regards to detecting the end of the file:

1. Keep a counter of how many records you've read.
2. Determine from file size how many records are possible.
3. compare


In regards to resources opening a file:

1. If you use CFile, expect to use about 1K per open request
2. If you use FILE*, expect to use about 100 bytes.
3. In either case, you should have plenty of room.

Hasta,

V

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Does Microsoft Office 2016 support COM/ActiveX? 3 129
Problem to file 3 92
Is IHttpActionResult a promise pattern? 2 74
What .NET website keeps me current? 9 80
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question