Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hi,

ich muesste einem dialogfenster(CFormView) ein Timeline, wie von Videoeditingsystemen, hinzufuegen.

Hat jemand von euch vielleicht erfahrung damit oder kennt jemand ne webseite die sich damit beschaeftigt?

gruss thomas

ich probiere es jetzt mit directShow hinzubekommen

(http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/htm/constructingatimeline.asp)

und habe den quellcode nun in meine Klasse Timeline eingefuegt. bekomme aber beim compilieren 8 unaufgeloeste externe symbole angezeigt.

z.B. Timeline.obj : error LNK2001: Nichtaufgeloestes externes Symbol _IID_IAMTimelineTrack

#include "dshow.h"

#include "qedit.h"


...



// Preview a timeline.

void PreviewTL(IAMTimeline *pTL, IRenderEngine *pRender) 

{

    IGraphBuilder   *pGraph = NULL;

    IMediaControl   *pControl = NULL;

    IMediaEvent     *pEvent = NULL;


    // Build the graph.

    pRender->SetTimelineObject(pTL);

    pRender->ConnectFrontEnd( );

    pRender->RenderOutputPins( );


    // Run the graph.

    pRender->GetFilterGraph(&pGraph);

    pGraph->QueryInterface(IID_IMediaControl, (void **)&pControl);

    pGraph->QueryInterface(IID_IMediaEvent, (void **)&pEvent);

    pControl->Run();


    long evCode;

    pEvent->WaitForCompletion(INFINITE, &evCode);

    pControl->Stop();


    // Clean up.

    pEvent->Release();

    pControl->Release();

    pGraph->Release();

}


void CTimeline::OnInitialUpdate()

{

    CFormView::OnInitialUpdate():


    // Start by making an empty timeline.


    IAMTimeline    *pTL = NULL;

    CoInitialize(NULL);

    CoCreateInstance(CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, 

        IID_IAMTimeline, (void**)&pTL);


    // GROUP: Add a video group to the timeline. 


    IAMTimelineGroup    *pGroup = NULL;

    IAMTimelineObj      *pGroupObj = NULL;

    pTL->CreateEmptyNode(&pGroupObj, TIMELINE_MAJOR_TYPE_GROUP);

    pGroupObj->QueryInterface(IID_IAMTimelineGroup, (void **)&pGroup);


    // Set the group media type. This example sets the type to "video" and

    // lets DES pick the default settings. For a more detailed example,

    // see "Setting the Group Media Type."

    AM_MEDIA_TYPE mtGroup;  

    ZeroMemory(&mtGroup, sizeof(AM_MEDIA_TYPE));

    mtGroup.majortype = MEDIATYPE_Video;

    pGroup->SetMediaType(&mtGroup);

    pTL->AddGroup(pGroupObj);

    pGroupObj->Release();


    // TRACK: Add a track to the group. 


    IAMTimelineObj      *pTrackObj;

    IAMTimelineTrack    *pTrack;

    IAMTimelineComp     *pComp = NULL;


    pTL->CreateEmptyNode(&pTrackObj, TIMELINE_MAJOR_TYPE_TRACK);

    pGroup->QueryInterface(IID_IAMTimelineComp, (void **)&pComp);

    pComp->VTrackInsBefore(pTrackObj, 0);

    pTrackObj->QueryInterface(IID_IAMTimelineTrack, (void **)&pTrack);


    pTrackObj->Release();

    pComp->Release();    

    pGroup->Release();


    // SOURCE: Add a source to the track.


    IAMTimelineSrc *pSource = NULL;

    IAMTimelineObj *pSourceObj;

    pTL->CreateEmptyNode(&pSourceObj, TIMELINE_MAJOR_TYPE_SOURCE);

    pSourceObj->QueryInterface(IID_IAMTimelineSrc, (void **)&pSource);


    // Set the times and the file name.

    pSourceObj->SetStartStop(0, 50000000);

    BSTR bstrFile = SysAllocString(OLESTR("C:\\example.avi"));

    pSource->SetMediaName(bstrFile); 

    SysFreeString(bstrFile);

    pSource->SetMediaTimes(40000000, 140000000);

    pTrack->SrcAdd(pSourceObj);


    pSourceObj->Release();

    pSource->Release();

    pTrack->Release();


    // Preview the timeline.

    IRenderEngine *pRenderEngine = NULL;

    CoCreateInstance(CLSID_RenderEngine, NULL, CLSCTX_INPROC_SERVER,

        IID_IRenderEngine, (void**) &pRenderEngine);

    PreviewTL(pTL, pRenderEngine);


    // Clean up.

    pRenderEngine->ScrapIt();

    pRenderEngine->Release();

    pTL->Release();

    CoUninitialize();

}

soweit ich weiss ist dass die STRMIIDS.lib

hat sich erledigt. meine Lib war wohl veraltet. hab jetzt ne aktuellere und es funktioniert.

Also so wie ich es mir vorstelle funktioniert es doch mit DirectShow leider nicht, daher bin ich immer noch auf der suche nach einer loesung. bei codeproject und codeguru bin ich leider nur auf viele leute getroffen, die das selbe problem haben aber keine loesungen.

ich versuche eine art EDL(eine Schnittliste, d.h. eine beschreibung wie ein film geschnitten wurde) in einer timeline(mit audio und videotracks) zu visualisieren.

Ich habe die information vereinfacht gesagt in der form:

Videoclip1 von sekunde 0 bis 10

Videoclilp2 von sekunde 10 bis 15

usw. ...

Hat jemand ne idee wie ich sowas mit VC++ realisieren kann?

Hat jemand ne idee wie ich sowas mit VC++ realisieren kann?

Das ist zu individuell, das müsstest Du selbst programmieren. Die DirectShow Timeline ist zum Erstellen einer Anleitung für ein späteres Rendern gedacht und ist keine UI Komponente.

das habe ich auch feststellen muessen. deswegen suche ich nach alternativen loesungen.

Was ist so schwierig, dass Du es nicht selbst machst? Was soll Deine Zeitleiste überhaupt können? Wie soll sie aussehen (es gibt durchaus unterschiedliche Schnittsysteme mit Zeitleisten unterschiedlichen Aussehens und Funktion).

sorry, ich bin kein programmierer fuer mich ist das alles andere als banal. das ganze ist teil meiner dipl.arbeit.

die timeline muss nicht viel koennen.

ich muss ihr EditUnits(kleinse Schnitteinheit, z.B. ein Frame) zuweisen koennen.

die zeitlachse sollte im Timeoce format skaliert sein.

ich muss ihr clips(mit einer bestimmten dauer) zuweisen koennen. am besten waere es wenn ich die clips noch jeweils anklicken koennte um mir metadaten(Dauer, codec, framerate, etc.) der clips anzeigen lassen zu koennen.

Ich tippe darauf, dass die Chancen so etwas fix und fertig zu finden eher ungünstig stehen.

Davon abgesehen, solltest Du in der Arbeit angeben, welche nicht von Dir erstellen Teile wie und wo verwendet wurden und dies auch vorher mit Deinem Betreuer/Gutachter absprechen und ein ok einholen.

Davon abgesehen, solltest Du in der Arbeit angeben, welche nicht von Dir erstellen Teile wie und wo verwendet wurden und dies auch vorher mit Deinem Betreuer/Gutachter absprechen und ein ok einholen.

was du nicht sagst. also ganz doof/unwissend bin ich jetzt auch wieder nicht.

was du nicht sagst. also ganz doof/unwissend bin ich jetzt auch wieder nicht.

Das war als nett gemeinter Rat gedacht, kein Grund papmpig zu werden.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.