vlVdpBitmapSurfacePutBitsNative(VdpBitmapSurface surface,
void const *const *source_data,
uint32_t const *source_pitches,
- VdpRect const *destination_rect )
+ VdpRect const *destination_rect)
{
if (!(source_data && source_pitches && destination_rect))
- return VDP_STATUS_INVALID_POINTER;
+ return VDP_STATUS_INVALID_POINTER;
return VDP_STATUS_NO_IMPLEMENTATION;
}
vldecoder = (vlVdpDecoder *)vlGetDataHTAB(decoder);
if (!vldecoder)
return VDP_STATUS_INVALID_HANDLE;
-
+
*profile = PipeToProfile(vldecoder->decoder->profile);
*width = vldecoder->decoder->width;
*height = vldecoder->decoder->height;
-
+
return VDP_STATUS_OK;
}
return VDP_STATUS_INVALID_CHROMA_TYPE;
// TODO: Right now only mpeg 1 & 2 is supported.
- switch (vldecoder->decoder->profile) {
+ switch (vldecoder->decoder->profile) {
case PIPE_VIDEO_PROFILE_MPEG1:
case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE:
case PIPE_VIDEO_PROFILE_MPEG2_MAIN:
_ERROR_TYPE(VDP_STATUS_NO_IMPLEMENTATION,"No backend implementation could be loaded.");
_ERROR_TYPE(VDP_STATUS_DISPLAY_PREEMPTED,"The display was preempted, or a fatal error occurred. The application must re-initialize VDPAU.");
_ERROR_TYPE(VDP_STATUS_INVALID_HANDLE,"An invalid handle value was provided. Either the handle does not exist at all, or refers to an object of an incorrect type.");
- _ERROR_TYPE(VDP_STATUS_INVALID_POINTER ,"An invalid pointer was provided. Typically, this means that a NULL pointer was provided for an 'output' parameter.");
- _ERROR_TYPE(VDP_STATUS_INVALID_CHROMA_TYPE ,"An invalid/unsupported VdpChromaType value was supplied.");
+ _ERROR_TYPE(VDP_STATUS_INVALID_POINTER,"An invalid pointer was provided. Typically, this means that a NULL pointer was provided for an 'output' parameter.");
+ _ERROR_TYPE(VDP_STATUS_INVALID_CHROMA_TYPE,"An invalid/unsupported VdpChromaType value was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_Y_CB_CR_FORMAT,"An invalid/unsupported VdpYCbCrFormat value was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_RGBA_FORMAT,"An invalid/unsupported VdpRGBAFormat value was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_INDEXED_FORMAT,"An invalid/unsupported VdpIndexedFormat value was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_FLAG,"An invalid/unsupported flag value/combination was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_DECODER_PROFILE,"An invalid/unsupported VdpDecoderProfile value was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_FEATURE,"An invalid/unsupported VdpVideoMixerFeature value was supplied.");
- _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER ,"An invalid/unsupported VdpVideoMixerParameter value was supplied.");
+ _ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER,"An invalid/unsupported VdpVideoMixerParameter value was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_ATTRIBUTE,"An invalid/unsupported VdpVideoMixerAttribute value was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE,"An invalid/unsupported VdpVideoMixerPictureStructure value was supplied.");
_ERROR_TYPE(VDP_STATUS_INVALID_FUNC_ID,"An invalid/unsupported VdpFuncId value was supplied.");
else {
function_id -= VDP_FUNC_ID_BASE_WINSYS;
if (function_id > 0)
- return FALSE;
+ return FALSE;
*func = ftab_winsys[function_id];
}
return *func != NULL;
/*
* TODO: Handle features and parameters
- * */
+ */
*mixer = vlAddDataHTAB(vmixer);
if (*mixer == 0) {
}
return VDP_STATUS_OK;
+
no_handle:
return ret;
}
/*
* TODO: Set features
- * */
+ */
return VDP_STATUS_OK;
}
/*
* TODO: Implement the function
- *
- * */
+ */
return VDP_STATUS_OK;
}
static unsigned
BlendFactorToPipe(VdpOutputSurfaceRenderBlendFactor factor)
{
- switch(factor) {
+ switch (factor) {
case VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO:
return PIPE_BLENDFACTOR_ZERO;
case VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE:
static unsigned
BlendEquationToPipe(VdpOutputSurfaceRenderBlendEquation equation)
{
- switch(equation) {
+ switch (equation) {
case VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_SUBTRACT:
return PIPE_BLEND_SUBTRACT;
case VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_REVERSE_SUBTRACT:
*
**************************************************************************/
- #include <vdpau/vdpau.h>
+#include <vdpau/vdpau.h>
- void vlVdpPreemptionCallback(VdpDevice device, void *context)
- {
+void vlVdpPreemptionCallback(VdpDevice device, void *context)
+{
/* TODO: Implement preemption */
- }
+}
- VdpStatus vlVdpPreemptionCallbackRegister(VdpDevice device, VdpPreemptionCallback callback,
- void *context)
- {
+VdpStatus vlVdpPreemptionCallbackRegister(VdpDevice device,
+ VdpPreemptionCallback callback,
+ void *context)
+{
return VDP_STATUS_OK;
- }
+}
}
return VDP_STATUS_OK;
+
no_handle:
no_compositor:
FREE(pq);
vl_contextprivate_get(pq->device->context, drawable_surface)
);
- if(dump_window == -1) {
+ if (dump_window == -1) {
dump_window = debug_get_num_option("VDPAU_DUMP", 0);
}
- if(dump_window) {
+ if (dump_window) {
static unsigned int framenum = 0;
char cmd[256];
if (system(cmd) != 0)
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Dumping surface %d failed.\n", surface);
}
-
+
pipe_surface_reference(&drawable_surface, NULL);
return VDP_STATUS_OK;
return -1;
}
-
static inline enum pipe_format
FormatYCBCRToPipe(VdpYCbCrFormat vdpau_format)
{
default:
assert(0);
}
+
return PIPE_FORMAT_NONE;
}
-
static inline enum pipe_video_profile
ProfileToPipe(VdpDecoderProfile vdpau_profile)
{
return PIPE_VIDEO_PROFILE_MPEG2_MAIN;
case VDP_DECODER_PROFILE_H264_BASELINE:
return PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE;
- case VDP_DECODER_PROFILE_H264_MAIN: /* Not defined in p_format.h */
+ case VDP_DECODER_PROFILE_H264_MAIN:
return PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN;
case VDP_DECODER_PROFILE_H264_HIGH:
- return PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH;
+ return PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH;
default:
return PIPE_VIDEO_PROFILE_UNKNOWN;
}
return VDP_DECODER_PROFILE_MPEG2_MAIN;
case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
return VDP_DECODER_PROFILE_H264_BASELINE;
- case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN: /* Not defined in p_format.h */
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
return VDP_DECODER_PROFILE_H264_MAIN;
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
- return VDP_DECODER_PROFILE_H264_HIGH;
+ return VDP_DECODER_PROFILE_H264_HIGH;
default:
assert(0);
return -1;
}
}
-#endif // VDPAU_PRIVATE_H
+#endif /* VDPAU_PRIVATE_H */