drag edithandle rework, lib x264/x265 update, dvb fixes, batchrender boot_defaults...
authorGood Guy <good1.2guy@gmail.com>
Sat, 19 Jan 2019 23:14:16 +0000 (16:14 -0700)
committerGood Guy <good1.2guy@gmail.com>
Sat, 19 Jan 2019 23:14:16 +0000 (16:14 -0700)
24 files changed:
cinelerra-5.1/blds/bld_prepare.sh
cinelerra-5.1/cinelerra/batchrender.C
cinelerra-5.1/cinelerra/chantables.C
cinelerra-5.1/cinelerra/chantables.h
cinelerra-5.1/cinelerra/devicedvbinput.C
cinelerra-5.1/cinelerra/edit.C
cinelerra-5.1/cinelerra/edit.h
cinelerra-5.1/cinelerra/edits.C
cinelerra-5.1/cinelerra/edl.inc
cinelerra-5.1/cinelerra/edlsession.C
cinelerra-5.1/cinelerra/interfaceprefs.C
cinelerra-5.1/cinelerra/labels.C
cinelerra-5.1/cinelerra/mwindowedit.C
cinelerra-5.1/cinelerra/track.C
cinelerra-5.1/cinelerra/track.h
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/cinelerra/tracksedit.C
cinelerra-5.1/configure.ac
cinelerra-5.1/doc/shortcuts.html
cinelerra-5.1/thirdparty/src/x264-snapshot-20180118-2245.tar.xz [deleted file]
cinelerra-5.1/thirdparty/src/x264-snapshot-20190117-2245-stable.patch1 [moved from cinelerra-5.1/thirdparty/src/x264-snapshot-20180118-2245.patch1 with 100% similarity]
cinelerra-5.1/thirdparty/src/x264-snapshot-20190117-2245-stable.tar.xz [new file with mode: 0644]
cinelerra-5.1/thirdparty/src/x265_2.8.tar.xz [deleted file]
cinelerra-5.1/thirdparty/src/x265_2.9.tar.xz [new file with mode: 0644]

index fa9c6096eadb4e5a6b7f2f00f21d0343075f9275..471ea7e9ca81d4790d257c9bfd89589a421074f0 100755 (executable)
@@ -74,7 +74,7 @@ case "$dir" in
     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
     fonts-dejavu libopenexr-dev festival libfftw3-dev gdb \
-    libdc1394-22-dev libesd0-dev libflac-dev libjbig-dev libvdpau-dev \
+    libdc1394-22-dev libflac-dev libjbig-dev libvdpau-dev \
     inkscape libsndfile1-dev libtheora-dev cmake udftools libxml2-utils git \
     autoconf automake debhelper libgtk2.0-dev
   ;;
@@ -86,7 +86,7 @@ case "$dir" in
     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
     fonts-dejavu libopenexr-dev libavc1394-dev festival-dev fftw3-dev gdb \
-    libdc1394-22-dev libiec61883-dev libesd0-dev libflac-dev libjbig-dev \
+    libdc1394-22-dev libiec61883-dev libflac-dev libjbig-dev \
     libvdpau-dev libsndfile1-dev libtheora-dev cmake udftools libxml2-utils \
     git inkscape autoconf automake debhelper libgtk2.0-dev
   ;;
index ae1cef938410cd79ceefa0a9592cde373f79704f..e8e5fc33a863b6448a0c8c991b34b002397dda2b 100644 (file)
@@ -510,6 +510,7 @@ void BatchRenderThread::start_rendering(char *config_path,
 //PRINT_TRACE
 // Initialize stuff which MWindow does.
        signals->initialize("/tmp/cinelerra_batch%d.dmp");
+       boot_defaults = 0;
        MWindow::init_defaults(boot_defaults, config_path);
        load_defaults(boot_defaults);
        preferences = new Preferences;
index d2ede07f04da50eb49290d2b77c6ac027f333d34..a77a7ea8f6072afe55664c9c6bc82ebb19196d94 100644 (file)
 
 static CHANLIST ntsc_dvb[] =
 {
-    { "2",      57 },
-    { "3",      63 },
-    { "4",      69 },
-    { "5",      79 },
-    { "6",      85 },
-    { "7",     177 },
-    { "8",     183 },
-    { "9",     189 },
-    { "10",    195 },
-    { "11",    201 },
-    { "12",    207 },
-    { "13",    213 },
-    { "14",    473 },
-    { "15",    479 },
-    { "16",    485 },
-    { "17",    491 },
-    { "18",    497 },
-    { "19",    503 },
-    { "20",    509 },
-    { "21",    515 },
-    { "22",    521 },
-    { "23",    527 },
-    { "24",    533 },
-    { "25",    539 },
-    { "26",    545 },
-    { "27",    551 },
-    { "28",    557 },
-    { "29",    563 },
-    { "30",    569 },
-    { "31",    575 },
-    { "32",    581 },
-    { "33",    587 },
-    { "34",    593 },
-    { "35",    599 },
-    { "36",    605 },
-    { "37",    611 },
-    { "38",    617 },
-    { "39",    623 },
-    { "40",    629 },
-    { "41",    635 },
-    { "42",    641 },
-    { "43",    647 },
-    { "44",    653 },
-    { "45",    659 },
-    { "46",    665 },
-    { "47",    671 },
-    { "48",    677 },
-    { "49",    683 },
-    { "50",    689 },
-    { "51",    695 },
-    { "52",    701 },
-    { "53",    707 },
-    { "54",    713 },
-    { "55",    719 },
-    { "56",    725 },
-    { "57",    731 },
-    { "58",    737 },
-    { "59",    743 },
-    { "60",    749 },
-    { "61",    755 },
-    { "62",    761 },
-    { "63",    767 },
-    { "64",    773 },
-    { "65",    779 },
-    { "66",    785 },
-    { "67",    791 },
-    { "68",    797 },
-    { "69",    803 },
-    { "70",    809 },
-    { "71",    815 },
-    { "72",    821 },
-    { "73",    827 },
-    { "74",    833 },
-    { "75",    839 },
-    { "76",    845 },
-    { "77",    851 },
-    { "78",    857 },
-    { "79",    863 },
-    { "80",    869 },
-    { "81",    875 },
-    { "82",    881 },
-    { "83",    887 },
-    { "84",    893 },
-    { "85",    899 },
-    { "86",    905 },
-    { "87",    911 },
-    { "88",    917 },
-    { "89",    923 },
-    { "90",    929 },
-    { "91",    935 },
-    { "92",    941 },
-    { "93",    947 },
-    { "94",    953 },
-    { "95",    959 },
-    { "96",    965 },
-    { "97",    971 },
-    { "98",    977 },
-    { "99",    983 },
-    { "100",   989 },
-    { "101",   995 },
-    { "102",  1001 },
-    { "103",  1007 },
-    { "104",  1013 },
-    { "105",  1019 },
-    { "106",  1025 },
-    { "107",  1031 },
-    { "108",  1037 },
-    { "109",  1043 },
+    { "2",      57000 },
+    { "3",      63000 },
+    { "4",      69000 },
+    { "5",      79000 },
+    { "6",      85000 },
+    { "7",     177000 },
+    { "8",     183000 },
+    { "9",     189000 },
+    { "10",    195000 },
+    { "11",    201000 },
+    { "12",    207000 },
+    { "13",    213000 },
+    { "14",    473000 },
+    { "15",    479000 },
+    { "16",    485000 },
+    { "17",    491000 },
+    { "18",    497000 },
+    { "19",    503000 },
+    { "20",    509000 },
+    { "21",    515000 },
+    { "22",    521000 },
+    { "23",    527000 },
+    { "24",    533000 },
+    { "25",    539000 },
+    { "26",    545000 },
+    { "27",    551000 },
+    { "28",    557000 },
+    { "29",    563000 },
+    { "30",    569000 },
+    { "31",    575000 },
+    { "32",    581000 },
+    { "33",    587000 },
+    { "34",    593000 },
+    { "35",    599000 },
+    { "36",    605000 },
+    { "37",    611000 },
+    { "38",    617000 },
+    { "39",    623000 },
+    { "40",    629000 },
+    { "41",    635000 },
+    { "42",    641000 },
+    { "43",    647000 },
+    { "44",    653000 },
+    { "45",    659000 },
+    { "46",    665000 },
+    { "47",    671000 },
+    { "48",    677000 },
+    { "49",    683000 },
+    { "50",    689000 },
+    { "51",    695000 },
+    { "52",    701000 },
+    { "53",    707000 },
+    { "54",    713000 },
+    { "55",    719000 },
+    { "56",    725000 },
+    { "57",    731000 },
+    { "58",    737000 },
+    { "59",    743000 },
+    { "60",    749000 },
+    { "61",    755000 },
+    { "62",    761000 },
+    { "63",    767000 },
+    { "64",    773000 },
+    { "65",    779000 },
+    { "66",    785000 },
+    { "67",    791000 },
+    { "68",    797000 },
+    { "69",    803000 },
+    { "70",    809000 },
+    { "71",    815000 },
+    { "72",    821000 },
+    { "73",    827000 },
+    { "74",    833000 },
+    { "75",    839000 },
+    { "76",    845000 },
+    { "77",    851000 },
+    { "78",    857000 },
+    { "79",    863000 },
+    { "80",    869000 },
+    { "81",    875000 },
+    { "82",    881000 },
+    { "83",    887000 },
+    { "84",    893000 },
+    { "85",    899000 },
+    { "86",    905000 },
+    { "87",    911000 },
+    { "88",    917000 },
+    { "89",    923000 },
+    { "90",    929000 },
+    { "91",    935000 },
+    { "92",    941000 },
+    { "93",    947000 },
+    { "94",    953000 },
+    { "95",    959000 },
+    { "96",    965000 },
+    { "97",    971000 },
+    { "98",    977000 },
+    { "99",    983000 },
+    { "100",   989000 },
+    { "101",   995000 },
+    { "102",  1001000 },
+    { "103",  1007000 },
+    { "104",  1013000 },
+    { "105",  1019000 },
+    { "106",  1025000 },
+    { "107",  1031000 },
+    { "108",  1037000 },
+    { "109",  1043000 },
 };
 
 static CHANLIST catv_dvb[] =
 {
-    { "2",     57 },
-    { "3",     63 },
-    { "4",     69 },
-    { "5",     79 },
-    { "6",     85 },
-    { "7",    177 },
-    { "8",    183 },
-    { "9",    189 },
-    { "10",    195 },
-    { "11",    201 },
-    { "12",    207 },
-    { "13",    213 },
-    { "14",    123 },
-    { "15",    129 },
-    { "16",    135 },
-    { "17",    141 },
-    { "18",    147 },
-    { "19",    153 },
-    { "20",    159 },
-    { "21",    165 },
-    { "22",    171 },
-    { "23",    219 },
-    { "24",    225 },
-    { "25",    231 },
-    { "26",    237 },
-    { "27",    243 },
-    { "28",    249 },
-    { "29",    255 },
-    { "30",    261 },
-    { "31",    267 },
-    { "32",    273 },
-    { "33",    279 },
-    { "34",    285 },
-    { "35",    291 },
-    { "36",    297 },
-    { "37",    303 },
-    { "38",    309 },
-    { "39",    315 },
-    { "40",    321 },
-    { "41",    327 },
-    { "42",    333 },
-    { "43",    339 },
-    { "44",    345 },
-    { "45",    351 },
-    { "46",    357 },
-    { "47",    363 },
-    { "48",    369 },
-    { "49",    375 },
-    { "50",    381 },
-    { "51",    387 },
-    { "52",    393 },
-    { "53",    399 },
-    { "54",    405 },
-    { "55",    411 },
-    { "56",    417 },
-    { "57",    423 },
-    { "58",    429 },
-    { "59",    435 },
-    { "60",    441 },
-    { "61",    447 },
-    { "62",    453 },
-    { "63",    459 },
-    { "64",    465 },
-    { "65",    471 },
-    { "66",    477 },
-    { "67",    483 },
-    { "68",    489 },
-    { "69",    495 },
-    { "70",    501 },
-    { "71",    507 },
-    { "72",    513 },
-    { "73",    519 },
-    { "74",    525 },
-    { "75",    531 },
-    { "76",    537 },
-    { "77",    543 },
-    { "78",    549 },
-    { "79",    555 },
-    { "80",    561 },
-    { "81",    567 },
-    { "82",    573 },
-    { "83",    579 },
-    { "84",    585 },
-    { "85",    591 },
-    { "86",    597 },
-    { "87",    603 },
-    { "88",    609 },
-    { "89",    615 },
-    { "90",    621 },
-    { "91",    627 },
-    { "92",    633 },
-    { "93",    639 },
-    { "94",    645 },
-    { "95",     93 },
-    { "96",     99 },
-    { "97",    105 },
-    { "98",    111 },
-    { "99",    117 },
-    { "100",    651 },
-    { "101",    657 },
-    { "102",    663 },
-    { "103",    669 },
-    { "104",    675 },
-    { "105",    681 },
-    { "106",    687 },
-    { "107",    693 },
-    { "108",    699 },
-    { "109",    705 },
-    { "110",    711 },
-    { "111",    717 },
-    { "112",    723 },
-    { "113",    729 },
-    { "114",    735 },
-    { "115",    741 },
-    { "116",    747 },
-    { "117",    753 },
-    { "118",    759 },
-    { "119",    765 },
-    { "120",    771 },
-    { "121",    777 },
-    { "122",    783 },
-    { "123",    789 },
-    { "124",    795 },
-    { "125",    781 },
-    { "126",    807 },
-    { "127",    813 },
-    { "128",    819 },
-    { "129",    825 },
-    { "130",    831 },
-    { "131",    837 },
-    { "132",    843 },
-    { "133",    849 },
-    { "134",    855 },
-    { "135",    861 },
-    { "136",    867 },
-    { "137",    873 },
-    { "138",    879 },
-    { "139",    885 },
-    { "140",    891 },
-    { "141",    897 },
-    { "142",    903 },
-    { "143",    909 },
-    { "144",    915 },
-    { "145",    921 },
-    { "146",    927 },
-    { "147",    933 },
-    { "148",    939 },
-    { "149",    945 },
-    { "150",    951 },
-    { "151",    957 },
-    { "152",    963 },
-    { "153",    969 },
-    { "154",    975 },
-    { "155",    981 },
-    { "156",    987 },
-    { "157",    993 },
-    { "158",    999 },
+    { "2",     57000 },
+    { "3",     63000 },
+    { "4",     69000 },
+    { "5",     79000 },
+    { "6",     85000 },
+    { "7",    177000 },
+    { "8",    183000 },
+    { "9",    189000 },
+    { "10",    195000 },
+    { "11",    201000 },
+    { "12",    207000 },
+    { "13",    213000 },
+    { "14",    123000 },
+    { "15",    129000 },
+    { "16",    135000 },
+    { "17",    141000 },
+    { "18",    147000 },
+    { "19",    153000 },
+    { "20",    159000 },
+    { "21",    165000 },
+    { "22",    171000 },
+    { "23",    219000 },
+    { "24",    225000 },
+    { "25",    231000 },
+    { "26",    237000 },
+    { "27",    243000 },
+    { "28",    249000 },
+    { "29",    255000 },
+    { "30",    261000 },
+    { "31",    267000 },
+    { "32",    273000 },
+    { "33",    279000 },
+    { "34",    285000 },
+    { "35",    291000 },
+    { "36",    297000 },
+    { "37",    303000 },
+    { "38",    309000 },
+    { "39",    315000 },
+    { "40",    321000 },
+    { "41",    327000 },
+    { "42",    333000 },
+    { "43",    339000 },
+    { "44",    345000 },
+    { "45",    351000 },
+    { "46",    357000 },
+    { "47",    363000 },
+    { "48",    369000 },
+    { "49",    375000 },
+    { "50",    381000 },
+    { "51",    387000 },
+    { "52",    393000 },
+    { "53",    399000 },
+    { "54",    405000 },
+    { "55",    411000 },
+    { "56",    417000 },
+    { "57",    423000 },
+    { "58",    429000 },
+    { "59",    435000 },
+    { "60",    441000 },
+    { "61",    447000 },
+    { "62",    453000 },
+    { "63",    459000 },
+    { "64",    465000 },
+    { "65",    471000 },
+    { "66",    477000 },
+    { "67",    483000 },
+    { "68",    489000 },
+    { "69",    495000 },
+    { "70",    501000 },
+    { "71",    507000 },
+    { "72",    513000 },
+    { "73",    519000 },
+    { "74",    525000 },
+    { "75",    531000 },
+    { "76",    537000 },
+    { "77",    543000 },
+    { "78",    549000 },
+    { "79",    555000 },
+    { "80",    561000 },
+    { "81",    567000 },
+    { "82",    573000 },
+    { "83",    579000 },
+    { "84",    585000 },
+    { "85",    591000 },
+    { "86",    597000 },
+    { "87",    603000 },
+    { "88",    609000 },
+    { "89",    615000 },
+    { "90",    621000 },
+    { "91",    627000 },
+    { "92",    633000 },
+    { "93",    639000 },
+    { "94",    645000 },
+    { "95",     93000 },
+    { "96",     99000 },
+    { "97",    105000 },
+    { "98",    111000 },
+    { "99",    117000 },
+    { "100",    651000 },
+    { "101",    657000 },
+    { "102",    663000 },
+    { "103",    669000 },
+    { "104",    675000 },
+    { "105",    681000 },
+    { "106",    687000 },
+    { "107",    693000 },
+    { "108",    699000 },
+    { "109",    705000 },
+    { "110",    711000 },
+    { "111",    717000 },
+    { "112",    723000 },
+    { "113",    729000 },
+    { "114",    735000 },
+    { "115",    741000 },
+    { "116",    747000 },
+    { "117",    753000 },
+    { "118",    759000 },
+    { "119",    765000 },
+    { "120",    771000 },
+    { "121",    777000 },
+    { "122",    783000 },
+    { "123",    789000 },
+    { "124",    795000 },
+    { "125",    781000 },
+    { "126",    807000 },
+    { "127",    813000 },
+    { "128",    819000 },
+    { "129",    825000 },
+    { "130",    831000 },
+    { "131",    837000 },
+    { "132",    843000 },
+    { "133",    849000 },
+    { "134",    855000 },
+    { "135",    861000 },
+    { "136",    867000 },
+    { "137",    873000 },
+    { "138",    879000 },
+    { "139",    885000 },
+    { "140",    891000 },
+    { "141",    897000 },
+    { "142",    903000 },
+    { "143",    909000 },
+    { "144",    915000 },
+    { "145",    921000 },
+    { "146",    927000 },
+    { "147",    933000 },
+    { "148",    939000 },
+    { "149",    945000 },
+    { "150",    951000 },
+    { "151",    957000 },
+    { "152",    963000 },
+    { "153",    969000 },
+    { "154",    975000 },
+    { "155",    981000 },
+    { "156",    987000 },
+    { "157",    993000 },
+    { "158",    999000 },
 };
 
 static CHANLIST ntsc_bcast[] =
index 38f6fb9e73bac4ae09f4a168a5b1ab7b9a256a7a..31287419102c18d9dfa66f7a92c1e585025671f0 100644 (file)
@@ -38,8 +38,6 @@ typedef struct
 
 #define CHAN_COUNT(x) (sizeof(x)/sizeof(CHANLIST))
 
-extern CHANLISTS chanlists[];
-
 #define NTSC_AUDIO_CARRIER     4500
 #define PAL_AUDIO_CARRIER_I    6000
 #define PAL_AUDIO_CARRIER_BGHN 5500
@@ -69,5 +67,8 @@ extern CHANLISTS chanlists[];
 #define PAL_NEWZEALAND 10
 #define PAL_AUSTRALIA 11
 #define PAL_IRELAND 12
+#define CHANLIST_SIZE 13
+
+extern CHANLISTS chanlists[CHANLIST_SIZE];
 
 #endif
index 9829611a0870f40d2ea339fea44940b2289717d7..1f38b838627a2b7a4b940a425e7501ffe79d0f2e 100644 (file)
@@ -225,6 +225,7 @@ int DeviceDVBInput::dvb_sync()
        return 1;
 }
 
+// Return values: 0 = OK, 1 = unreported error, 2 = error reported to stderr
 int DeviceDVBInput::dvb_open()
 {
        int ret = 0;
@@ -234,13 +235,13 @@ int DeviceDVBInput::dvb_open()
           (frontend_fd = ::open(frontend_path, O_RDWR)) < 0 ) {
                fprintf(stderr, "DeviceDVBInput::dvb_open %s: %s\n",
                        frontend_path, strerror(errno));
-               ret = 1;
+               ret = 2;
        }
        if( !ret && ioctl(frontend_fd, FE_GET_INFO, &fe_info) < 0 ) {
                fprintf(stderr,
                        "DeviceDVBInput::dvb_open FE_GET_INFO: %s\n",
                        strerror(errno));
-               ret = 1;
+               ret = 2;
        }
 
        pwr_min = snr_min = 0;
@@ -250,72 +251,87 @@ int DeviceDVBInput::dvb_open()
        int index = -1, table = -1;
        if( !ret && (index = get_channel()) < 0 ) ret = 1;
        if( !ret && (table = get_channel_table()) < 0 ) ret = 1;
+       if( !ret && table >= CHANLIST_SIZE ) ret = 1;
+
+       struct dvb_frontend_parameters frontend_param;
        if( !ret ) {
-               uint32_t frequency = 0;
-               struct dvb_frontend_parameters frontend_param;
-               bzero(&frontend_param, sizeof(frontend_param));
-               ret = 1;
-               switch(table) {
-               case NETTUNE_AIR:
-                       if( index >= chanlists[NTSC_DVB].count ) break;
-                       frequency = chanlists[NTSC_DVB].list[index].freq * 1000000;
-                       if( frequency < fe_info.frequency_min ||
-                               frequency > fe_info.frequency_max ) break;
-                       frontend_param.frequency = frequency;
+               uint32_t frequency = chanlists[table].list[index].freq * 1000;
+               if( frequency < fe_info.frequency_min ||
+                       frequency > fe_info.frequency_max )  {
+                       fprintf(stderr,
+                               "DeviceDVBInput::dvb_open channel %s frequency %d out of range %d-%d\n",
+                               chanlists[table].list[index].name, frequency, fe_info.frequency_min, fe_info.frequency_max);
+                        ret = 2;
+               }
+               memset(&frontend_param, 0, sizeof(frontend_param));
+               frontend_param.frequency = frequency;
+       }
+       if( !ret ) {
+               switch( table ) {
+               case NTSC_DVB:
+               case NTSC_BCAST:
+               case NTSC_HRC:
+               case NTSC_BCAST_JP:
                        frontend_param.u.vsb.modulation = VSB_8;
-                       ret = 0;
                        break;
-               case NETTUNE_CABLE:
-                       if( index >= chanlists[CATV_DVB].count ) break;
-                       frequency = chanlists[CATV_DVB].list[index].freq * 1000000;
-                       if( frequency < fe_info.frequency_min ||
-                               frequency > fe_info.frequency_max ) break;
-                       frontend_param.frequency = frequency;
+               case PAL_EUROPE:
+               case PAL_E_EUROPE:
+               case PAL_ITALY:
+               case PAL_NEWZEALAND:
+               case PAL_AUSTRALIA:
+               case PAL_IRELAND:
+               case CATV_DVB:
+               case NTSC_CABLE:
+               case NTSC_CABLE_JP:
                        frontend_param.u.vsb.modulation = QAM_AUTO;
-                       ret = 0;
                        break;
-               }
-
-               if( !ret && ioctl(frontend_fd, FE_SET_FRONTEND, &frontend_param) < 0 ) {
+               default:
                        fprintf(stderr,
-                               "DeviceDVBInput::dvb_open FE_SET_FRONTEND frequency=%d: %s\n",
-                               frontend_param.frequency, strerror(errno));
-                       ret = 1;
+                               "DeviceDVBInput::dvb_open bad table index=%d\n", table);
+                       ret = 2;
+                       break;
                }
+       }
 
-               if( !ret && wait_signal(333,3) ) {
-                       fprintf(stderr,
-                                "DeviceDVBInput::dvb_open: no signal, index=%d frequency=%d\n",
-                               index, frontend_param.frequency);
-                       ret = 1;
-               }
+       if( !ret && ioctl(frontend_fd, FE_SET_FRONTEND, &frontend_param) < 0 ) {
+               fprintf(stderr,
+                       "DeviceDVBInput::dvb_open FE_SET_FRONTEND frequency=%d: %s\n",
+                       frontend_param.frequency, strerror(errno));
+               ret = 2;
+       }
 
-               if( !ret && ioctl(frontend_fd, FE_GET_FRONTEND, &frontend_param) ) {
-                       fprintf(stderr,
-                               "DeviceDVBInput::dvb_open FE_GET_FRONTEND: %s\n",
-                               strerror(errno));
-                       ret = 1;
+       if( !ret && wait_signal(333,3) ) {
+               fprintf(stderr,
+                        "DeviceDVBInput::dvb_open: no signal, index=%d, channel %s, frequency=%d\n",
+                       index, chanlists[table].list[index].name, frontend_param.frequency);
+               ret = 2;
+       }
+
+       if( !ret && ioctl(frontend_fd, FE_GET_FRONTEND, &frontend_param) ) {
+               fprintf(stderr,
+                       "DeviceDVBInput::dvb_open FE_GET_FRONTEND: %s\n",
+                       strerror(errno));
+               ret = 2;
+       }
+       if( !ret ) { // goofy quirks
+               if( !strcmp("Samsung S5H1409 QAM/8VSB Frontend", fe_info.name) ) {
+                       switch(frontend_param.u.vsb.modulation) {
+                       case QAM_64:  snr_min = 200;  snr_max = 300;  break;
+                       case QAM_256: snr_min = 260;  snr_max = 400;  break;
+                       case VSB_8:   snr_min = 111;  snr_max = 300;  break;
+                       default: break;
+                       }
+                       pwr_min = snr_min;  pwr_max = snr_max;
+               }
+               else if( !strcmp("Auvitek AU8522 QAM/8VSB Frontend", fe_info.name) ) {
+                       switch(frontend_param.u.vsb.modulation) {
+                       case QAM_64:  snr_min = 190;  snr_max = 290;  break;
+                       case QAM_256: snr_min = 280;  snr_max = 400;  break;
+                       case VSB_8:   snr_min = 115;  snr_max = 270;  break;
+                       default: break;
+                       }
+                       pwr_min = snr_min;  pwr_max = snr_max;
                }
-               if( !ret ) { // goofy quirks
-                       if( !strcmp("Samsung S5H1409 QAM/8VSB Frontend", fe_info.name) ) {
-                               switch(frontend_param.u.vsb.modulation) {
-                               case QAM_64:  snr_min = 200;  snr_max = 300;  break;
-                               case QAM_256: snr_min = 260;  snr_max = 400;  break;
-                               case VSB_8:   snr_min = 111;  snr_max = 300;  break;
-                               default: break;
-                               }
-                               pwr_min = snr_min;  pwr_max = snr_max;
-                       }
-                       else if( !strcmp("Auvitek AU8522 QAM/8VSB Frontend", fe_info.name) ) {
-                               switch(frontend_param.u.vsb.modulation) {
-                               case QAM_64:  snr_min = 190;  snr_max = 290;  break;
-                               case QAM_256: snr_min = 280;  snr_max = 400;  break;
-                               case VSB_8:   snr_min = 115;  snr_max = 270;  break;
-                               default: break;
-                               }
-                               pwr_min = snr_min;  pwr_max = snr_max;
-                       }
-               }
        }
 
        if( !ret && (demux_fd = ::open(demux_path, O_RDWR)) < 0 ) {
@@ -323,7 +339,7 @@ int DeviceDVBInput::dvb_open()
                        "DeviceDVBInput::dvb_open %s for video: %s\n",
                        demux_path,
                        strerror(errno));
-               ret = 1;
+               ret = 2;
        }
 
 // Setting exactly one PES filter to 0x2000 dumps the entire
@@ -385,7 +401,7 @@ int DeviceDVBInput::dvb_status()
        if( fe < 0 ) return -1;
        fe_status_t st;  memset(&st, 0, sizeof(st));
        if( ioctl(fe, FE_READ_STATUS, &st) ) return 1;
-        if( (st & FE_TIMEDOUT) != 0 ) return 1;
+       if( (st & FE_TIMEDOUT) != 0 ) return 1;
        signal_lck = (st & FE_HAS_LOCK) != 0 ? 1 : 0;
        signal_crr = (st & FE_HAS_CARRIER) != 0 ? 1 : 0;
        uint16_t power = 0;
