Putting Video Frames Into a Buffer for Appsrc

William Metcalf WMetcalf at niftytv.com
Thu Jun 16 09:56:02 PDT 2011


Andrey, thank you for the information and the links.  I will look through those and see if they solve my problem.

Josh, I am not using the DeckLink source mostly because in my research I never came accross it so I didn't know that it existed.  Secondly, I am using GStreamer on windows and when I do a gst-inspect to list all available elements I do not have a decklink source listed.  I am interested in using the decklink source, but I do not know how to add other elements in Windows.  Do you have any advice or links that could show me how to do this?  Thank you.

-----Original Message-----
From: gstreamer-devel-bounces+wmetcalf=niftytv.com at lists.freedesktop.org on behalf of Josh Doe
Sent: Thu 6/16/2011 11:45 AM
To: Discussion of the development of and with GStreamer
Subject: Re: Putting Video Frames Into a Buffer for Appsrc
 
Any particular reason you're not using the decklink source element in
gst-plugins-bad?
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/decklink

I'd be interested to know, because I'm about to work with a Blackmagic
Design DeckLink Studio 2 card and was planning to use this element.

Thanks,
-Josh

On Thu, Jun 16, 2011 at 11:58 AM, William Metcalf <WMetcalf at niftytv.com> wrote:
> I am writing a program using GStreamer and the DeckLink API, which will read
> in video frames and then render them to the screen.  The first step of this
> process is to caputre the video frames.  Using callback methods in the
> DeckLink API, I have successfully been able to capture the raw video frames
> and put them into a void* buffer.  Now I am trying to take this void* buffer
> and move its contents into a GstBuffer so that I can push it to an appsrc
> element.
>
> I am pretty inexperience with moving raw video data in between bufffers.
> Does anyone know what methods are good for completing this task?  Below is a
> sample of my code to make it a little more clear as to what I am doing
> exactly.  Thank you in advance.
>
> /* This method is called for each video frame that arrives */
> HRESULT STDMETHODCALLTYPE
> VideoDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
> *pArrivedFrame, IDeckLinkAudioInputPacket *pArrivedAudio)
> {
>         fprintf(stdout, "Video frame arrived.\n");
>
>         /* This method gets the raw video frame bytes and stores them in a
> void* temp_data */
>         pArrivedFrame->GetBytes((void**) &temp_data);
>
>         /* Here is where I need to take temp_data, and somehow move it into
> the data portion of a GstBuffer video_buffer */
>
>         /* After I have the data in video_buffer, I will push it to the
> appsrc element */
>         gst_app_src_push_buffer(GST_APP_SRC(appsrc), &video_buffer);
>
>         return S_OK;
> }
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4514 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110616/d7937f84/attachment.bin>


More information about the gstreamer-devel mailing list