Changeset 3907a93274c05aa056b5169947891703a5c545c6
- Timestamp:
- 20/02/05 21:54:03
(4 years ago)
- Author:
- Yoann Peronneau <yoann@videolan.org>
- git-committer:
- Yoann Peronneau <yoann@videolan.org> 1108932843 +0000
- git-parent:
[2862cb0628d47d2845ac255e589e7d4f4ae9f427]
- git-author:
- Yoann Peronneau <yoann@videolan.org> 1108932843 +0000
- Message:
* src/misc/vlm.c: addded 'inputdel' setup command
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re485b11 |
r3907a93 |
|
| 982 | 982 | TAB_APPEND( media->i_input, media->input, input ); |
|---|
| 983 | 983 | } |
|---|
| | 984 | else if( !strcmp( psz_cmd, "inputdel" ) ) |
|---|
| | 985 | { |
|---|
| | 986 | char *input; |
|---|
| | 987 | int i; |
|---|
| | 988 | |
|---|
| | 989 | if( psz_value != NULL && strlen(psz_value) > 1 && |
|---|
| | 990 | ( psz_value[0] == '\'' || psz_value[0] == '\"' ) && |
|---|
| | 991 | ( psz_value[ strlen(psz_value) - 1 ] == '\'' || |
|---|
| | 992 | psz_value[ strlen(psz_value) - 1 ] == '\"' ) ) |
|---|
| | 993 | { |
|---|
| | 994 | input = malloc( strlen(psz_value) - 1 ); |
|---|
| | 995 | |
|---|
| | 996 | memcpy( input, psz_value + 1, strlen(psz_value) - 2 ); |
|---|
| | 997 | input[ strlen(psz_value) - 2 ] = '\0'; |
|---|
| | 998 | } |
|---|
| | 999 | else |
|---|
| | 1000 | { |
|---|
| | 1001 | input = strdup( psz_value ); |
|---|
| | 1002 | } |
|---|
| | 1003 | |
|---|
| | 1004 | for( i = 0; i < media->i_input; i++ ) |
|---|
| | 1005 | { |
|---|
| | 1006 | if( !strcmp( input, media->input[i] ) ) |
|---|
| | 1007 | { |
|---|
| | 1008 | TAB_REMOVE( media->i_input, media->input, media->input[i] ); |
|---|
| | 1009 | break; |
|---|
| | 1010 | } |
|---|
| | 1011 | } |
|---|
| | 1012 | } |
|---|
| 984 | 1013 | else if( !strcmp( psz_cmd, "output" ) ) |
|---|
| 985 | 1014 | { |
|---|
| … | … | |
| 1838 | 1867 | |
|---|
| 1839 | 1868 | message_child = MessageAdd( "Media Proprieties Syntax:" ); |
|---|
| 1840 | | MessageAddChild( "input (input_name)" ); |
|---|
| | 1869 | MessageAddChild( "input|inputdel (input_name)" ); |
|---|
| 1841 | 1870 | MessageAddChild( "output (output_name)" ); |
|---|
| 1842 | 1871 | MessageAddChild( "enabled|disabled" ); |
|---|