Click here to Skip to main content
15,895,827 members
Articles / Desktop Programming / MFC

DirectShow Editing Services (DES) and combining AVI files

Rate me:
Please Sign up or sign in to vote.
4.64/5 (4 votes)
9 Sep 2011CPOL5 min read 35.9K   5.8K   12  
A sample C++ project that uses DES to combine two or more AVI files.
#pragma once

#include <afxwin.h>
#include <afxcmn.h>

#ifndef _DEQUE_
#include <deque>
#endif
#ifndef _MEMORY_
#include <memory>
#endif

#ifndef c_DESCombine_h
#include <DESCombine.h>
#endif
#ifndef c_MyCallback_h
#include <MyCallback.h>
#endif

/*
	=====================================================================
	=====================================================================
	CDESCombineTestDlg
	=====================================================================
	=====================================================================
*/
class CDESCombineTestDlg : public CDialog
{
	DECLARE_MESSAGE_MAP()

public:
	typedef std::deque< std::wstring > FileSelection;

public:
	CDESCombineTestDlg(CWnd* pParent = NULL);	// standard constructor
	~CDESCombineTestDlg();

	enum { IDD = IDD_DESCOMBINETEST_DIALOG };

	void initialize( const CString& outputFilename );

	// event handlers
	afx_msg void OnBnClicked_Add();
	afx_msg void OnBnClicked_Browse();
	afx_msg void OnBnClicked_CombineFiles();
	afx_msg void OnBnClicked_Delete();
	afx_msg void OnBnClicked_Preview();
	afx_msg void OnBnClicked_ToAVI();

protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);

private:
	void _selectInputFiles( FileSelection& fileSelection );
	void _updateControls();
	void _updateData();
	void _updateFileListBox();

private:
	CButton c_Add;
	CButton c_Delete;
	CListBox c_files;
	CButton c_Preview;
	CEdit c_OutputFilename;
	CButton c_Browse;
	CButton c_ShowXML;
	CButton c_CombineFiles;

	int _xRenderMethod;
	CString _outputFilename;
	BOOL _showXML;

	DESCombineLib::InputFiles _inputFiles;
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Retired
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions