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


ADVERTISEMENT

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 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++ :: 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

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

Visual C++ :: Unable To Make Addon To IE

Dec 7, 2013

I am trying to make an add-on to IE. This add-on doesn't have any tool bar or any UI.

I am just taking the details of currently loaded HTML page. Basically it is for manipulating one dialog box. I want to get access to the DOM COM interfaces of the dialog box.

Since it doesn't have any button I didn't impliment IOleCommandTarget. I implemented only IObjectWithSIte.

My RGS file contain following in addition to my COM related entries

HKLM
{
NoRemove SOFTWARE
{
NoRemove Microsoft
{

[Code]...

But I couldn't see my add-on working or even not loading to IE.

View 4 Replies View Related

C++ :: Make Visual Studios Step Into A Function?

May 2, 2013

if there is a way to make Visual Studios step into a function while I am debugging.. I am trying to see the value of a certain int and making sure it is what I need it to be.. but whenever I use step into visual studios just skips right over the function and it does all the calculations..

View 4 Replies View Related

Visual C++ :: How To Make Icon For MSVC Project

Oct 22, 2013

I'm developing a software for Windows using MSVC 2010. My employer sent me 2 png files: 16x16 and 32x32 for the icons.

What I would like to do is to use them as a MSVC icon resource and don't use any code hacks. In the past all I had was an ico file and I just included it in the resource (rc) file for Visual Studio and that was it.

Now my question is: how do I make one ico file out of those 2 png files that will be accepted by MSVC? Is there a tool (preferably free) for it or some online service?

View 3 Replies View Related

Visual C++ :: How To Make Random Array To Not Repeat

Feb 17, 2013

Here is my code for a simple game. paste it and try it.

#include <iostream>
#include <string>
#include <ctime>
#include <cstdlib>
using namespace std;
int main (void) {
stringg[4],

[code]...

What they do (enter 4 actions)?

";
for (int ai = 0; ai < 4; ai++)
getline(cin, a[ai]);
cout << "

Where is happening (enter 4 locations)?

";
for (int li = 0; li < 4; li++)
getline(cin, l[li]);
for (int c = 0; c < 4; c++)
cout << g[rand() % 4] << " and " << b[rand() % 4] << " are " << a[rand() % 4] << " from a " << l[rand() % 4] << endl;
return (0);
}

At the end in the 4 lines some of the names, actions and locations repeat. How do I make them to not repeat and use every name that you will enter? do I need random_shuffle? How can I integrate it in my code?

View 1 Replies View Related

Visual C++ :: How To Make A Shape Outside Of Main Function

Sep 9, 2014

I know how to define a shape (here, a rectangle) and attach it to a window in C++ as follows:

Code:
#include <Simple_window.h>
void cir() { Circle c(Point(100,100),50); }
int main() {
Simple_window win(Point(100,100),600,400, "test");

[Code] ....

But how to define a shape (say a circle by that cir() function which is) outside of the main() function that is how to create a circle inside of the cir() function and it returns that circle when I called it in my main() function so that I can attach it on the window win to be visible?

View 14 Replies View Related

Visual C++ :: Can't Make Maze Work Correctly With Arrays

Apr 30, 2014

I have to make a maze with arrays, but i cant seem to move down or up or at all. Here is what I have so far

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

[Code].....

View 5 Replies View Related

Visual C++ :: Cross Platform Program - Make A Note Of Value Of PA

Nov 4, 2013

I'm working on a project which uses gtk+ and gtkmm. We use them in preference to MFC because the program needs to be cross-platform. For quite a long time, customers on OS-X and Linux have sometimes complained that the program would crash during shutdown but the Windows version (which I work on) never seemed to suffer. However, I'm now transferring my build environment to a new PC and I'm noticing the same shutdown crashes. It's a bit complicated so let me start with a small example:-

Code:
namespace Whatever {
class B {
public:
virtual ~B();
private:
int bb;

[Code] ....

Suppose I run the above program. When it stops at breakpoint #1 I make a note of the value of pA. Eventually the program reaches breakpoints #2 and #3. At each point my this pointer is exactly the same number. If the value of pA was 0x03604fb0, my this pointer is identical at both stages.

Now let's consider the real example:-

Code:
namespace Gtk {
class Widget {
public:
virtual ~Widget() {}

[Code] .....

Suppose I run the real example. At breakpoint #1 the value of pW is 0x03604fb0. But by the time I reach breakpoint #2 my this point is slightly different:- 0x03604fcc. It doesn't seem right to me and I'm wondering if it might be contributing to our shutdown crashes.

View 6 Replies View Related

C# :: Make Connection Between Access 2013 And Visual Studio 2010?

Mar 27, 2014

I want make connection between access 2013 and visual studio 2010(c#) but the error below is displaying

View 7 Replies View Related

Visual C++ :: Can't Make Double-buffered Painting With Multiple Monitors

Sep 19, 2012

I'm trying to remake my Windows screensaver written with C++ and WinAPIs to work on multiple monitors. I found this article that gives the basics. But when I implement it in my own code, I get a weird result. Take a look at this code:

Code:
case WM_PAINT: {
PAINTSTRUCT ps = {0};
HDC hdcE = BeginPaint(hWnd, &ps );
EnumDisplayMonitors(hdcE, NULL, MyPaintEnumProc, 0);
EndPaint(hWnd, &ps);

[code]....

Painting always works on a primary monitor. But when I paint to the secondary monitor, I can only paint directly to its DC. When I use double-buffering technique (with DIRECT_PAINT pre-processor directive commented out) I only get a black screen on a secondary monitor when it should've been red.

First one with direct painting that works:

and then the one that doesn't, with double-buffering technique:

View 12 Replies View Related

Visual C++ :: How To Make Bit Of Code Compatible With Both Debug And Release Builds

Aug 10, 2014

This code compiles in release mode but I get this compile error in debug mode:

Error1error C2664: 'GetPrivateProfileStringA' : cannot convert parameter 4 from 'wchar_t [255]' to 'LPSTR'g:easywebstoreuploaderini.cpp45

Code:
CString CIniFile::getKeyValue(CString strKey, CString strSection) {
wchar_t ac_Result[255];

// Get the info from the .ini file
m_lRetValue = GetPrivateProfileString(strSection, strKey, _T(""), ac_Result, 255, m_strFileName);

CString strResult(ac_Result);
return strResult;
}

View 3 Replies View Related

Visual C++ :: Creating Program To Make Sine Function Without Any Library Other Than Iostream?

Nov 10, 2012

My assignment is to create a C++ Program to find the sine of a number without any library other than iostream by using Taylor Series:

sin (x) = (x/1!) - (x^3/3!) + (x^5/5!) - (x^7/7!) + (x^9/9!) ...... (x^n/n!).

Here is what i have done till now:

#include <iostream>
double fact (int f); //declaration of factorial function
double power(double x, int y); //declaration of power function
double sin(int x); //declaration of sine function
//double cos(int x); //declaration of cosine function
//double tan(int x); //declaration of tangent function

[code]....

View 3 Replies View Related

Visual C++ :: Reverse Sentence - How To Make Program Non Case-sensitive Using Vectors

May 25, 2014

I had been tasked to create a program that reverses a word i.e.

cat
tac

How to make my program non case-sensitive using vectors?

Code:
// BackWardsSentence.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
string BackWords (string sentence);
int BackSentence (string sentence);
string BackWords1 (string sentence);

[Code] .....

View 2 Replies View Related

C++ :: Possible To Put Video In Game Using Allegro 5

Apr 5, 2014

is is possible to put a video in your c++ game using allegro 5?before starting the game................

View 1 Replies View Related

C++ :: Reading MPEG Video File

Oct 28, 2013

I have been working with video files and my task is open a video file, get it copied into another file and then changing into binary format. after getting few bits inverted, changing back it into ascii formats. Original video contains normal and extended ascii codes. Unfortunately, i got stuck at first step, whole video file is not being copied. i have written a piece of code that copies the whole word/ any text file but the video file is not fully copied as just 5KB out of 119,659 KB are copied.

Code: #include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[]) {
FILE *fp1,*fp2;
char c;
fp1 = fopen( "sample.mpg", "r") ;
fp2 = fopen("result.txt","w");

[Code] ....

View 9 Replies View Related







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