Commit 8b17e3e8 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

mf: Use correct integral types.

parent 6d7d9226
......@@ -247,7 +247,7 @@ static HRESULT WINAPI sample_copier_transform_GetOutputAvailableType(IMFTransfor
return hr;
}
static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, DWORD *size)
static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, UINT32 *size)
{
GUID major, subtype;
UINT64 frame_size;
......@@ -281,7 +281,7 @@ static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, DWORD *size)
static HRESULT sample_copier_set_media_type(struct sample_copier *transform, BOOL input, DWORD id, IMFMediaType *type,
DWORD flags)
{
DWORD buffer_size;
UINT32 buffer_size;
HRESULT hr = S_OK;
if (id)
......
......@@ -1633,8 +1633,8 @@ static HRESULT video_renderer_configure_mixer(struct video_renderer *renderer)
if (SUCCEEDED(hr))
{
unsigned int input_count, output_count;
unsigned int *ids, *oids;
DWORD input_count, output_count;
DWORD *ids, *oids;
size_t i;
/* Create stream sinks for inputs that mixer already has by default. */
......
......@@ -1072,10 +1072,11 @@ static int __cdecl qsort_string_compare(const void *a, const void *b)
static HRESULT mf_get_handler_strings(const WCHAR *path, WCHAR filter, unsigned int maxlen, PROPVARIANT *dst)
{
static const HKEY hkey_roots[2] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };
unsigned int capacity = 0, count, size;
unsigned int capacity = 0, count;
HRESULT hr = S_OK;
int i, index;
WCHAR *buffW;
DWORD size;
if (!(buffW = calloc(maxlen, sizeof(*buffW))))
return E_OUTOFMEMORY;
......
......@@ -1493,7 +1493,7 @@ static HRESULT WINAPI audio_renderer_stream_type_handler_IsMediaTypeSupported(IM
IMFMediaType *in_type, IMFMediaType **out_type)
{
struct audio_renderer *renderer = impl_from_IMFMediaTypeHandler(iface);
unsigned int flags;
DWORD flags;
HRESULT hr;
TRACE("%p, %p, %p.\n", iface, in_type, out_type);
......@@ -1618,8 +1618,8 @@ static HRESULT WINAPI audio_renderer_stream_type_handler_SetCurrentMediaType(IMF
struct audio_renderer *renderer = impl_from_IMFMediaTypeHandler(iface);
const unsigned int test_flags = MF_MEDIATYPE_EQUAL_MAJOR_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_TYPES;
BOOL compare_result;
unsigned int flags;
HRESULT hr = S_OK;
DWORD flags;
TRACE("%p, %p.\n", iface, media_type);
......@@ -1777,11 +1777,12 @@ static HRESULT WINAPI audio_renderer_render_callback_GetParameters(IMFAsyncCallb
static void audio_renderer_render(struct audio_renderer *renderer, IMFAsyncResult *result)
{
unsigned int src_frames, dst_frames, max_frames, pad_frames, src_len;
unsigned int src_frames, dst_frames, max_frames, pad_frames;
struct queued_object *obj, *obj2;
BOOL keep_sample = FALSE;
IMFMediaBuffer *buffer;
BYTE *dst, *src;
DWORD src_len;
HRESULT hr;
LIST_FOR_EACH_ENTRY_SAFE(obj, obj2, &renderer->queue, struct queued_object, entry)
......
......@@ -185,7 +185,7 @@ struct topo_node
struct
{
IMFMediaSource *source;
unsigned int stream_id;
DWORD stream_id;
} source;
struct
{
......@@ -197,11 +197,11 @@ struct topo_node
struct
{
struct transform_stream *inputs;
unsigned int *input_map;
DWORD *input_map;
unsigned int input_count;
struct transform_stream *outputs;
unsigned int *output_map;
DWORD *output_map;
unsigned int output_count;
} transform;
} u;
......@@ -867,8 +867,9 @@ static void session_start(struct media_session *session, const GUID *time_format
static void session_set_started(struct media_session *session)
{
struct media_source *source;
unsigned int caps, flags;
IMFMediaEvent *event;
unsigned int caps;
DWORD flags;
session->state = SESSION_STATE_STARTED;
......@@ -1181,17 +1182,18 @@ static HRESULT session_add_media_sink(struct media_session *session, IMFTopology
return S_OK;
}
static unsigned int transform_node_get_stream_id(struct topo_node *node, BOOL output, unsigned int index)
static DWORD transform_node_get_stream_id(struct topo_node *node, BOOL output, unsigned int index)
{
unsigned int *map = output ? node->u.transform.output_map : node->u.transform.input_map;
DWORD *map = output ? node->u.transform.output_map : node->u.transform.input_map;
return map ? map[index] : index;
}
static HRESULT session_set_transform_stream_info(struct topo_node *node)
{
unsigned int *input_map = NULL, *output_map = NULL;
unsigned int i, input_count, output_count, block_alignment;
DWORD *input_map = NULL, *output_map = NULL;
DWORD i, input_count, output_count;
struct transform_stream *streams;
unsigned int block_alignment;
IMFMediaType *media_type;
GUID major = { 0 };
HRESULT hr;
......@@ -2130,7 +2132,7 @@ static HRESULT WINAPI session_commands_callback_Invoke(IMFAsyncCallback *iface,
struct media_session *session = impl_from_commands_callback_IMFAsyncCallback(iface);
struct topo_node *topo_node;
IMFTopologyNode *upstream_node;
unsigned int upstream_output;
DWORD upstream_output;
EnterCriticalSection(&session->cs);
......@@ -2460,8 +2462,8 @@ static void session_set_source_object_state(struct media_session *session, IUnkn
struct media_sink *sink;
enum object_state state;
struct topo_node *node;
unsigned int i, count;
BOOL changed = FALSE;
DWORD i, count;
HRESULT hr;
if ((state = session_get_object_state_for_event(event_type)) == OBJ_STATE_INVALID)
......@@ -2666,10 +2668,11 @@ static struct sample *transform_create_sample(IMFSample *sample)
static HRESULT transform_get_external_output_sample(const struct media_session *session, struct topo_node *transform,
unsigned int output_index, const MFT_OUTPUT_STREAM_INFO *stream_info, IMFSample **sample)
{
unsigned int buffer_size, downstream_input;
IMFTopologyNode *downstream_node;
IMFMediaBuffer *buffer = NULL;
struct topo_node *topo_node;
unsigned int buffer_size;
DWORD downstream_input;
TOPOID node_id;
HRESULT hr;
......@@ -2711,9 +2714,9 @@ static HRESULT transform_node_pull_samples(const struct media_session *session,
MFT_OUTPUT_STREAM_INFO stream_info;
MFT_OUTPUT_DATA_BUFFER *buffers;
struct sample *queued_sample;
HRESULT hr = E_UNEXPECTED;
DWORD status = 0;
unsigned int i;
HRESULT hr = E_UNEXPECTED;
if (!(buffers = calloc(node->u.transform.output_count, sizeof(*buffers))))
return E_OUTOFMEMORY;
......@@ -2886,7 +2889,7 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
static HRESULT session_request_sample_from_node(struct media_session *session, IMFTopologyNode *node, DWORD output)
{
IMFTopologyNode *downstream_node, *upstream_node;
unsigned int downstream_input, upstream_output;
DWORD downstream_input, upstream_output;
struct topo_node *topo_node;
MF_TOPOLOGY_TYPE node_type;
struct sample *sample;
......@@ -3535,8 +3538,8 @@ static HRESULT session_is_presentation_rate_supported(struct media_session *sess
struct media_source *source;
struct media_sink *sink;
float value = 0.0f, tmp;
unsigned int flags;
HRESULT hr = S_OK;
DWORD flags;
if (!nearest_rate) nearest_rate = &tmp;
......
......@@ -2381,8 +2381,9 @@ static HRESULT topology_loader_resolve_branch(struct topoloader_context *context
static HRESULT topology_loader_resolve_nodes(struct topoloader_context *context, unsigned int *layer_size)
{
IMFTopologyNode *downstream_node, *node, *orig_node;
unsigned int input_index, size = 0;
MF_TOPOLOGY_TYPE node_type;
unsigned int size = 0;
DWORD input_index;
HRESULT hr = S_OK;
TOPOID id;
......@@ -2444,7 +2445,7 @@ static BOOL topology_loader_is_node_d3d_aware(IMFTopologyNode *node)
return !!d3d_aware;
}
static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, unsigned int upstream_output,
static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, DWORD upstream_output,
IMFTopologyNode *downstream_node, unsigned int downstream_input, IMFTransform **copier)
{
IMFMediaType *input_type = NULL, *output_type = NULL;
......@@ -2483,7 +2484,7 @@ static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, uns
}
static HRESULT topology_loader_connect_copier(struct topoloader_context *context, IMFTopologyNode *upstream_node,
unsigned int upstream_output, IMFTopologyNode *downstream_node, unsigned int downstream_input, IMFTransform *copier)
DWORD upstream_output, IMFTopologyNode *downstream_node, DWORD downstream_input, IMFTransform *copier)
{
IMFTopologyNode *copier_node;
HRESULT hr;
......@@ -2506,9 +2507,9 @@ static HRESULT topology_loader_connect_d3d_aware_input(struct topoloader_context
IMFTopologyNode *node)
{
IMFTopologyNode *upstream_node;
unsigned int upstream_output;
IMFStreamSink *stream_sink;
IMFTransform *copier = NULL;
IMFStreamSink *stream_sink;
DWORD upstream_output;
HRESULT hr;
if (FAILED(hr = topology_node_get_object(node, &IID_IMFStreamSink, (void **)&stream_sink)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment