forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
45 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2014-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2015 Wang Bin <[email protected]> | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2015) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
@@ -128,6 +128,7 @@ void* SurfaceInteropDXVA::mapToHost(const VideoFormat &format, void *handle, int | |
const bool swap_uv = desc.Format == MAKEFOURCC('I','M','C','3'); | ||
// try to use SSE. fallback to normal copy if SSE is not supported | ||
VideoFrame frame(VideoFrame::fromGPU(fmt, frame_width, frame_height, desc.Height, src, pitch, true, swap_uv)); | ||
// TODO: check rgb32 because d3d can use hw to convert | ||
if (format != fmt) | ||
frame = frame.to(format); | ||
VideoFrame *f = reinterpret_cast<VideoFrame*>(handle); | ||
|
@@ -190,6 +191,7 @@ void EGLInteropResource::releaseEGL() { | |
bool EGLInteropResource::ensureSurface(int w, int h) { | ||
if (dx_surface && width == w && height == h) | ||
return true; | ||
//TODO: use eglChooseConfig | ||
#if QTAV_HAVE(GUI_PRIVATE) | ||
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface(); | ||
egl->dpy = static_cast<EGLDisplay>(nativeInterface->nativeResourceForContext("eglDisplay", QOpenGLContext::currentContext())); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2015 Wang Bin <[email protected]> | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2015) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
@@ -23,7 +23,7 @@ | |
#define QTAV_SURFACEINTEROPDXVA_H | ||
#include <d3d9.h> | ||
#include "QtAV/SurfaceInterop.h" | ||
#include "utils/OpenGLHelper.h" | ||
#include "opengl/OpenGLHelper.h" | ||
// no need to check qt4 because no ANGLE there | ||
#if QTAV_HAVE(EGL_CAPI) // always use dynamic load | ||
#if defined(QT_OPENGL_DYNAMIC) || defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_ES_2_ANGLE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV (from 2016) | ||
|
@@ -22,7 +22,7 @@ | |
#include "SurfaceInteropCV.h" | ||
#include <IOSurface/IOSurface.h> | ||
#include "QtAV/VideoFrame.h" | ||
#include "utils/OpenGLHelper.h" | ||
#include "opengl/OpenGLHelper.h" | ||
|
||
namespace QtAV { | ||
namespace cv { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV (from 2014) | ||
|
@@ -25,7 +25,7 @@ | |
#include "QtAV/SurfaceInterop.h" | ||
#include "QtAV/private/AVCompat.h" | ||
#include "QtAV/private/factory.h" | ||
#include "utils/OpenGLHelper.h" | ||
#include "opengl/OpenGLHelper.h" | ||
#include <assert.h> | ||
#ifdef __cplusplus | ||
extern "C" { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV (from 2014) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2014-2015 Wang Bin <[email protected]> | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2014) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2014-2016 Wang Bin <[email protected]> | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2014) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
@@ -22,7 +22,7 @@ | |
|
||
#include "SurfaceInteropVAAPI.h" | ||
#ifndef QT_NO_OPENGL | ||
#include "utils/OpenGLHelper.h" | ||
#include "opengl/OpenGLHelper.h" | ||
#include "QtAV/VideoFrame.h" | ||
#include "utils/Logger.h" | ||
#if VA_X11_INTEROP | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2014-2015 Wang Bin <[email protected]> | ||
QtAV: Multimedia framework based on Qt and FFmpeg | ||
Copyright (C) 2012-2016 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
* This file is part of QtAV (from 2014) | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
|
@@ -63,7 +63,7 @@ class SurfaceInteropVAAPI Q_DECL_FINAL: public VideoSurfaceInterop | |
{ | ||
public: | ||
SurfaceInteropVAAPI(const InteropResourcePtr& res) : frame_width(0), frame_height(0), m_resource(res) {} | ||
void setSurface(const surface_ptr& surface, int w, int h); // use surface->width/height if w/h is 0 | ||
void setSurface(const surface_ptr& surface, int w, int h); // use surface->width/height if w/h is 0 | ||
void* map(SurfaceType type, const VideoFormat& fmt, void* handle, int plane) Q_DECL_OVERRIDE; | ||
void unmap(void *handle) Q_DECL_OVERRIDE; | ||
protected: | ||
|