@@ -425,10 +441,9 @@ int DeviceDVBInput::open_dev(int color_model)
 {
        int ret = 0;
        dvb_lock->lock("DeviceDVBInput::open_dev");
-       if( dvb_fd < 0 )
-       {
+       if( dvb_fd < 0 ) {
                ret = dvb_open();
-               if( ret ) {
+               if( ret == 1 ) {
                        printf("DeviceDVBInput::open_dev: adaptor %s open failed\n",
                                dev_name);
                }
index 20e8b93bff063052288fde2966e89733f5e97347..7618d48dbcd96bb5f32f7325f91d389a1fe639cb 100644 (file)
@@ -29,6 +29,7 @@
 #include "edlsession.h"
 #include "filexml.h"
 #include "filesystem.h"
+#include "labels.h"
 #include "localsession.h"
 #include "plugin.h"
 #include "mainsession.h"
@@ -417,354 +418,152 @@ int Edit::load_properties(FileXML *file, int64_t &startproject)
 
 void Edit::shift(int64_t difference)
 {
-//printf("Edit::shift 1 %p %jd %jd\n", this, startproject, difference);
        startproject += difference;
-//printf("Edit::shift 2 %jd %jd\n", startproject, difference);
 }
 
-int Edit::shift_start_in(int edit_mode,
-       int64_t newposition,
-       int64_t oldposition,
-       int edit_edits,
-       int edit_labels,
-       int edit_plugins,
-       int edit_autos,
-       Edits *trim_edits)
+
+int Edit::shift_start(int edit_mode, int64_t newposition, int64_t oldposition,
+        int edit_edits, int edit_labels, int edit_plugins, int edit_autos,
+        Edits *trim_edits)
 {
+       int64_t startproject = this->startproject;
+       int64_t startsource = this->startsource;
+       int64_t length = this->length;
+       int64_t source_len = get_source_end(startsource + length);
        int64_t cut_length = newposition - oldposition;
-       int64_t end_previous_source, end_source;
-
-       if(edit_mode == MOVE_ALL_EDITS)
-       {
-               if(cut_length < length)
-               {        // clear partial
-                       edits->clear_recursive(oldposition,
-                               newposition,
-                               edit_edits,
-                               edit_labels,
-                               edit_plugins,
-                               edit_autos,
-                               trim_edits);
-               }
-               else
-               {        // clear entire
-                       edits->clear_recursive(oldposition,
-                               startproject + length,
-                               edit_edits,
-                               edit_labels,
-                               edit_plugins,
-                               edit_autos,
-                               trim_edits);
-               }
-       }
-       else
-       if(edit_mode == MOVE_ONE_EDIT)
-       {
-// Paste silence and cut
-//printf("Edit::shift_start_in 1\n");
-               if(!previous)
-               {
-                       Edit *new_edit = edits->create_edit();
-                       new_edit->startproject = this->startproject;
-                       new_edit->length = 0;
-                       edits->insert_before(this,
-                               new_edit);
-               }
-//printf("Edit::shift_start_in 2 %p\n", previous);
-
-               end_previous_source = previous->get_source_end(previous->startsource + previous->length + cut_length);
-               if(end_previous_source > 0 &&
-                       previous->startsource + previous->length + cut_length > end_previous_source)
-                       cut_length = end_previous_source - previous->startsource - previous->length;
-
-               if(cut_length < length)
-               {               // Move in partial
-                       startproject += cut_length;
-                       startsource += cut_length;
-                       length -= cut_length;
-                       previous->length += cut_length;
-//printf("Edit::shift_start_in 2\n");
-               }
-               else
-               {               // Clear entire edit
-                       cut_length = length;
-                       previous->length += cut_length;
-                       for(Edit* current_edit = this; current_edit; current_edit = current_edit->next)
-                       {
-                               current_edit->startproject += cut_length;
-                       }
-                       edits->clear_recursive(oldposition + cut_length,
-                               startproject + cut_length,
-                               edit_edits,
-                               edit_labels,
-                               edit_plugins,
-                               edit_autos,
-                               trim_edits);
-               }
-//printf("Edit::shift_start_in 3\n");
-       }
-       else
-       if(edit_mode == MOVE_NO_EDITS)
-       {
-               end_source = get_source_end(startsource + length + cut_length);
-               if(end_source > 0 && startsource + length + cut_length > end_source)
-                       cut_length = end_source - startsource - length;
+       source_len -= cut_length;
 
+       switch( edit_mode ) {
+       case MOVE_EDGE:
+               startproject += cut_length;
+               startsource += cut_length;
+               length -= cut_length;
+               break;
+       case MOVE_MEDIA:
                startsource += cut_length;
+               break;
+       case MOVE_EDGE_MEDIA:
+               startproject += cut_length;
+               length -= cut_length;
+               break;
        }
-       return 0;
-}
-
-int Edit::shift_start_out(int edit_mode,
-       int64_t newposition,
-       int64_t oldposition,
-       int edit_edits,
-       int edit_labels,
-       int edit_plugins,
-       int edit_autos,
-       Edits *trim_edits)
-{
-       int64_t cut_length = oldposition - newposition;
-
 
-       if(asset || nested_edl)
-       {
-               int64_t end_source = get_source_end(1);
-
-//printf("Edit::shift_start_out 1 %jd %jd\n", startsource, cut_length);
-               if(end_source > 0 && startsource < cut_length)
-               {
-                       cut_length = startsource;
-               }
+       if( startproject < 0 ) {
+               startsource += startproject;
+               length += startproject;
+               startproject = 0;
        }
-
-       if(edit_mode == MOVE_ALL_EDITS)
-       {
-//printf("Edit::shift_start_out 10 %jd\n", cut_length);
-               startsource -= cut_length;
-               length += cut_length;
-
-               if(edit_autos)
-                       edits->shift_keyframes_recursive(startproject,
-                               cut_length);
-               if(edit_plugins)
-                       edits->shift_effects_recursive(startproject,
-                               cut_length,
-                               edit_autos);
-
-               for(Edit* current_edit = next; current_edit; current_edit = current_edit->next)
-               {
-                       current_edit->startproject += cut_length;
-               }
+       if( startsource < 0 )
+               startsource = 0;
+       if( length > source_len )
+               length = source_len;
+       if( length < 0 )
+               length = 0;
+
+       int64_t start = this->startproject;
+       int64_t end = start + this->length;
+       if( edit_labels ) {
+               double cut_len = track->from_units(cut_length);
+               double start_pos = edits->track->from_units(start);
+               edits->edl->labels->insert(start_pos, cut_len);
+               double end_pos = edits->track->from_units(end);
+               edits->edl->labels->insert(end_pos + cut_len, -cut_len);
        }
-       else
-       if(edit_mode == MOVE_ONE_EDIT)
-       {
-               if(previous)
-               {
-                       if(cut_length < previous->length)
-                       {   // Cut into previous edit
-                               previous->length -= cut_length;
-                               startproject -= cut_length;
-                               startsource -= cut_length;
-                               length += cut_length;
-                       }
-                       else
-                       {   // Clear entire previous edit
-                               cut_length = previous->length;
-                               previous->length = 0;
-                               length += cut_length;
-                               startsource -= cut_length;
-                               startproject -= cut_length;
-                       }
-               }
+       if( edit_autos ) {
+               edits->shift_keyframes_recursive(start, cut_length);
+               edits->shift_keyframes_recursive(end + cut_length, -cut_length);
        }
-       else
-       if(edit_mode == MOVE_NO_EDITS)
-       {
-               startsource -= cut_length;
+       if( edit_plugins ) {
+               edits->shift_effects_recursive(start, cut_length, 1);
+               edits->shift_effects_recursive(end + cut_length, -cut_length, 1);
        }
-
-// Fix infinite length files
-       if(startsource < 0) startsource = 0;
-       return 0;
-}
-
-int Edit::shift_end_in(int edit_mode,
-       int64_t newposition,
-       int64_t oldposition,
-       int edit_edits,
-       int edit_labels,
-       int edit_plugins,
-       int edit_autos,
-       Edits *trim_edits)
-{
-       int64_t cut_length = oldposition - newposition;
-
-       if(edit_mode == MOVE_ALL_EDITS)
-       {
-//printf("Edit::shift_end_in 1\n");
-               if(newposition > startproject)
-               {        // clear partial edit
-//printf("Edit::shift_end_in %p %p\n", track->edits, edits);
-                       edits->clear_recursive(newposition,
-                               oldposition,
-                               edit_edits,
-                               edit_labels,
-                               edit_plugins,
-                               edit_autos,
-                               trim_edits);
-               }
-               else
-               {        // clear entire edit
-                       edits->clear_recursive(startproject,
-                               oldposition,
-                               edit_edits,
-                               edit_labels,
-                               edit_plugins,
-                               edit_autos,
-                               trim_edits);
-               }
+       if( !edit_edits && startproject < start ) {
+               edits->clear(startproject, start);
+               cut_length = start - startproject;
+               for( Edit *edit=next; edit; edit=edit->next )
+                       edit->startproject += cut_length;
        }
-       else
-       if(edit_mode == MOVE_ONE_EDIT)
-       {
-               if(next)
-               {
-                       if(next->asset)
-                       {
-                               int64_t end_source = next->get_source_end(1);
 
-                               if(end_source > 0 && next->startsource - cut_length < 0)
-                               {
-                                       cut_length = next->startsource;
-                               }
-                       }
+       this->startproject = startproject;
+       this->startsource = startsource;
+       this->length = length;
 
-                       if(cut_length < length)
-                       {
-                               length -= cut_length;
-                               next->startproject -= cut_length;
-                               next->startsource -= cut_length;
-                               next->length += cut_length;
-//printf("Edit::shift_end_in 2 %d\n", cut_length);
-                       }
-                       else
-                       {
-                               cut_length = length;
-                               next->length += cut_length;
-                               next->startsource -= cut_length;
-                               next->startproject -= cut_length;
-                               length -= cut_length;
-                       }
-               }
-               else
-               {
-                       if(cut_length < length)
-                       {
-                               length -= cut_length;
-                       }
-                       else
-                       {
-                               cut_length = length;
-                               edits->clear_recursive(startproject,
-                                       oldposition,
-                                       edit_edits,
-                                       edit_labels,
-                                       edit_plugins,
-                                       edit_autos,
-                                       trim_edits);
-                       }
-               }
-       }
-       else
-// Does nothing for plugins
-       if(edit_mode == MOVE_NO_EDITS)
-       {
-//printf("Edit::shift_end_in 3\n");
-               int64_t end_source = get_source_end(1);
-               if(end_source > 0 && startsource < cut_length)
-               {
-                       cut_length = startsource;
-               }
-               startsource -= cut_length;
-       }
        return 0;
 }
 
-int Edit::shift_end_out(int edit_mode,
-       int64_t newposition,
-       int64_t oldposition,
-       int edit_edits,
-       int edit_labels,
-       int edit_plugins,
-       int edit_autos,
-       Edits *trim_edits)
+int Edit::shift_end(int edit_mode, int64_t newposition, int64_t oldposition,
+        int edit_edits, int edit_labels, int edit_plugins, int edit_autos,
+        Edits *trim_edits)
 {
+       int64_t startproject = this->startproject;
+       int64_t startsource = this->startsource;
+       int64_t length = this->length;
+       int64_t source_len = get_source_end(startsource + length);
        int64_t cut_length = newposition - oldposition;
-       int64_t endsource = get_source_end(startsource + length + cut_length);
-
-// check end of edit against end of source file
-       if(endsource > 0 && startsource + length + cut_length > endsource)
-               cut_length = endsource - startsource - length;
+       source_len += cut_length;
 
-//printf("Edit::shift_end_out 1 %jd %d %d %d\n", oldposition, newposition, this->length, cut_length);
-       if(edit_mode == MOVE_ALL_EDITS)
-       {
-// Extend length
-               this->length += cut_length;
-
-// Effects are shifted in length extension
-               if(edit_plugins)
-                       edits->shift_effects_recursive(oldposition /* startproject */,
-                               cut_length,
-                               edit_autos);
-               if(edit_autos)
-                       edits->shift_keyframes_recursive(oldposition /* startproject */,
-                               cut_length);
-
-               for(Edit* current_edit = next; current_edit; current_edit = current_edit->next)
-               {
-                       current_edit->startproject += cut_length;
-               }
+       switch( edit_mode ) {
+       case MOVE_EDGE:
+               length += cut_length;
+               break;
+       case MOVE_MEDIA:
+               startsource += cut_length;
+               break;
+       case MOVE_EDGE_MEDIA:
+               startsource -= cut_length;
+               length += cut_length;
+               break;
        }
-       else
-       if(edit_mode == MOVE_ONE_EDIT)
-       {
-               if(next)
-               {
-                       if(cut_length < next->length)
-                       {
-                               length += cut_length;
-                               next->startproject += cut_length;
-                               next->startsource += cut_length;
-                               next->length -= cut_length;
-//printf("Edit::shift_end_out %d cut_length=%d\n", __LINE__, cut_length);
-                       }
-                       else
-                       {
-//printf("Edit::shift_end_out %d cut_length=%d next->length=%d\n", __LINE__, cut_length, next->length);
-                               cut_length = next->length;
-                               next->startproject += next->length;
-                               next->startsource += next->length;
-                               next->length = 0;
-                               length += cut_length;
-//track->dump();
-                       }
-               }
+       if( startproject < 0 ) {
+               startsource += startproject;
+               length += startproject;
+               startproject = 0;
+       }
+       if( startsource < 0 )
+               startsource = 0;
+       if( length > source_len )
+               length = source_len;
+       if( length < 0 )
+               length = 0;
+
+       int64_t start = this->startproject;
+       int64_t end = start + this->length;
+       if( edit_labels ) {
+               double cut_len = track->from_units(cut_length);
+               double end_pos = edits->track->from_units(end);
+               if( cut_len < 0 )
+                       edits->edl->labels->clear(end_pos + cut_len, end_pos, 1);
                else
-               {
-                       length += cut_length;
-               }
+                       edits->edl->labels->insert(end_pos, cut_len);
        }
-       else
-       if(edit_mode == MOVE_NO_EDITS)
-       {
-               startsource += cut_length;
+       Track *track = edits->track;
+       if( cut_length < 0 )
+               track->clear(end+cut_length, end,
+                       0, 0, edit_autos, edit_plugins, trim_edits);
+       else if( cut_length > 0 ) {
+               if( edit_autos )
+                       track->shift_keyframes(end, cut_length);
+               if( edit_plugins )
+                       track->shift_effects(end, cut_length, 1, trim_edits);
        }
+
+       int64_t new_end = startproject + length;
+       if( edit_edits ) {
+               cut_length = new_end - end;
+               for( Edit* edit=next; edit; edit=edit->next )
+                       edit->startproject += cut_length;
+       }
+       else if( new_end > end )
+               edits->clear(end, new_end);
+
+       this->startproject = startproject;
+       this->startsource = startsource;
+       this->length = length;
+
        return 0;
 }
 
+
 int Edit::popup_transition(float view_start, float zoom_units, int cursor_x, int cursor_y)
 {
        int64_t left, right, left_unit, right_unit;
index ff045fd0dc9bba69fea3c4dadb3c7aa21a09dc72..ed0e22b8b17c94a5ebff26a46305489a396c5c9a 100644 (file)
@@ -77,37 +77,11 @@ public:
 
 // Shift in time
        virtual void shift(int64_t difference);
-       int shift_start_in(int edit_mode,
-               int64_t newposition,
-               int64_t oldposition,
-               int edit_edits,
-               int edit_labels,
-               int edit_plugins,
-               int edit_autos,
+       int shift_start(int edit_mode, int64_t newposition, int64_t oldposition,
+               int edit_edits, int edit_labels, int edit_plugins, int edit_autos,
                Edits *trim_edits);
-       int shift_start_out(int edit_mode,
-               int64_t newposition,
-               int64_t oldposition,
-               int edit_edits,
-               int edit_labels,
-               int edit_plugins,
-               int edit_autos,
-               Edits *trim_edits);
-       int shift_end_in(int edit_mode,
-               int64_t newposition,
-               int64_t oldposition,
-               int edit_edits,
-               int edit_labels,
-               int edit_plugins,
-               int edit_autos,
-               Edits *trim_edits);
-       int shift_end_out(int edit_mode,
-               int64_t newposition,
-               int64_t oldposition,
-               int edit_edits,
-               int edit_labels,
-               int edit_plugins,
-               int edit_autos,
+       int shift_end(int edit_mode, int64_t newposition, int64_t oldposition,
+               int edit_edits, int edit_labels, int edit_plugins, int edit_autos,
                Edits *trim_edits);
 
        void insert_transition(char  *title);
index fcf8c214f784930a3d57511db9fe85d66e04689d..26f49890d70cb22fbc1ea7351ab80f7a15edbba1 100644 (file)
@@ -682,8 +682,7 @@ int Edits::clear_handle(double start, double end,
 // Lengthen effects
                                        if(edit_plugins)
                                                track->shift_effects(current_edit->next->startproject,
-                                                       length,
-                                                       edit_autos);
+                                                               length, edit_autos, 0);
 
                                        for(current_edit = current_edit->next; current_edit; current_edit = current_edit->next)
                                        {
@@ -732,31 +731,16 @@ int Edits::modify_handles(double oldposition, double newposition, int currentend
                                oldposition = track->from_units(current_edit->startproject);
                                if( group_id > 0 ) newposition = oldposition + delta;
                                result = 1;
-
-                               if( newposition >= oldposition ) {
-//printf("Edits::modify_handle 1 %s %f %f\n", track->title, oldposition, newposition);
-// shift start of edit in
-                                       current_edit->shift_start_in(edit_mode,
-                                               track->to_units(newposition, 0),
-                                               track->to_units(oldposition, 0),
-                                               edit_edits,
-                                               edit_labels,
-                                               edit_plugins,
-                                               edit_autos,
-                                               trim_edits);
-                               }
-                               else {
-//printf("Edits::modify_handle 2 %s\n", track->title);
-// move start of edit out
-                                       current_edit->shift_start_out(edit_mode,
-                                               track->to_units(newposition, 0),
-                                               track->to_units(oldposition, 0),
-                                               edit_edits,
-                                               edit_labels,
-                                               edit_plugins,
-                                               edit_autos,
-                                               trim_edits);
+// dont move stuff if media playback does not shift in time
+                               if( edit_mode != MOVE_MEDIA && edit_mode != MOVE_EDGE_MEDIA ) {
+                                       edit_labels = 0;
+                                       edit_plugins = 0;
+                                       edit_autos = 0;
                                }
+                               current_edit->shift_start(edit_mode,
+                                       track->to_units(newposition, 0), track->to_units(oldposition, 0),
+                                       0, edit_labels, edit_plugins, edit_autos,
+                                       trim_edits);
                        }
 
                        if(!result) current_edit = current_edit->next;
@@ -774,34 +758,9 @@ int Edits::modify_handles(double oldposition, double newposition, int currentend
                                if( group_id > 0 ) newposition = oldposition + delta;
                                result = 1;
 
-//printf("Edits::modify_handle 3\n");
-                               if(newposition <= oldposition) {
-// shift end of edit in
-//printf("Edits::modify_handle 4\n");
-                                       current_edit->shift_end_in(edit_mode,
-                                               track->to_units(newposition, 0),
-                                               track->to_units(oldposition, 0),
-                                               edit_edits,
-                                               edit_labels,
-                                               edit_plugins,
-                                               edit_autos,
-                                               trim_edits);
-//printf("Edits::modify_handle 5\n");
-                               }
-                               else
-                               {
-// move end of edit out
-//printf("Edits::modify_handle %d edit_mode=%d\n", __LINE__, edit_mode);
-                                       current_edit->shift_end_out(edit_mode,
-                                               track->to_units(newposition, 0),
-                                               track->to_units(oldposition, 0),
-                                               edit_edits,
-                                               edit_labels,
-                                               edit_plugins,
-                                               edit_autos,
-                                               trim_edits);
-//printf("Edits::modify_handle 7\n");
-                               }
+                               current_edit->shift_end(edit_mode,
+                                       track->to_units(newposition, 0), track->to_units(oldposition, 0),
+                                       edit_edits, edit_labels, edit_plugins, edit_autos, trim_edits);
                        }
 
                        if(!result) current_edit = current_edit->next;
@@ -862,6 +821,6 @@ void Edits::shift_keyframes_recursive(int64_t position, int64_t length)
 
 void Edits::shift_effects_recursive(int64_t position, int64_t length, int edit_autos)
 {
-       track->shift_effects(position, length, edit_autos);
+       track->shift_effects(position, length, edit_autos, 0);
 }
 
index a01691b2c339be714addff85466e57dad10747cd..b69e659529ff5f78b6b82d06eca168ea7dcfab83 100644 (file)
@@ -44,14 +44,15 @@ class EDL;
 #define EDITING_IBEAM 1
 
 
+// default for left button
+#define MOVE_EDGE 0
+// default for middle button
+#define MOVE_MEDIA 1
+// default for right button
+#define MOVE_EDGE_MEDIA 2
 
-#define EDIT_HANDLE_MODES 3
-
-// Behavior for the edit handles based on mouse button
-#define MOVE_ALL_EDITS 0 // default for left button
-#define MOVE_ONE_EDIT 1 // default for middle button
-#define MOVE_NO_EDITS 2 // default for right button
 #define MOVE_EDITS_DISABLED 3
+#define EDIT_HANDLE_MODES 3
 
 // AWindow folders
 #define AW_NO_FOLDER         -1
index 1eb9b6b986752f07917ffba50b45a6bacb055746..448116aeccabe73b207e4f52ae17163affd95ab0 100644 (file)
@@ -75,9 +75,9 @@ EDLSession::EDLSession(EDL *edl)
        strcpy(default_atransition, INIT_ATRANSITION);
        strcpy(default_vtransition, INIT_VTRANSITION);
        default_transition_length = 1.0;
-       edit_handle_mode[0] = MOVE_ALL_EDITS;
-       edit_handle_mode[1] = MOVE_ONE_EDIT;
-       edit_handle_mode[2] = MOVE_NO_EDITS;
+       edit_handle_mode[0] = MOVE_EDGE;
+       edit_handle_mode[1] = MOVE_MEDIA;
+       edit_handle_mode[2] = MOVE_EDGE_MEDIA;
        editing_mode = EDITING_IBEAM;
        enable_duplex = 1;
        folderlist_format = FOLDERS_ICONS;
@@ -258,9 +258,9 @@ int EDLSession::load_defaults(BC_Hash *defaults)
        sprintf(default_vtransition, INIT_VTRANSITION);
        defaults->get("DEFAULT_VTRANSITION", default_vtransition);
        default_transition_length = defaults->get("DEFAULT_TRANSITION_LENGTH", (double)1);
-       edit_handle_mode[0] = defaults->get("EDIT_HANDLE_MODE0", MOVE_ALL_EDITS);
-       edit_handle_mode[1] = defaults->get("EDIT_HANDLE_MODE1", MOVE_ONE_EDIT);
-       edit_handle_mode[2] = defaults->get("EDIT_HANDLE_MODE2", MOVE_NO_EDITS);
+       edit_handle_mode[0] = defaults->get("EDIT_HANDLE_MODE0", MOVE_EDGE);
+       edit_handle_mode[1] = defaults->get("EDIT_HANDLE_MODE1", MOVE_MEDIA);
+       edit_handle_mode[2] = defaults->get("EDIT_HANDLE_MODE2", MOVE_EDGE_MEDIA);
        editing_mode = defaults->get("EDITING_MODE", EDITING_IBEAM);
        enable_duplex = defaults->get("ENABLE_DUPLEX", 1);
        folderlist_format = defaults->get("FOLDERLIST_FORMAT", FOLDERS_TEXT);
index 44c85cbaae4cff094326df73bbcc5a2b729ca85c..c4abf35ab657c090b7119a2844cf2c72e008d4a9 100644 (file)
@@ -40,9 +40,9 @@ N_("Drag source only")
 N_("No effect")
 #endif
 
-#define MOVE_ALL_EDITS_TITLE N_("Drag all following edits")
-#define MOVE_ONE_EDIT_TITLE N_("Drag only one edit")
-#define MOVE_NO_EDITS_TITLE N_("Drag source only")
+#define MOVE_EDGE_TITLE N_("Drag edge only")
+#define MOVE_MEDIA_TITLE N_("Drag media only")
+#define MOVE_EDGE_MEDIA_TITLE N_("Drag edge and media")
 #define MOVE_EDITS_DISABLED_TITLE N_("No effect")
 
 InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow)
@@ -241,9 +241,9 @@ void InterfacePrefs::create_objects()
 const char* InterfacePrefs::behavior_to_text(int mode)
 {
        switch(mode) {
-               case MOVE_ALL_EDITS: return _(MOVE_ALL_EDITS_TITLE);
-               case MOVE_ONE_EDIT:  return _(MOVE_ONE_EDIT_TITLE);
-               case MOVE_NO_EDITS:  return _(MOVE_NO_EDITS_TITLE);
+               case MOVE_EDGE: return _(MOVE_EDGE_TITLE);
+               case MOVE_MEDIA:  return _(MOVE_MEDIA_TITLE);
+               case MOVE_EDGE_MEDIA:  return _(MOVE_EDGE_MEDIA_TITLE);
                case MOVE_EDITS_DISABLED: return _(MOVE_EDITS_DISABLED_TITLE);
                default: return "";
        }
@@ -339,9 +339,9 @@ int ViewBehaviourText::handle_event()
 
 void ViewBehaviourText::create_objects()
 {
-       add_item(new ViewBehaviourItem(this, _(MOVE_ALL_EDITS_TITLE), MOVE_ALL_EDITS));
-       add_item(new ViewBehaviourItem(this, _(MOVE_ONE_EDIT_TITLE), MOVE_ONE_EDIT));
-       add_item(new ViewBehaviourItem(this, _(MOVE_NO_EDITS_TITLE), MOVE_NO_EDITS));
+       add_item(new ViewBehaviourItem(this, _(MOVE_EDGE_TITLE), MOVE_EDGE));
+       add_item(new ViewBehaviourItem(this, _(MOVE_MEDIA_TITLE), MOVE_MEDIA));
+       add_item(new ViewBehaviourItem(this, _(MOVE_EDGE_MEDIA_TITLE), MOVE_EDGE_MEDIA));
        add_item(new ViewBehaviourItem(this, _(MOVE_EDITS_DISABLED_TITLE), MOVE_EDITS_DISABLED));
 }
 
index 933985e5297dd984b99c38de10da3515e360808a..1435a985c8d88abc115a12d245387c1ec55f29cc 100644 (file)
@@ -478,36 +478,21 @@ int Labels::paste_silence(double start, double end)
        return 0;
 }
 
-int Labels::modify_handles(double oldposition,
-       double newposition,
-       int currentend,
-       int handle_mode,
-       int edit_labels)
+int Labels::modify_handles(double oldposition, double newposition,
+               int currentend, int handle_mode, int edit_labels)
 {
-       if(edit_labels &&
-               handle_mode == MOVE_ALL_EDITS)
-       {
-               if(currentend == 0)          // left handle
-               {
-                       if(newposition < oldposition)
-                       {
+       if( edit_labels && handle_mode == MOVE_EDGE ) {
+               if( !currentend ) {     // left handle
+                       if( newposition < oldposition )
                                insert(oldposition, oldposition - newposition);    // shift all labels right
-                       }
                        else
-                       {
                                clear(oldposition, newposition);   // clear selection
-                       }
                }
-               else
-               {                            // right handle
-                       if(newposition < oldposition)
-                       {
+               else {                  // right handle
+                       if( newposition < oldposition )
                                clear(newposition, oldposition);
-                       }
                        else
-                       {
                                insert(oldposition, newposition - oldposition);
-                       }
                }
        }
        return 0;
index 787ca44c5819555d1f4852292f81997ef63a2b17..b6432aa6101b955354f6244d1a1db879ee5c3c66 100644 (file)
@@ -861,24 +861,11 @@ int MWindow::modify_pluginhandles()
 void MWindow::finish_modify_handles()
 {
        int edit_mode = edl->session->edit_handle_mode[session->drag_button];
-
-       if( (session->drag_handle == 1 && edit_mode != MOVE_NO_EDITS) ||
-               (session->drag_handle == 0 && edit_mode == MOVE_ONE_EDIT) ) {
-//printf("MWindow::finish_modify_handles %d\n", __LINE__);
-               edl->local_session->set_selectionstart(session->drag_position);
-               edl->local_session->set_selectionend(session->drag_position);
-       }
-       else
-       if( edit_mode != MOVE_NO_EDITS ) {
-//printf("MWindow::finish_modify_handles %d\n", __LINE__);
-               edl->local_session->set_selectionstart(session->drag_start);
-               edl->local_session->set_selectionend(session->drag_start);
-       }
-
-// clamp the selection to 0
-       if( edl->local_session->get_selectionstart(1) < 0 ) {
-               edl->local_session->set_selectionstart(0);
-               edl->local_session->set_selectionend(0);
+       if( edit_mode != MOVE_MEDIA ) {
+               double position = session->drag_position ;
+               if( position < 0 ) position = 0;
+               edl->local_session->set_selectionstart(position);
+               edl->local_session->set_selectionend(position);
        }
        undo->update_undo_after(_("drag handle"), LOAD_EDITS | LOAD_TIMEBAR);
 
index 482cbb1e024f7f9556624083c021380ee67be557..3c092b73f7188ec8ea2080cdceb15a7e88f7de6f 100644 (file)
@@ -474,23 +474,17 @@ void Track::insert_plugin_set(Track *track,
        int edit_autos)
 {
 // Extend plugins if no incoming plugins
-       if(!track->plugin_set.total)
-       {
-               shift_effects(position,
-                       min_length,
-                       edit_autos);
-       }
-       else
-       for(int i = 0; i < track->plugin_set.total; i++)
-       {
-               if(i >= plugin_set.total)
-                       plugin_set.append(new PluginSet(edl, this));
+       if( track->plugin_set.total ) {
+               for(int i = 0; i < track->plugin_set.total; i++) {
+                       if(i >= plugin_set.total)
+                               plugin_set.append(new PluginSet(edl, this));
 
-               plugin_set.values[i]->insert_edits(track->plugin_set.values[i],
-                       position,
-                       min_length,
-                       edit_autos);
+                       plugin_set.values[i]->insert_edits(track->plugin_set.values[i],
+                                       position, min_length, edit_autos);
+               }
        }
+       else
+               shift_effects(position, min_length, edit_autos, 0);
 }
 
 
@@ -670,11 +664,11 @@ void Track::shift_keyframes(int64_t position, int64_t length)
 // Effect keyframes are shifted in shift_effects
 }
 
-void Track::shift_effects(int64_t position, int64_t length, int edit_autos)
+void Track::shift_effects(int64_t position, int64_t length, int edit_autos, Edits *trim_edits)
 {
-       for(int i = 0; i < plugin_set.total; i++)
-       {
-               plugin_set.values[i]->shift_effects(position, length, edit_autos);
+       for( int i=0; i<plugin_set.total; ++i ) {
+               if( !trim_edits || trim_edits == (Edits*)plugin_set.values[i] )
+                       plugin_set.values[i]->shift_effects(position, length, edit_autos);
        }
 }
 
@@ -1243,8 +1237,7 @@ int Track::modify_pluginhandles(double oldposition,
                if(!trim_edits || trim_edits == (Edits*)plugin_set.values[i])
                        plugin_set.values[i]->modify_handles(oldposition, newposition,
 // Don't allow plugin tweeks to affect edits.
-                               currentend, handle_mode, 0,
-                               edit_labels, 1, edit_autos, trim_edits, 0);
+                               currentend, handle_mode, 0, 0, 0, 0, 0, 0);
        }
        return 0;
 }
@@ -1262,7 +1255,7 @@ int Track::paste_silence(int64_t start, int64_t end, int edit_plugins, int edit_
        if( edit_autos )
                shift_keyframes(start, end - start);
        if( edit_plugins )
-               shift_effects(start, end - start, edit_autos);
+               shift_effects(start, end - start, edit_autos, 0);
        edits->optimize();
        return 0;
 }
index c879c40e57e43f99f903b40dd3b75d08894d8630..d0950dc1100e3f6996695ca75be304eb8616911b 100644 (file)
@@ -155,7 +155,7 @@ public:
 
        virtual int copy_settings(Track *track);
        void shift_keyframes(int64_t position, int64_t length);
-       void shift_effects(int64_t position, int64_t length, int edit_autos);
+       void shift_effects(int64_t position, int64_t length, int edit_autos, Edits *trim_edits);
        void change_plugins(SharedLocation &old_location, SharedLocation &new_location, int do_swap);
        void change_modules(int old_location, int new_location, int do_swap);
        int plugin_exists(Plugin *plugin);
index 638e04341397691512d9f596617e2208723263ee..70b00a79aefed0491b7eec5d84842477ba0379ed 100644 (file)
@@ -3816,10 +3816,9 @@ void TrackCanvas::update_drag_handle()
                        edl->session->labels_follow_edits,
                        edl->session->plugins_follow_edits,
                        edl->session->autos_follow_edits,
-                       session->drag_edit->group_id);
-               double position = edit_mode != MOVE_NO_EDITS &&
-                       ( session->drag_handle || edit_mode == MOVE_ONE_EDIT ) ?
-                               session->drag_position : session->drag_start;
+                       !session->drag_edit ? 0 : session->drag_edit->group_id);
+               double position = edit_mode == MOVE_EDGE || edit_mode == MOVE_EDGE_MEDIA ?
+                               session->drag_position : session->drag_start ;
                Track *track = session->drag_handle_track();
                int64_t pos = track->to_units(position, 0);
                render_handle_frame(edl, pos, shift_down() ? 0 :
index afe491f39aec9176c1581358c04fe803f385e144..35da7092bf149246b81bc68c838c301afc91549a 100644 (file)
@@ -214,28 +214,13 @@ void Tracks::set_edit_length(double start, double end, double length)
 // Go in using the edit handle interface
                                        int64_t starting_length = current_edit->length;
 
-                                       if(length_units < current_edit->length)
-                                       {
-                                               current_edit->shift_end_in(MOVE_ALL_EDITS,
-                                                       current_edit->startproject + length_units,
-                                                       current_edit->startproject + current_edit->length,
-                                                       1,
-                                                       edl->session->labels_follow_edits,
-                                                       edl->session->plugins_follow_edits,
-                                                       edl->session->autos_follow_edits,
-                                                       0);
-                                       }
-                                       else
-                                       {
-                                               current_edit->shift_end_out(MOVE_ALL_EDITS,
-                                                       current_edit->startproject + length_units,
-                                                       current_edit->startproject + current_edit->length,
-                                                       1,
-                                                       edl->session->labels_follow_edits,
-                                                       edl->session->plugins_follow_edits,
-                                                       edl->session->autos_follow_edits,
-                                                       0);
-                                       }
+                                       current_edit->shift_end(MOVE_EDGE,
+                                               current_edit->startproject + length_units,
+                                               current_edit->startproject + current_edit->length,
+                                               1, 0,
+                                               edl->session->plugins_follow_edits,
+                                               edl->session->autos_follow_edits,
+                                               0);
 
                                        int64_t ending_length = current_edit->length;
 
@@ -248,9 +233,7 @@ void Tracks::set_edit_length(double start, double end, double length)
                                                 edl->labels->modify_handles(
                                                        current_track->from_units(current_edit->startproject + starting_length),
                                                        current_track->from_units(current_edit->startproject + ending_length),
-                                                       1,
-                                                       MOVE_ALL_EDITS,
-                                                       1);
+                                                       1, MOVE_EDGE, 1);
                                        }
 
 
@@ -298,43 +281,24 @@ void Tracks::set_edit_length(double start, double end, double length)
 // Go in using the edit handle interface
                                        int64_t starting_length = current_edit->length;
 
-                                       if(length_units < current_edit->length)
-                                       {
-                                               current_edit->shift_end_in(MOVE_ALL_EDITS,
-                                                       current_edit->startproject + length_units,
-                                                       current_edit->startproject + current_edit->length,
-                                                       1,
-                                                       edl->session->labels_follow_edits,
-                                                       edl->session->plugins_follow_edits,
-                                                       edl->session->autos_follow_edits,
-                                                       0);
-                                       }
-                                       else
-                                       {
-                                               current_edit->shift_end_out(MOVE_ALL_EDITS,
-                                                       current_edit->startproject + length_units,
-                                                       current_edit->startproject + current_edit->length,
-                                                       1,
-                                                       edl->session->labels_follow_edits,
-                                                       edl->session->plugins_follow_edits,
-                                                       edl->session->autos_follow_edits,
-                                                       0);
-                                       }
+                                       current_edit->shift_end(MOVE_EDGE,
+                                               current_edit->startproject + length_units,
+                                               current_edit->startproject + current_edit->length,
+                                               1, 0,
+                                               edl->session->plugins_follow_edits,
+                                               edl->session->autos_follow_edits,
+                                               0);
 
                                        int64_t ending_length = current_edit->length;
 
-                                       if(edl->session->labels_follow_edits && first_track)
-                                       {
-// printf("Tracks::set_edit_length %d %f %f\n",
-// __LINE__,
+                                       if(edl->session->labels_follow_edits && first_track) {
+// printf("Tracks::set_edit_length %d %f %f\n", __LINE__,
 // current_track->from_units(current_edit->startproject + starting_length),
 // current_track->from_units(current_edit->startproject + ending_length));
                                                 edl->labels->modify_handles(
                                                        current_track->from_units(current_edit->startproject + starting_length),
                                                        current_track->from_units(current_edit->startproject + ending_length),
-                                                       1,
-                                                       MOVE_ALL_EDITS,
-                                                       1);
+                                                       1, MOVE_EDGE, 1);
                                        }
 
 
index 32e0aa17e8902ab92ab68b2a4f0ace412ed9e4c9..2ec692117ff7f27c3153ee3e994e23ac4d21b52c 100644 (file)
@@ -356,12 +356,12 @@ PKG_3RD([twolame],[auto],
   [  libtwolame ])
 
 PKG_3RD([x264],[auto],
-  [x264-snapshot-20180118-2245],
+  [x264-snapshot-20190117-2245-stable],
   [ libx264.a ],
   [ . ])
 
 PKG_3RD([x265],[auto],
-  [x265_2.8],
+  [x265_2.9],
   [ libx265.a ],
   [ . source ])
 
index 9cc4ab5aee6b351ea1a84fbfcd6b92a476d1a0fd..73f7ebad11c5b19fdc76470a12509a92e92dc199 100644 (file)
                <td align="left"><font face="Liberation Serif" size=4>Double click</font></td>
                <td align="left"><font face="Liberation Serif" size=4>On fade/speed, synch video/audio ganged</font></td>
        </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif" size=4>Shift</font></td>
+               <td align="left"><font face="Liberation Serif" size=4>While dragging auto turns off gang</font></td>
+       </tr>
        <tr>
                <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif" size=4><br></font></td>
diff --git a/cinelerra-5.1/thirdparty/src/x264-snapshot-20180118-2245.tar.xz b/cinelerra-5.1/thirdparty/src/x264-snapshot-20180118-2245.tar.xz
deleted file mode 100644 (file)
index 6cc5bd6..0000000
Binary files a/cinelerra-5.1/thirdparty/src/x264-snapshot-20180118-2245.tar.xz and /dev/null differ
diff --git a/cinelerra-5.1/thirdparty/src/x264-snapshot-20190117-2245-stable.tar.xz b/cinelerra-5.1/thirdparty/src/x264-snapshot-20190117-2245-stable.tar.xz
new file mode 100644 (file)
index 0000000..c77c5bb
Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/x264-snapshot-20190117-2245-stable.tar.xz differ
diff --git a/cinelerra-5.1/thirdparty/src/x265_2.8.tar.xz b/cinelerra-5.1/thirdparty/src/x265_2.8.tar.xz
deleted file mode 100644 (file)
index 45a807b..0000000
Binary files a/cinelerra-5.1/thirdparty/src/x265_2.8.tar.xz and /dev/null differ
diff --git a/cinelerra-5.1/thirdparty/src/x265_2.9.tar.xz b/cinelerra-5.1/thirdparty/src/x265_2.9.tar.xz
new file mode 100644 (file)
index 0000000..d8e2937
Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/x265_2.9.tar.xz differ