~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to command.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "libmpdemux/demuxer.h"
29
29
#include "libmpdemux/stheader.h"
30
30
#include "codec-cfg.h"
 
31
#include "mp_msg.h"
31
32
#include "mplayer.h"
32
33
#include "sub/sub.h"
33
34
#include "m_option.h"
214
215
}
215
216
 
216
217
 
217
 
/// \defgroup Properties
 
218
/// \defgroup properties Properties
218
219
///@{
219
220
 
220
221
/// \defgroup GeneralProperties General properties
514
515
    return M_PROPERTY_OK;
515
516
}
516
517
 
 
518
/// Number of titles in file
 
519
static int mp_property_titles(m_option_t *prop, int action, void *arg,
 
520
                              MPContext *mpctx)
 
521
{
 
522
    if (!mpctx->demuxer)
 
523
        return M_PROPERTY_UNAVAILABLE;
 
524
    if (mpctx->demuxer->num_titles == 0)
 
525
        stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_NUM_TITLES, &mpctx->demuxer->num_titles);
 
526
    return m_property_int_ro(prop, action, arg, mpctx->demuxer->num_titles);
 
527
}
 
528
 
517
529
/// Number of chapters in file
518
530
static int mp_property_chapters(m_option_t *prop, int action, void *arg,
519
531
                               MPContext *mpctx)
1075
1087
    case M_PROPERTY_STEP_DOWN:
1076
1088
#ifdef CONFIG_GUI
1077
1089
        if (use_gui)
1078
 
            guiGetEvent(guiIEvent, (char *) MP_CMD_VO_FULLSCREEN);
 
1090
            gui(GUI_RUN_COMMAND, (void *) MP_CMD_VO_FULLSCREEN);
1079
1091
        else
1080
1092
#endif
1081
1093
        if (vo_config_count)
2141
2153
     M_OPT_MIN, 0, 0, NULL },
2142
2154
    { "chapter", mp_property_chapter, CONF_TYPE_INT,
2143
2155
     M_OPT_MIN, 0, 0, NULL },
 
2156
    { "titles", mp_property_titles, CONF_TYPE_INT,
 
2157
     0, 0, 0, NULL },
2144
2158
    { "chapters", mp_property_chapters, CONF_TYPE_INT,
2145
2159
     0, 0, 0, NULL },
2146
2160
    { "angle", mp_property_angle, CONF_TYPE_INT,
2495
2509
    }
2496
2510
    return "UNKNOWN";
2497
2511
}
 
2512
///@}
2498
2513
 
2499
2514
static void remove_subtitle_range(MPContext *mpctx, int start, int count)
2500
2515
{
2558
2573
static void overlay_add(char *file, int id, int x, int y, unsigned col)
2559
2574
{
2560
2575
    FILE *f;
2561
 
    unsigned w, h, bpp, maxval;
 
2576
    int w, h, bpp, maxval;
2562
2577
    uint8_t *data;
2563
2578
    struct mp_eosd_image *img;
2564
2579
 
2801
2816
                    int i = 0;
2802
2817
                    if (n > 0)
2803
2818
                        for (i = 0; i < n; i++)
2804
 
                            uiNext();
 
2819
                            gui(GUI_RUN_COMMAND, (void *)MP_CMD_PLAY_TREE_STEP);
2805
2820
                    else
2806
2821
                        for (i = 0; i < -1 * n; i++)
2807
 
                            uiPrev();
 
2822
                            gui(GUI_RUN_COMMAND, (void *)-MP_CMD_PLAY_TREE_STEP);
2808
2823
                } else
2809
2824
#endif
2810
2825
                {
2966
2981
#ifdef CONFIG_GUI
2967
2982
            // playtree_iter isn't used by the GUI
2968
2983
            if (use_gui)
2969
 
                uiStop();
 
2984
                gui(GUI_RUN_COMMAND, (void *)MP_CMD_STOP);
2970
2985
            else
2971
2986
#endif
2972
2987
            // Go back to the starting point.
3509
3524
        break;
3510
3525
 
3511
3526
        default:
 
3527
#ifdef CONFIG_GUI
 
3528
                if (use_gui && cmd->id == MP_CMD_GUI)
 
3529
                    gui(GUI_RUN_MESSAGE, cmd->args[0].v.s);
 
3530
                else
 
3531
#endif
3512
3532
                mp_msg(MSGT_CPLAYER, MSGL_V,
3513
3533
                       "Received unknown cmd %s\n", cmd->name);
3514
3534
        }