<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Video aus dem Speicher abspielen]]></title><description><![CDATA[<p>Hallo, ich habe mit CMemfile eine datei in den sepicher gelanden und würde diese gern mit einer Video abspiel routine abspielen.<br />
Mit PlaySound kann ihc musikdatein aus dem Speicehr abspielen. Wie geht das mit Videos ?</p>
<p>Gruß Nervenbündel</p>
<p>[ Dieser Beitrag wurde am 21.03.2003 um 19:18 Uhr von <strong>Nervenbündel</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/5117/video-aus-dem-speicher-abspielen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 17:09:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/5117.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 Mar 2003 18:15:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Fri, 21 Mar 2003 18:15:00 GMT]]></title><description><![CDATA[<p>Hallo, ich habe mit CMemfile eine datei in den sepicher gelanden und würde diese gern mit einer Video abspiel routine abspielen.<br />
Mit PlaySound kann ihc musikdatein aus dem Speicehr abspielen. Wie geht das mit Videos ?</p>
<p>Gruß Nervenbündel</p>
<p>[ Dieser Beitrag wurde am 21.03.2003 um 19:18 Uhr von <strong>Nervenbündel</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24802</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24802</guid><dc:creator><![CDATA[Nervenbündel]]></dc:creator><pubDate>Fri, 21 Mar 2003 18:15:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 08:44:00 GMT]]></title><description><![CDATA[<p>PlaySound kann nicht aus dem Speicher abspielen, sondern nur aus Resourcen, von Platte oder Systemsounds...</p>
<p>Zum abspielen von Videos braucht man MCI.<br />
Benötigte Header:<br />
#include &lt;digitalv.h&gt;<br />
#include &lt;winmm.h&gt;</p>
<p>Benötigte Libs:<br />
winmm.lib mitlinken</p>
<p>Dann musst du dir eine Klasse von CWnd ableiten. z.B. CMediaPlayerWnd</p>
<p>Da kommt in die CPP</p>
<pre><code class="language-cpp">static const IID IID_IVideo = {0xf3e179a1, 0x476b, 0x11d4, { 0xa8, 0x80, 0x0, 0xe0, 0x29, 0x30, 0x2f, 0xe0 }};

BEGIN_INTERFACE_MAP(CMediaPlayerWnd, CWnd)
    INTERFACE_PART(CMediaPlayerWnd, IID_IVideo, Dispatch)
END_INTERFACE_MAP()
</code></pre>
<p>Jetzt kannst du mit verschiedenen MCI-Befehlen das Interface ansteuern... Ist aber ziemlich kompliziert das alles hier zu erklären. Es findet sich bei Microsft bestimmt ein Sample dazu... Aus dem Speicher kann die MCI glaub ich nicht abspielen... Mir fällt auf jeden Fall kein Weg ein. Vielleicht helfen dir meine Hinweise ja weiter</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24803</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 22 Mar 2003 08:44:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 08:50:00 GMT]]></title><description><![CDATA[<p>Sounds abspielen ist AFAIK in den FAQ beschrieben...<br />
Ich poste einfach mal ein Sample für Video das ich irgendwo mal gefunden habe. Ist aber nicht der beste Code. Hab auch keine Ahnung wer den geschrieben hat:</p>
<pre><code class="language-cpp">// mplayerwnd.h : header file
//
#if !defined(MPLAYERWND_H_INCLUDED)
#define MPLAYERWND_H_INCLUDED

#if _MSC_VER &gt; 1000
#pragma once
#endif // _MSC_VER &gt; 1000

#include &lt;mmsystem.h&gt;

// Definitionen
#define MPW_PLAY   10
#define MPW_HOME   11
#define MPW_END    12
#define MPW_STEP   13
#define MPW_RSTEP  14
#define MPW_RPLAY  15

/////////////////////////////////////////////////////////////////////////////
// CMediaPlayerWnd window

class CMediaPlayerWnd : public CWnd
{
// Construction
public:
    CMediaPlayerWnd();

// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CMediaPlayerWndo)
    public:
    virtual void OnFinalRelease();
    //}}AFX_VIRTUAL

// Implementation
public:
    void CenterMediaPlayerWnd(HWND);
    void Open(HWND hWnd, LPCTSTR szFilter);
    void Open(LPSTR sVPath, HWND hWnd);
    void Close(HWND);
    void Play(HWND, int);
    void Seek(HWND, int);
    void Step(HWND, int);
    virtual ~CMediaPlayerWnd();

protected:
    MCIERROR GetLastError() const;
    MCIDEVICEID m_wDeviceID, m_mciDeviceID;
    HWND m_hwnd;
    BOOL m_bPlaying, m_bOpened;

private:
    MCIERROR m_dwLastError;
    BOOL m_bReportErrors;

    // Generated message map functions
protected:
    //{{AFX_MSG(CMediaPlayerWnd)
        // NOTE - the ClassWizard will add and remove member functions here.
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
    // Generated OLE dispatch map functions
    //{{AFX_DISPATCH(CMediaPlayerWnd)
        // NOTE - the ClassWizard will add and remove member functions here.
    //}}AFX_DISPATCH
    DECLARE_DISPATCH_MAP()
    afx_msg LONG OnMciNotify(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);
    DECLARE_INTERFACE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(MPLAYERWND_H_INCLUDED)

// mplayerwnd.cpp : implementation file
// Fensterklasse zum Abspielen von Mediadateien
// winmm.lib muss mitkompiliert werden...
//

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#include &quot;stdafx.h&quot;
#include &quot;mplayerwnd.h&quot;
#include &lt;digitalv.h&gt;     

//////////////////////////////////////////////////////////////////////////
// CMediaPlayerWnd

CMediaPlayerWnd::CMediaPlayerWnd()
{
    m_mciDeviceID = 0;
    m_bPlaying = FALSE;
    m_bOpened = FALSE;

    EnableAutomation();
}

CMediaPlayerWnd::~CMediaPlayerWnd()
{
}

void CMediaPlayerWnd::OnFinalRelease()
{
    CWnd::OnFinalRelease();
}

LONG CMediaPlayerWnd::OnMciNotify(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam)
{
    m_bPlaying = FALSE;
    mciSendCommand(m_mciDeviceID, MCI_SEEK, MCI_SEEK_TO_START, (DWORD)(LPVOID)NULL);
    Close(hWnd);

    return 0L;
}

BEGIN_MESSAGE_MAP(CMediaPlayerWnd, CWnd)
    //{{AFX_MSG_MAP(CMediaPlayerWnd)
        // NOTE - the ClassWizard will add and remove mapping macros here.
    ON_MESSAGE(MM_MCINOTIFY, OnMciNotify)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

BEGIN_DISPATCH_MAP(CMediaPlayerWnd, CWnd)
    //{{AFX_DISPATCH_MAP(CMediaPlayerWnd)
        // NOTE - the ClassWizard will add and remove mapping macros here.
    //}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()

// {F3E179A1-476B-11D4-A880-00E029302FE0}
static const IID IID_IVideo = {0xf3e179a1, 0x476b, 0x11d4, { 0xa8, 0x80, 0x0, 0xe0, 0x29, 0x30, 0x2f, 0xe0 }};

BEGIN_INTERFACE_MAP(CMediaPlayerWnd, CWnd)
    INTERFACE_PART(CMediaPlayerWnd, IID_IVideo, Dispatch)
END_INTERFACE_MAP()

//////////////////////////////////////////////////////////////////////////
// CenterMediaPlayerWnd - Zentriert das Video in seinem Fenster
void CMediaPlayerWnd::CenterMediaPlayerWnd(HWND hWnd)
{
    RECT rcMovie;
    RECT rcClient, rcMovieBounds;
    MCI_DGV_RECT_PARMS  mciRect;

    // Wenn noch keins geöffnet ist rausgehen
    if(!m_bOpened) return;

    // Rechteck des Parents holen
    ::GetClientRect(hWnd, &amp;rcClient);   

    // Originalgröße holen
    mciSendCommand(m_mciDeviceID, MCI_WHERE, (DWORD)(MCI_DGV_WHERE_SOURCE), (DWORD)(LPMCI_DGV_RECT_PARMS)&amp;mciRect);

    // Kopieren
    CopyRect(&amp;rcMovieBounds, &amp;mciRect.rc);

    rcMovie.left = (rcClient.right/2) - (rcMovieBounds.right / 2);
    rcMovie.top = (rcClient.bottom/2) - (rcMovieBounds.bottom / 2);
    rcMovie.right = rcMovie.left + rcMovieBounds.right;
    rcMovie.bottom = rcMovie.top + rcMovieBounds.bottom;

    // Neu positionieren
    ::MoveWindow(m_hwnd, rcClient.left, rcClient.top, rcClient.right, rcClient.bottom, TRUE);
}

//////////////////////////////////////////////////////////////////////////
// Open - Mediadatei mit Datei-Öffnen Dialog öffnen
void CMediaPlayerWnd::Open(HWND hWnd, LPCTSTR szFilter)
{
    CFileDialog dlg(1, 0, 0, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter);

    // Dateinamen holen
    if(dlg.DoModal() == IDOK)
        Open(dlg.m_ofn.lpstrFile, hWnd);
}

//////////////////////////////////////////////////////////////////////////
// Open - Mediadatei mit angegebenem Pfad öffnen
void CMediaPlayerWnd::Open(LPSTR sVPath, HWND hWnd)
{
    MCI_DGV_OPEN_PARMS mciOpen;
    MCI_DGV_WINDOW_PARMS mciWindow;
    MCI_DGV_STATUS_PARMS mciStatus;

    // Altes schließen
    if(m_bOpened) Close(hWnd);  

    // MCI-Parameter einstellen
    mciOpen.wDeviceID = 0;
    mciOpen.lpstrDeviceType = NULL;
    mciOpen.lpstrElementName = sVPath;
    mciOpen.lpstrAlias = NULL;
    mciOpen.dwStyle = WS_CHILD;
    mciOpen.hWndParent = hWnd;

    // Versuchen die Datei zu öffnen
    if(mciSendCommand(0, MCI_OPEN, (DWORD)(MCI_OPEN_ELEMENT|MCI_DGV_OPEN_PARENT|
        MCI_DGV_OPEN_WS|MCI_OVLY_WINDOW_ENABLE_STRETCH ),   (DWORD)(LPMCI_DGV_OPEN_PARMS)&amp;mciOpen) == 0)
    {
        // Abspielen
        m_mciDeviceID = mciOpen.wDeviceID;
        m_bOpened = TRUE;

        // Wiedergabefenster zeigen
        mciWindow.hWnd = NULL;
        mciWindow.nCmdShow = SW_SHOW;
        mciWindow.lpstrText = (LPSTR)NULL;
        mciSendCommand(m_mciDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE| MCI_OVLY_WINDOW_ENABLE_STRETCH,
            (DWORD)(LPMCI_DGV_WINDOW_PARMS)&amp;mciWindow);

        // Fenster-Handle holen
        mciStatus.dwItem = MCI_DGV_STATUS_HWND;
        mciSendCommand(m_mciDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD)(LPMCI_STATUS_PARMS)&amp;mciStatus);
        m_hwnd = (HWND)mciStatus.dwReturn;

        // Zentrieren
        CenterMediaPlayerWnd(hWnd);
    }
    else m_bOpened = FALSE; // Nicht geöffnet

    // Neuzeichnen und aktualisieren
    ::InvalidateRect(hWnd, NULL, FALSE);
    ::UpdateWindow(hWnd);
}

//////////////////////////////////////////////////////////////////////////
// Close - Mediadatei schließen
void CMediaPlayerWnd::Close(HWND hWnd)
{
    MCI_GENERIC_PARMS  mciGeneric;
    mciSendCommand(m_mciDeviceID, MCI_CLOSE, 0L, (DWORD)(LPMCI_GENERIC_PARMS)&amp;mciGeneric);

    m_bPlaying = FALSE;
    m_bOpened = FALSE;

    // Komplett neuzeichnen
    ::InvalidateRect(hWnd, NULL, TRUE);
    ::UpdateWindow(hWnd);
}

//////////////////////////////////////////////////////////////////////////
// Play - Abspielen/Pause-Funktion
void CMediaPlayerWnd::Play(HWND hWnd,int nDirection)
{
    m_bPlaying = !m_bPlaying;
    if(!nDirection)
        m_bPlaying = FALSE;

    if(m_bPlaying)
    {
        DWORD dwFlags;
        MCI_DGV_PLAY_PARMS mciPlay;

        // Initialisieren 
        mciPlay.dwFrom = mciPlay.dwTo = 0;
        dwFlags = MCI_NOTIFY;
        if(nDirection == MPW_RPLAY)
            dwFlags |= MCI_DGV_PLAY_REVERSE;   

        // Abspielen
        mciSendCommand(m_mciDeviceID, MCI_PLAY, dwFlags, (DWORD)(LPMCI_DGV_PLAY_PARMS)&amp;mciPlay);
    }
    else
    {
        MCI_DGV_PAUSE_PARMS mciPause;

        // Pausieren
        mciSendCommand(m_mciDeviceID,MCI_PAUSE,0L, (DWORD)(LPMCI_DGV_PAUSE_PARMS)&amp;mciPause);
    }
}

//////////////////////////////////////////////////////////////////////////
// Seek - Springt an den Anfang oder an das Ende der Mediadatei
void CMediaPlayerWnd::Seek(HWND hWnd, int nAction)
{
    // Anhalten
    if(m_bPlaying) Play(hWnd, 0);   

    if(nAction == MPW_HOME) // An den Anfang gehen
        mciSendCommand(m_mciDeviceID, MCI_SEEK, MCI_SEEK_TO_START, (DWORD)(LPVOID)NULL);
    else if (nAction == MPW_END) // Ans Ende gehen
        mciSendCommand(m_mciDeviceID, MCI_SEEK, MCI_SEEK_TO_END, (DWORD)(LPVOID)NULL);
}

//////////////////////////////////////////////////////////////////////////
// Step - Einen Schritt in die gewünschte Richtung machen
void CMediaPlayerWnd::Step(HWND hWnd, int nDirection)
{
    MCI_DGV_STEP_PARMS  mciStep;

    // Anhalten
    if(m_bPlaying) Play(hWnd, 0);

    mciStep.dwFrames = 1L;

    if(nDirection == MPW_STEP) // Nach vorne
        mciSendCommand(m_mciDeviceID, MCI_STEP, MCI_DGV_STEP_FRAMES,(DWORD)(LPMCI_DGV_STEP_PARMS)&amp;mciStep);
    else // Nach hinten
        mciSendCommand(m_mciDeviceID, MCI_STEP, MCI_DGV_STEP_FRAMES|MCI_DGV_STEP_REVERSE, (DWORD)(LPMCI_DGV_STEP_PARMS)&amp;mciStep);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/24804</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24804</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 22 Mar 2003 08:50:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 09:06:00 GMT]]></title><description><![CDATA[<blockquote>
<p>PlaySound kann nicht aus dem Speicher abspielen, sondern nur aus Resourcen, von Platte oder Systemsounds...</p>
</blockquote>
<p>ach ja? und warum gibt es dann bei PlaySound die Option SND_MEMORY :o</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24805</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24805</guid><dc:creator><![CDATA[bloat]]></dc:creator><pubDate>Sat, 22 Mar 2003 09:06:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 09:13:00 GMT]]></title><description><![CDATA[<p>Sorry, jetzt sehe ich es... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /> Und der LPCSTR soll auf die Speicheradresse zeigen??? Was für ein Krampf...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24806</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24806</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 22 Mar 2003 09:13:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 09:16:00 GMT]]></title><description><![CDATA[<p>Hi, können die Video-Abpsiel-Beispiele, denn auch die Videos vom Speicher abspielen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24807</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24807</guid><dc:creator><![CDATA[Nervenbündel]]></dc:creator><pubDate>Sat, 22 Mar 2003 09:16:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 09:54:00 GMT]]></title><description><![CDATA[<p>Wie gesagt, weiß ich nicht. Willst du die nicht von Platte abspielen???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24808</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24808</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 22 Mar 2003 09:54:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 10:36:00 GMT]]></title><description><![CDATA[<p>Ja, ich würde die Dateien gerne direkt aus dem Speicehr abspielen wollen.<br />
Wo kann ich mich denn da erkundigen, wie man das machen kann ?<br />
Ich meien, wenn ihr es unbdingt realiersieren wolltet, wie würdet ihr vorgehen ?</p>
<p>Gruß Nervenbündel !</p>
<p>P.S. Danke für eure Antworten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24809</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24809</guid><dc:creator><![CDATA[Nervenbündel]]></dc:creator><pubDate>Sat, 22 Mar 2003 10:36:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 10:53:00 GMT]]></title><description><![CDATA[<p>Warum musst du die Dateien denn erst in den Speicher lesen??? Naja, im Zweifelsfall kannst du dir auch ein Tempfile machen und den Speicher da reinschreiben. Ist aber sehr langsam</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24810</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24810</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 22 Mar 2003 10:53:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 11:00:00 GMT]]></title><description><![CDATA[<p>Ja, das ist es ja gerade. Ich will einfach ne kleien Video datei in den Speicher laden und abspielen, das ist mit sound ja auch nicht schwer, mit video dürfte es dann auch ekein Probleme geben. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/24811</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24811</guid><dc:creator><![CDATA[Nervenbündel]]></dc:creator><pubDate>Sat, 22 Mar 2003 11:00:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 11:38:00 GMT]]></title><description><![CDATA[<p>Immer mit der Ruhe <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> . DU brauchst den doch nicht selber in den SPeicher zu lesen. Das macht das Interface. Es reicht wenn du einen Pfad auf der Platte angibst...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24812</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24812</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 22 Mar 2003 11:38:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 22 Mar 2003 11:54:00 GMT]]></title><description><![CDATA[<p>Ich möchte doch aus dem Speicher abspielen.<br />
Nicht von der HD (also ohne Pfad), sodnern einfach die BYTE Variable angeben können wo dasVideo drinsteckt und dann abpsielen.<br />
So wie bei PlaySound.</p>
<p>Weiß da jemand was ?</p>
<p>Ich bin schon halb am Verzweifeln.</p>
<p>Gruß Nervenbündel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24813</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24813</guid><dc:creator><![CDATA[Nervenbündel]]></dc:creator><pubDate>Sat, 22 Mar 2003 11:54:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sun, 23 Mar 2003 15:11:00 GMT]]></title><description><![CDATA[<p>So ohne weiteres geht das nicht. Beschäftige dich mal mit der MCI-Schnittstelle und sieh nach ob du dazu etwas findest. ICh sehe aber eigentlich relativ schwarz... Wofür brauchst du das eigentlich???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24814</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sun, 23 Mar 2003 15:11:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sun, 23 Mar 2003 15:34:00 GMT]]></title><description><![CDATA[<p>@MaSTaH<br />
Naja, ich will es halt für ein Spiel nutzen.<br />
Ist doch ganz praktisch.<br />
Bist du dir sicher, dass es nicht geht ? Bei WAV dateien geht es doch auch.<br />
Das dürfte doch kein Prblem sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24815</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24815</guid><dc:creator><![CDATA[Nervenbündel]]></dc:creator><pubDate>Sun, 23 Mar 2003 15:34:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sun, 23 Mar 2003 19:01:00 GMT]]></title><description><![CDATA[<p>Ja, aber warum soll das MCI es nicht in den Speicher laden. Brauchst dich dann doch garnicht darum zu kümmern, dass es in den Buffer kommt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24816</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24816</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sun, 23 Mar 2003 19:01:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sun, 23 Mar 2003 19:14:00 GMT]]></title><description><![CDATA[<p>Ich will dateien in den Speicehr laden können und dann nach belieben abspielen können.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24817</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24817</guid><dc:creator><![CDATA[Nervenbündel]]></dc:creator><pubDate>Sun, 23 Mar 2003 19:14:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Mon, 24 Mar 2003 02:53:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/2623">@Nervenbündel</a>: Du machst deinem Namen alle Ehre. Sei erstmal dankbar, dass MaSTaH dir überhaupt hilft. Außerdem: Wo liegt der Sinn, das File erst selber in den Speicher zu laden und dann irgendwie abzuspielen, wenn es für diesen Vorgang bereits ein Interface gibt?! Gib dich mit dem zufrieden, was MaSTaH dir gegeben hat und nerv nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/24818</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/24818</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Mon, 24 Mar 2003 02:53:00 GMT</pubDate></item><item><title><![CDATA[Reply to Video aus dem Speicher abspielen on Sat, 16 Aug 2003 18:28:24 GMT]]></title><description><![CDATA[<p>Wenn's interessiert (eigentlich ist er ja schon outdated <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":-)"
      alt="🙂"
    /> )</p>
<p>char *lpData; // pointer auf buffer mit AVI!-Data<br />
int fileSize; // dateigröße der AVI-Datei</p>
<p>LRESULT CALLBACK IOProc(LPMMIOINFO lpMMIOInfo, UINT uMessage, LPARAM lParam1,<br />
LPARAM lParam2);</p>
<p>void main(void)<br />
{<br />
mmioInstallIOProc(mmioFOURCC('M','E','Y',' '),(LPMMIOPROC)<br />
IOProc,MMIO_INSTALLPROC | MMIO_GLOBALPROC); // installiert eigene ioProc</p>
<p>myPlayAvi( WINDOWHANDLE, &quot;.MEY+&quot;, 0); // extension MEY+ teilt MCI mit eigene ioProc aufzurufen</p>
<p>myStopAvi();</p>
<p>mmioInstallIOProc(mmioFOURCC('M', 'E', 'Y', ' '), NULL,<br />
MMIO_REMOVEPROC); // deinstalliert eigene ioProc</p>
<p>}</p>
<p>LRESULT CALLBACK IOProc(LPMMIOINFO lpMMIOInfo, UINT uMessage, LPARAM lParam1, LPARAM lParam2)<br />
{ switch (uMessage)<br />
{ case MMIOM_OPEN:<br />
{ if (alreadyOpened) return 0;<br />
alreadyOpened = true;<br />
lpMMIOInfo-&gt;lDiskOffset = 0;<br />
return 0;<br />
}<br />
case MMIOM_CLOSE: return 0;<br />
case MMIOM_READ:<br />
{ memcpy((void *)lParam1,lpData+lpMMIOInfo-&gt;lDiskOffset,lParam2);<br />
lpMMIOInfo-&gt;lDiskOffset += lParam2;<br />
return (lParam2);<br />
}<br />
case MMIOM_SEEK:<br />
{ switch (lParam2)<br />
{ case 0: lpMMIOInfo-&gt;lDiskOffset = lParam1; break;<br />
case 1: lpMMIOInfo-&gt;lDiskOffset += lParam1; break;<br />
case 2: lpMMIOInfo-&gt;lDiskOffset = fileSize - 1 - lParam1; break;<br />
}<br />
return lpMMIOInfo-&gt;lDiskOffset;<br />
}<br />
default: return -1;<br />
}<br />
}</p>
<p>int myPlayAvi (HWND hWnd, char *filename, int loop)<br />
{<br />
char cmd[300];<br />
// MPEGVideo geht nicht.... type AVIVideo!<br />
wsprintf(cmd, &quot;open \&quot;%s\&quot; alias mympeg type AVIVideo style child&quot;, filename);<br />
if (mciSendString(cmd, 0, 0, 0) != 0)<br />
{<br />
MessageBox(NULL, &quot;MCI-Error: Kann Datei nicht öffnen!&quot;, &quot;Fehler&quot;, 0);<br />
return -1;<br />
}</p>
<p>wsprintf(cmd, &quot;window mympeg handle %lu&quot;, hWnd);<br />
if (mciSendString(cmd, 0, 0, 0) != 0)<br />
{<br />
wsprintf(cmd, &quot;MCI-Error: Kann window handle %ld nicht setzen&quot;, hWnd);<br />
MessageBox(NULL, cmd, &quot;Fehler&quot;, 0);<br />
return -1;<br />
}</p>
<p>wsprintf(cmd, &quot;play mympeg from 0&quot;);<br />
if (loop) wsprintf(cmd, &quot;%s repeat&quot;, cmd);<br />
if (mciSendString(cmd, 0, 0, 0) != 0)<br />
{<br />
MessageBox(NULL, &quot;MCI-Error: Kann Datei nicht absielen!&quot;, &quot;Fehler&quot;, 0);<br />
return -1;<br />
}<br />
return 0;<br />
}</p>
<p>int myStopAvi (void)<br />
{<br />
char cmd[300];<br />
wsprintf(cmd, &quot;close mympeg&quot;);<br />
if (mciSendString(cmd, 0, 0, 0) != 0)<br />
{<br />
MessageBox(NULL, &quot;MCI-Error: Kann Datei nicht schließen!&quot;, &quot;Fehler&quot;, 0);<br />
return -1;<br />
}<br />
return 0;<br />
}</p>
<p>Quelle:<br />
MSDN : <a href="http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q155/3/60.asp&amp;NoWebContent=1" rel="nofollow">http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q155/3/60.asp&amp;NoWebContent=1</a><br />
thx 2 DocJunior's AVI-Code</p>
<p>Soweit ich festellen konnte, wird die eigene ioProc bloß beim type AVIVideo gecallt....<br />
MPEGVideo hab ich nicht hinbekommen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /> ob type WAVAudio hab ich jetzt nicht getestet</p>
<p>gruß nameless</p>
]]></description><link>https://www.c-plusplus.net/forum/post/333864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/333864</guid><dc:creator><![CDATA[nameless]]></dc:creator><pubDate>Sat, 16 Aug 2003 18:28:24 GMT</pubDate></item></channel></rss>