summaryrefslogtreecommitdiffstats
path: root/tests/OneMedia/src/com/android/onemedia/playback/RendererFactory.java
blob: f333fcea74be5ae9006df04c77e5523f5244ae45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.android.onemedia.playback;

import android.content.Context;
import android.media.MediaRouter;
import android.os.Bundle;
import android.util.Log;

/**
 * TODO: Insert description here.
 */
public class RendererFactory {
    private static final String TAG = "RendererFactory";

    public Renderer createRenderer(MediaRouter.RouteInfo route, Context context, Bundle params) {
        if (route.getPlaybackType() == MediaRouter.RouteInfo.PLAYBACK_TYPE_LOCAL) {
            return new LocalRenderer(context, params);
        }
        Log.e(TAG, "Unable to create renderer for route of playback type "
                + route.getPlaybackType());
        return null;
    }
}