Visual C++ :: Video Player - Set Of RGB Frames To Be Displayed At 25 FPS

Nov 19, 2013

I have a code which is a set of rgb frames to be displayed at 25 fps to make it look like a video. While I createWindow invalidate and update it based on a timer, the video plays fine, but the buttons of Play, Pause etc hangs during the time video is playing.?

View 11 Replies


ADVERTISEMENT

Visual C++ :: Can Only Make Video With 255 Frames

May 4, 2015

I have code (found long time ago, ~2001) to make videos from OpenGL rendering in my view class. In my OnDraw() function I call the function SaveAsAvi(). This works as intended until I have 255 frames in the movie I am trying to make. After that, Windows Media Player claims it cannot play the file. VirtualDub claims the avi contains Palette Changes and shows the correct number of frames (>255) but all frames past 255 are the same and equal to the last frame.

Memory overflow? Need to free m_pixels sometime somewhere?

Code:
void C***View::SaveAsAvi() {
C***Doc* pDoc = GetDocument();
if (pDoc->m_avi_status == -1)// initialize AVI stuff {
KillTimer(1);
// allocate space for the pixel info

[Code] ....

View 1 Replies View Related

Visual C++ :: Playing Video Using Windows Media Player From A Buffer?

Oct 25, 2013

I am developing a VC++ application with windows media player component. play video from a video buffer data which i have?

View 2 Replies View Related

C# :: Playing Video Without Windows Media Player?

Mar 26, 2014

I try to play a video I i don't know how.. I searched and i found some tips and articles, but all of it if about Windows Media Player. It's fine, but i need to play something lika an intro an i don't wanna show all that buttons of WMP.. I tried to hide it but no change.

View 2 Replies View Related

Visual C++ :: How To Determine If A Metro App Is Currently Displayed On The Screen

Apr 22, 2014

I'm trying to determine (from my Win32 process) if a Metro (or a Modern UI) app is currently displayed on the screen. I found the IAppVisibility::GetAppVisibilityOnMonitor method that can do just that, and I even found a C++ sample, but my issue is that I'm compiling it with the Visual Studio 2008 that does not have the definitions for the IAppVisibility interface, so the following:

Code:
#include <Shobjidl.h> //Earlier version
IAppVisibility* pAppVis = NULL;
HRESULT hr = CoCreateInstance(CLSID_AppVisibility, NULL, CLSCTX_INPROC_SERVER,
IID_IAppVisibility, (void**) &pAppVis);

Results in a set of errors:

Code:
error C2065: 'IAppVisibility' : undeclared identifier
error C2065: 'IID_IAppVisibility' : undeclared identifier

how to define them?

View 4 Replies View Related

Visual C++ :: Number Of Players - Making Score Stay With Each Player

Oct 21, 2013

I am writing a game that is 2 to 4 players. i am wondering how to ask how many players, and make the score stay with each player. it is a rip off of zombie dice, this is what i have so far the playerScore array is to hold the score for each player and the turn array is hold hold the values that they rolled that turn, i also dont know how to clear out the turn array when it goes to the next player.

#include <iostream>
#include <cstdlib>
#include <cmath>
#include <ctime>
using namespace std;
int main() {
int playerScore[4];

[Code] ....

View 3 Replies View Related

Visual C++ :: Getting Slider With Number Displayed Inside Slider?

Oct 23, 2012

I need a slider with number displayed inside the slider. Slider thumb or number should be moved and finally i need to fetch the value where the slider thumb is placed. I had attached the image of slider which i required.

[URL]

View 4 Replies View Related

Visual C++ :: Slider Not Incrementing With Video?

Jun 15, 2013

I am using DirectShow to play/pause/stop a video file. I am having a slider control which increments with the playing video. I have done some calculation to find the exact step to forward or backward the video.

On dragging the slider to any position, video forwards/backwards to the new position, but slider doesn't get increment. Say I drag the slider from 10 to 50, video goes to the new position, but on releasing the capture slider again jumps back to the previous position from where it was dragged.

View 2 Replies View Related

Visual C++ :: ActiveX For Video Server

Jan 13, 2015

I would like to know in which way is the best to make ActiveX control for video. ActiveX control will need at least show picture and be able to go back in past, change resulation of picture and similar. How complex it is to do something like that? Is MFC best way to make it? Is there somewhere similar code?

View 2 Replies View Related

Visual C++ :: How To Implement HD Video Recording Using DirectShow

Jun 19, 2013

I am using DirectShow to Play / Pause / Stop and Capture Video files. But Capturing and playing of video files is simple. I want to Implement HD Video recording in my project.

how to Implement HD Video Capturing using DirectShow.?

Or Apart from DirectShow, is there any other method to Implement HD Video recording in MFC.

View 6 Replies View Related

Visual C++ :: How To Detect If Window Media Player Is Running In Full Screen Mode

Jan 21, 2013

How can I check if window media player is running in full screen mode & topmost in c++ MFC?

What I used is this logic:

I compared media player full screen coordinates to that of monitor coordinates.If they are same implies media player is in fullscreen.But it has one flaw.Whenever there are control(for play,pause) displayed in full screen in media player, coordinates are not coming same as that of monitor.

View 10 Replies View Related

Visual C++ :: How To Capture HD Video (no Noise / Interference) Using DirectX / DirectShow

Nov 21, 2012

I am working on a project in which we capture a video using DirectShow samples. I want to know whether it is possible to capture a video with No noise, No interference etc. in other words, we want to capture High Quality (HD) video using DirectShow.

Is there any sample defined in DirectShow using which we can capture HD video.

View 4 Replies View Related

Visual C++ :: How To Move Video Forward / Backward When User Drags Slider Bar

Jun 11, 2013

I am working on a project in which I use DirectShow to Play / Pause / Stop the video. I am using slider bar to show the progress of the video. As the video starts playing, the slider bar moves in proportion to the video duration. Now when user moves/drags the slider bar to a new position, I want to forward the video in equivalent proportion.

Say if video duration is 50 seconds and max range of the slider bar is set to 100. slider will 2 steps for 1 second of video progress. Now if user drags the slider to 60 while video is playing, I want to increment/forward the video. if user moves the slider backward, video should move backward.

I have done with the slider moving along with the video and when user drags the slider. How to set the new position of the video, so that the video starts playing from that point.

View 4 Replies View Related

Visual C++ :: Open Large Files - Save Video As Long As Users Have Space In Hard Disk

Jan 15, 2013

Opening large files in c++. In my application, i am trying to save video as long as users have space in harddisk. What I am trying to do is when user is recording video i am trying to append the video data in to the file. The problem is that every time file size reach over 2GB my software crashes.

View 5 Replies View Related

C++ :: Initialization Of Frames Variable

Jan 19, 2015

I tried to initialize the frames variable but when I go to debug it, it just gives me 30 errors compared to the one error when I don't initialize the frames variable.

#include "Gfx.h" // general gfx lib I made for SDL
#include "Input.h"
#include "General.h"
#include "Sprite.h"
#define screenw 620
#define screenh 480

/** CHARS ARE DONE */
//int mousex; int mousey; int mouseon = 0;
//int red = 0; int green = 0; int blue = 0;

[Code] ....

View 4 Replies View Related

C++ :: Dispatch Message Taking Frames Away While Moving Window

Oct 29, 2014

lets start with the code:

while(run)
{
if (PeekMessage(&msg, win->win_handle,0,0,PM_REMOVE))
{

[Code]......

I have created a basic window and i discovered that while resizing or moving my windows, the myframe() don't get any calls at all.

Is there anyway possible that myframe gets at least someof the calls while those things are happening

View 1 Replies View Related

C/C++ :: Implementing Program That Sends And Receives Raw Ethernet Frames

Apr 15, 2013

I am fairly new to the topic of the ethernet and the data link layer and I am trying to write a C program which allows the sending and receiving of ethernet frames.

I am trying to have my program send the ethernet frame to myself, so the program will have the same source and destination mac addresses.

The program that I'm using is a modified version of the code from [URL] ....

I keep having trouble with the recvfrom() function, it seems to just be blocking and the program doesn't terminate. From the code, I am trying send the ethernet frame and have the recvfrom() function be able to retrieve the frame and store it in a buffer. But because recvfrom() function is just blocking, it seems to me that the sendto() function was not able to successfully send the frame.

Here is my code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>    /* Must precede if*.h */
#include <linux/if.h>
#include <linux/if_ether.h>

[Code] ....

This is on a linux machine ....

View 2 Replies View Related

C++ :: Cout Not Displayed After While Loop

Sep 7, 2014

Am having a problem with the following program not displaying the cout after the while loop, it doesn't ask if I want to enter another employee but just prompts for the employee payrate again.

#include <iostream>
using namespace std;
int main()
// Parameters: None
// Returns: Zero
// Calls: None

[Code] ....

View 1 Replies View Related

C++ :: Data Is Not Being Displayed In Text Box?

Oct 22, 2013

why my data is not being displayed in my text box. I have no compiling errors and it seems as if my program isnt doing anything.

Here is my code:

#include <fstream>
#include <iostream>
#include <iomanip>
#include <string>

[Code].....

View 4 Replies View Related

C/C++ :: How To Give A Color To The Text That Displayed In Output Screen

Jan 27, 2013

i am using c++v30.5 version i want red color text in in my output screen . i viewed various site but the result is 0 ,wat to do?

View 2 Replies View Related

C++ :: Allow User To Select Repeatedly Operation To Be Performed From Displayed Menu Of Actions

May 1, 2013

Write a user-friendly C++ program that allows a user to select repeatedly an operation to be performed from a displayed menu of actions. The menu includes the following items:

1. Simple Statistics
2. Vector Addition
3. Dot Product
4. Exit

The menu actions are described by the following points:

Simple Statistics: This action includes finding the average, and standard deviation of a list of data items. The option should allow the user to specify the name of a file from which the data are read into an array. All the results of this option are displayed on the screen.

Vector Addition: This action allows the user to enter the name of a file from which two vectors, V1 and V2, of equal size N are read. Accordingly, the two vectors are added, and displayed along with the resultant vector on the screen. Your program should check that the two added vectors are of the same size. Otherwise, the program should display a message and allow the user to make another choice from the menu.

Dot Product: This action is similar to the Vector Addition in terms of input, output, and checking validity of the vector operands.

Exit: This action terminates the program.

Your program should include at least the following functions:

1. A function, called ReadVector(), which reads a vector of any size from a given file name, and returns the vector and its size to the caller. The function prototype is defined as follows:

void ReadVector(double V[], int &size, ifstream infile);

2. A function, called DisplayMenu(), which displays the menu and returns the user’s choice as an integer value between 1 and 4. The function prototype is defined as follows:
int DisplayMenu (void);

3. A function, called VectorAdd(), which performs the addition of two vectors, A and B, and returns the resultant vector, C. The function prototype is defined as follows:

void VectorAdd(const double A[], const double B[], double C[], int size);
The sum of two vectors, A = (a1, a2, …, an) and B = (b1, b2, …, bn) of size n, is defined as: C = A + B.
Where, C = (c1, c2, …, cn), and ci = ai + bi, for1 i n .

4. A function, called DotProduct(), which performs the dot product of two vectors, A and B, and returns the result. The function prototype is defined as follows:

void DotProduct(const double A[], const double B[], int size, double &result);
The dot-product of two vectors A = (a1, a2, …, an) and B = (b1, b2, …, bn) of size n is defined as
n n
n
i
i i b a ....... b a b a b a B . A  
1 1 2 2
1

5. A function, called Simple_Stat(), which finds the maximum, minimum, average, and standard deviation of a list of data items passed to it by a one-dimensional array. The function returns the average and standard deviation values. The function prototype is defined as follows:

void Simple_Stat(const double list[], int size, double &average, double
&std_dev);

View 1 Replies View Related

C++ :: Simple AI That Follows Player

Apr 10, 2014

I'm having some problems with implementing an AI. It should be just a simple AI that follows player. Here is the code that I got so far:

(float)DirectionX = Circle->GetX() - AI->GetX();
(float)DirectionY = Circle->GetY() - AI->GetY();

(float)Hyp = sqrt(DirectionX * DirectionX + DirectionY * DirectionY);

DirectionX /= Hyp;
DirectionY /= Hyp;

x += DirectionX * 3;
y += DirectionY * 3;

This is what I got so far. It creates a vector in a direction I want to move, then just normalizes the vector. Simple as that. But I'm having 2 problems..

AI moves towards player only when Im at like the end of screen and the AI is on the other side, I must keep a certain distance for it to be able to move towards me. Basically, its not constantly moving towards the player. I also tried it with trig, using atan2 for angle and sin / cos for speed. Also didn't work, same result.

The other problem is when I want to add i.e 5 more AIs. For each new AI it creates, it makes a new update.. So, to kinda clear it up. If I'm in middle of the screen and an AI is spawned above me, it will move towards me. But when after that one, 2nd AI spawns beneath me, both 1st and 2nd AI move up. Basically, previous AIs take the update from last one that is created. For updating I'm using lists, objects and iters.

View 3 Replies View Related

C# :: Three And Four Player Uno Game

Feb 26, 2015

I'm having some problems figuring out 3 and 4 player games in an Uno game I'm working on. I'm not sure what specifically the problem is, however. I've tried everything I can think of; I'm at a loss for what to do next. Two player games work perfectly, which makes the nonfunctional 3 and 4 player games seem odd to me. Here is the code:

public void MoveOpponents() {
if (nextPlayer == 0) {
if (Main.dir == Direction.Clockwise) nextPlayer = 1;
else nextPlayer = numPlayers - 1;

[Code] .....

The code for the human player is in Update(), but I won't show that because it's actually quite similar to the above code.

Right now what it's doing is jumping all over the place, making opponent 2 play before opponent 1, then I play, then opponent 1 plays. Then I play again. It's really messed up.

View 6 Replies View Related

C++ :: Giving Score To Correct Player

Jul 22, 2013

I have programmed a game where you guess a number (1-6) and if the number is equal to the random number then give the player score + 10. But if I have selected for example 4 players then if the game will give player 1 a score it gives player 2 a score instead? What can be causing this error?

Code:
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int cube;
int number[4];

[Code] .....

View 6 Replies View Related

C++ :: How To Make Minimax Multi Player

Nov 29, 2013

I have pseudo code for the minimax algorithm but i was wondering what i would need to add to make it work with many players (n players)?

score minimax(state s, int n)
if (n = 0 OR s is a terminal node) {
if win position for program
return +inf;
if loss position for prg

[Code] ....

View 3 Replies View Related

C++ ::  SDL2 / Player Not Moving Constantly

Feb 16, 2015

Im using SDL2 but I'm encountering an unexpected error. I have implemented the same method to move as in my old Projects, but the Player appears to be stuck...

The Player is stuck for maybe half a second, and then everything works as it should, but every time I Change direction or i start moving the Player is stuck for a short Moment.

#ifndef _PLAYER_HPP_
#define _PLAYER_HPP_
#include <iostream>
#include <string>
#include "SDLGameObject.hpp"
class CPlayer : public CSDLGameObject

[code]....

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved